ALIYUN::CDN::Domain类型用于添加加速域名。
说明 限制条件包括以下几点:
- 创建加速域名之前,请先开通CDN服务。
- 您的加速域名必须完成备案。
- 如果您的源站内容不在阿里云平台上,则需要审核。审核会在下一个工作日前完成。
- 每次只能提交一个加速域名。
- 每个用户最多可以添加20个域名。
语法
{
"Type": "ALIYUN::CDN::Domain",
"Properties": {
"CdnType": String,
"Sources": String,
"CheckUrl": String,
"DomainName": String,
"ResourceGroupId": String,
"Scope": String,
"TopLevelDomain": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
CdnType | String | 是 | 否 | 加速域名的业务类型。 | 取值: web(图片及小文件分发)、download(大文件下载加速)、video(视音频点播加速)。 |
Sources | String | 否 | 是 | 回源地址列表。示例值:[{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80,"weight":"15"}] 。
|
无。 |
CheckUrl | String | 否 | 否 | 检测URL。示例值:www.yourdomain.com/test.html 。
|
无。 |
DomainName | String | 是 | 否 | 需要接入CDN的域名。示例值:a.com 。
|
支持泛域名。以符号. 开头。
|
ResourceGroupId | String | 否 | 是 | 资源组ID。 | 无。 |
Scope | String | 否 | 否 | 作用域。 | 只有当国际用户或中国内地L3及以上级别的用户设置此参数时,此参数生效。取值:domestic、overseas、global。默认值: domestic。 |
TopLevelDomain | String | 否 | 是 | 顶级接入域。 | 示例:www.yourTopLevelDomain。 |
返回值
Fn::GetAtt
- DomainName:接入CDN的域名。
- Cname:CDN域名的别名。向DNS提供CNAME,以便将CDN域名映射到CNAME。
示例
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"Domain": {
"Type": "ALIYUN::CDN::Domain",
"Properties": {
"CdnType": {
"Ref": "CdnType"
},
"Sources": {
"Ref": "Sources"
},
"CheckUrl": {
"Ref": "CheckUrl"
},
"DomainName": {
"Ref": "DomainName"
},
"ResourceGroupId": {
"Ref": "ResourceGroupId"
},
"Scope": {
"Ref": "Scope"
},
"TopLevelDomain": {
"Ref": "TopLevelDomain"
}
}
}
},
"Parameters": {
"CdnType": {
"Type": "String",
"Description": "The business type. Valid values: web, download, video, livestream, and httpsdelivery. web: acceleration of images and small files download. download: acceleration of large file downloads. video: live streaming acceleration. httpsdelivery: SSL acceleration for HTTPS.",
"AllowedValues": [
"video",
"download",
"web",
"liveStream"
]
},
"Sources": {
"Type": "String",
"Description": "The list of origin URLs."
},
"CheckUrl": {
"Type": "String",
"Description": "The validation of the origin."
},
"DomainName": {
"Type": "String",
"Description": "The CDN domain name. Wildcard domain names that start with periods (.) are supported. For example, .a.com."
},
"ResourceGroupId": {
"Type": "String",
"Description": "The ID of the resource group. If this is left blank, the system automatically fills in the ID of the default resource group."
},
"Scope": {
"Type": "String",
"Description": "Valid values: domestic, overseas, and global. Default value: domestic. The setting is supported for users outside mainland China, users in mainland China of level 3 or above."
},
"TopLevelDomain": {
"Type": "String",
"Description": "The top-level domain, which can only be configured by users on the whitelist."
}
},
"Outputs": {
"DomainName": {
"Description": "The CDN domain name. Wildcard domain names that start with periods (.) are supported. For example, .a.com.",
"Value": {
"Fn::GetAtt": [
"Domain",
"DomainName"
]
}
}
}
}