Use Resource Orchestration Service (ROS) to call Alibaba Cloud CDN operations. Write a ROS template to automatically add an Alibaba Cloud CDN accelerated domain name.
Supported resources
Resource Orchestration Service (ROS) simplifies cloud resource management. You can write templates to define Alibaba Cloud resources, such as ECS instances and RDS database instances, and their dependencies. The ROS orchestration engine automatically creates and configures all defined resources for automated deployment and O&M. For more information, see What is Resource Orchestration Service.
ROS supports the following Alibaba Cloud CDN resource types: regular resources and data source resources.
-
Regular resources:
-
ALIYUN::CDN::Domain: Adds an accelerated domain name.
-
ALIYUN::CDN::DomainConfig: Configures domain names in batches.
-
-
Data source resources:
-
DATASOURCE::CDN::Domains: Queries basic information about created accelerated domain names.
-
Permissions
This example adds an accelerated domain name. By default, Resource Orchestration Service uses the credentials of the current user, who must have the following permissions:
-
AliyunCDNFullAccess: Grants full access to Alibaba Cloud CDN resources.
For security, use a RAM user instead of your Alibaba Cloud account for API access and routine O&M. The RAM user must have permissions to manage Alibaba Cloud CDN resources. For more information, see System policies for Alibaba Cloud CDN.
Procedure
Procedure
-
Log on to the ROS console. In the top navigation bar, select the desired region from the region drop-down list.
-
In the left-side navigation pane, click Stacks. Then, choose .
-
Specify Template: Select Select an Existing Template.
-
Template Import Method: Select Enter Template Content.
-
-
For Template Content, select ROS and enter the code.
For the syntax and parameters, see ALIYUN::CDN::Domain.
-
Click Next.
-
On the Configure Parameters page, set the parameters and click Create.
-
Check the stack status.
The Status of the stack changes to CREATE_COMPLETE, and the status description is
Stack CREATE completed successfully. -
After the stack is created, verify the resource creation by using an API, an SDK, or the Alibaba Cloud CDN console.
In the Alibaba Cloud CDN console, go to the Domain Management page. The new accelerated domain name appears with a status of Enabled and a CNAME status of Configured.