ALIYUN::CDN::Domain is used to add a domain name to Alibaba Cloud CDN (CDN).
Before you add a domain name to CDN, you must activate CDN. For more information, see Activate Alibaba Cloud CDN.
The domain name must be ICP filed.
You can add only a single domain name to CDN in each call. You can add up to 50 domain names by using an Alibaba Cloud account.
If the content of the origin server is not stored on Alibaba Cloud, the content must be reviewed. The review will be completed by the end of the next business day after you submit the application.
The maximum number of times that each user can call this operation per second is 30.
Syntax
{
"Type": "ALIYUN::CDN::Domain",
"Properties": {
"CdnType": String,
"Sources": String,
"CheckUrl": String,
"DomainName": String,
"ResourceGroupId": String,
"Scope": String,
"TopLevelDomain": String,
"Tags": List,
"OriginServers": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
CdnType | String | Yes | No | The workload type of the accelerated domain name. | Valid values:
|
Sources | String | No | Yes | The addresses of the origin servers. | Example: |
CheckUrl | String | No | No | The URL that is used to check the accessibility of the origin server. | Example: |
DomainName | String | Yes | No | The domain name that you want to add to CDN. | Wildcard domain names are supported. The domain name must start with a period (.). Example: |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
Scope | String | No | No | The accelerated region. | Valid values:
|
TopLevelDomain | String | No | Yes | The top-level domain. | Example: www.yourTopLevelDomain. |
Tags | List | No | Yes | The tags. | You can specify up to 20 tags. For more information, see Tags properties. |
OriginServers | List | No | No | The source servers. | The OriginServers property has the same effect as the Sources property. However, the OriginServers property takes precedence over the Sources property. You can specify up to 20 source servers. For more information, see OriginServers properties. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Key | String | Yes | No | The tag key. | The tag key must be 1 to 128 characters in length, and cannot contain |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length and cannot contain |
OriginServers syntax
"OriginServers": [
{
"Port": Integer,
"Weight": String,
"Priority": String,
"Content": String,
"Type": String
}
]
OriginServers properties
Property | Type | Required | Editable | Description | Constraint |
Port | Integer | Yes | No | The port. | You can specify port 443, port 80, or a custom port. Default value: 80. If you specify port 443, CDN communicates with the origin server over HTTPS. |
Weight | String | No | No | The weight of the origin server if multiple origin servers are specified. | Valid values: a numeric value that is less than 100. Default value: 10. |
Priority | String | No | No | The priority of the origin server if multiple origin servers are specified. | Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin. |
Content | String | Yes | No | The address of the origin server. | You can specify an IP address or a domain name. |
Type | String | Yes | No | The type of the origin server. | Valid values:
|
Return values
Fn::GetAtt
DomainName: the domain name that is added to CDN.
Cname: the alias of the CDN domain name. A Canonical Name (CNAME) record is provided to the Domain Name System (DNS) to map the alias to the canonical name.
Examples
For more examples, visit Domain.json and Domain.yml. In the examples, the ALIYUN::CDN::Domain and ALIYUN::CDN::DomainConfig resource types are used.