Connecting to a Cloud CDN provider
You can only create a CDN resource and origin group in a folder if this folder is connected to a CDN provider. When connecting to a CDN provider, the folder gets a unique cname
value you need to create CNAME resource records for CDN resources.
To connect a folder to a CDN provider and get a cname
value:
-
In the management console
, select the folder to connect to a CDN provider. -
Select Cloud CDN.
-
If the CDN provider is not activated yet, click Activate provider. A connection will be established automatically.
If there is no Activate provider button, and you can create resources and origin groups, it means that the provider is already activated.
-
The
cname
value for creating resource records for CDN resources is displayed in the following sections:- Domain names for content distribution when creating a CDN resource.
- DNS settings on the CDN resource info page.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
Connect to a provider:
yc cdn provider activate --type gcore
-
Get the CNAME record value for the CDN resource:
yc cdn resource get-provider-cname
Result:
cname: cl-ms6*****90.edgecdn.ru folder_id: b1gt6g8ht345********
To connect to a provider, use the activate REST API method for the Provider resource or the ProviderService/Activate gRPC API call.
To get the cname
value for a folder, use the getProviderCName REST API method for the Resource resource or the ResourceService/GetProviderCName gRPC API call.