Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud CDN
  • Getting started
    • All guides
    • Connecting to a Cloud CDN provider
      • Creating a resource
      • Editing basic settings of a resource
      • Getting information about a resource
      • Configuring resource caching
      • Configuring log export
      • Pre-loading files to CDN servers
      • Purging resource cache
      • Configuring request and response headers
      • Configuring CORS for responses to clients
      • Configuring HTTP methods
      • Enabling file compression
      • Enabling file segmentation
      • Enabling origin shielding
      • Configuring request redirection
      • Setting up access via a secure token
      • Managing additional resource settings
      • Disabling a resource
      • Managing resource labels
      • Deleting a resource
      • Viewing resource statistics
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • Troubleshooting

In this article:

  • Adding or updating labels
  • Viewing labels
  • Deleting labels
  1. Step-by-step guides
  2. Resources
  3. Managing resource labels

Managing resource labels

Written by
Yandex Cloud
Updated at May 5, 2025
  • Adding or updating labels
  • Viewing labels
  • Deleting labels

CDN resource labels are key-value pairs used for logical CDN resource labeling.

Adding or updating labelsAdding or updating labels

Management console
CLI
  1. In the management console, select Cloud CDN from the list of services.
  2. In the line with the CDN resource, click and select Edit.
  3. Under Content, find the Labels field.
  4. Click Add label.
  5. Enter a label in key: value format. To edit an existing label, enter its key and a new value.
  6. Click Enter.
  7. Click Save.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View the description of the CLI command to update the CDN resource settings:

    yc cdn resource update --help
    
  2. Get a list of CDN resources in the default folder:

    yc cdn resource list
    

    Result:

    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    |          ID          |  CNAME  |           CREATED AT           |           UPDATED AT           | ACTIVE |                         OPTIONS                         |
    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    | bc8jhcx5o47p******** | ****.ru | seconds:1734615244             | seconds:1734615244             | false  | edge_cache_settings:{enabled:true                       |
    |                      |         | nanos:439618000                | nanos:439638000                |        |  default_value:345600}                                  |
    |                      |         |                                |                                |        | query_params_options:{ignore_query_string:{enabled:true |
    |                      |         |                                |                                |        |  value:true}}  stale:{enabled:true  value:"error"       |
    |                      |         |                                |                                |        | value:"updating"}                                       |
    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    
  3. Add labels by specifying the name of the CDN resource:

    yc cdn resource update <CDN_resource_ID> \
      --add-labels <label_1_key>=<label_1_value>,<label_2_key>=<label_2_value>,...,<label_n_key>=<label_n_value>
    

    Where --add-labels is a flag to list the CDN resource labels in key=value format.

    Result:

    id: bc8jhcx5o47p********
    folder_id: b1g681qpemb4********
    cname: ****.ru
    ...
    labels:
      key2: value2
      key3: value3
      key4: value4
    

Viewing labelsViewing labels

Management console
CLI
  1. In the management console, select Cloud CDN from the list of services.
  2. Navigate to the CDN resource.
  3. Under Content, find the Labels field.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View the description of the CLI command to update the CDN resource settings:

    yc cdn resource update --help
    
  2. Get a list of CDN resources in the default folder:

    yc cdn resource list
    

    Result:

    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    |          ID          |  CNAME  |           CREATED AT           |           UPDATED AT           | ACTIVE |                         OPTIONS                         |
    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    | bc8jhcx5o47p******** | ****.ru | seconds:1734615244             | seconds:1734615244             | false  | edge_cache_settings:{enabled:true                       |
    |                      |         | nanos:439618000                | nanos:439638000                |        |  default_value:345600}                                  |
    |                      |         |                                |                                |        | query_params_options:{ignore_query_string:{enabled:true |
    |                      |         |                                |                                |        |  value:true}}  stale:{enabled:true  value:"error"       |
    |                      |         |                                |                                |        | value:"updating"}                                       |
    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    
  3. Get information about the labels by specifying the name of the CDN resource:

    yc cdn resource get <CDN_resource_ID>
    

    Result:

    id: bc8jhcx5o47p********
    folder_id: b1g681qpemb4********
    cname: ****.ru
    ...
    labels:
      key2: value2
      key3: value3
      key4: value4
    

Deleting labelsDeleting labels

Management console
CLI
  1. In the management console, select Cloud CDN from the list of services.
  2. In the line with the CDN resource, click and select Edit.
  3. Under Content, find the Labels field.
  4. Click next to the label.
  5. Click Save.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View the description of the CLI command to update the CDN resource settings:

    yc cdn resource update --help
    
  2. Get a list of CDN resources in the default folder:

    yc cdn resource list
    

    Result:

    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    |          ID          |  CNAME  |           CREATED AT           |           UPDATED AT           | ACTIVE |                         OPTIONS                         |
    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    | bc8jhcx5o47p******** | ****.ru | seconds:1734615244             | seconds:1734615244             | false  | edge_cache_settings:{enabled:true                       |
    |                      |         | nanos:439618000                | nanos:439638000                |        |  default_value:345600}                                  |
    |                      |         |                                |                                |        | query_params_options:{ignore_query_string:{enabled:true |
    |                      |         |                                |                                |        |  value:true}}  stale:{enabled:true  value:"error"       |
    |                      |         |                                |                                |        | value:"updating"}                                       |
    +----------------------+---------+--------------------------------+--------------------------------+--------+---------------------------------------------------------+
    
  3. Delete labels by specifying the name of the CDN resource:

    yc cdn resource update <CDN_resource_ID> \
      --remove-labels <label_1_key>,<label_2_key>,...,<label_n_key>
    

    Where --remove-labels is a flag to list the CDN resource label keys.

    Result:

    id: bc8jhcx5o47p********
    folder_id: b1g681qpemb4********
    cname: ****.ru
    ...
    labels:
      key2: value2
      key3: value3
      key4: value4
    

    To delete all labels, use the --remove-all-labels flag:

    yc cdn resource update <CDN_resource_ID> \
      --remove-all-labels
    

Was the article helpful?

Previous
Disabling a resource
Next
Deleting a resource
© 2025 Direct Cursus Technology L.L.C.