The ALIYUN::DNS::CacheDomain resource creates a DNS cache domain.
Syntax
{
"Type": "ALIYUN::DNS::CacheDomain",
"Properties": {
"CacheTtlMin": Integer,
"CacheTtlMax": Integer,
"DomainName": String,
"InstanceId": String,
"SourceEdns": String,
"SourceProtocol": String,
"SourceDnsServer": List,
"Remark": String
}
}
Properties
|
Parameter |
Type |
Required |
Update allowed |
Description |
Constraints |
|
CacheTtlMax |
Integer |
Yes |
Yes |
The maximum TTL value of a cached record. |
Valid range: 30 to 86400. |
|
CacheTtlMin |
Integer |
Yes |
Yes |
The minimum TTL value of a cached record. |
Valid range: 30 to 86400. |
|
DomainName |
String |
Yes |
No |
The domain name of the DNS cache domain. |
None |
|
InstanceId |
String |
Yes |
Yes |
The instance ID associated with the DNS cache domain. |
None |
|
SourceDnsServer |
List |
Yes |
Yes |
A list of source DNS servers. |
Maximum of 100 items. For more information, see SourceDnsServer properties. |
|
SourceEdns |
String |
Yes |
Yes |
Specifies whether to enable EDNS for the source DNS server. |
Allowed values:
|
|
SourceProtocol |
String |
Yes |
Yes |
The protocol used by the source DNS server. |
Allowed values:
|
|
Remark |
String |
No |
Yes |
The remark for the DNS cache domain. |
None |
SourceDnsServer syntax
"SourceDnsServer": [
{
"Port": String,
"Host": String
}
]
SourceDnsServer properties
|
Parameter |
Type |
Required |
Update allowed |
Description |
Constraints |
|
Host |
String |
Yes |
No |
The host of the source DNS server. |
None |
|
Port |
String |
Yes |
No |
The port of the source DNS server. |
None |
Return values
Fn::GetAtt
DomainName: The domain name of the DNS cache domain.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SourceEdns:
Type: String
Description:
en: Whether to enable EDNS for the source DNS server.
zh: 是否为源DNS服务器启用EDNS。
AllowedValues:
- NOT_SUPPORT
- SUPPORT
Required: true
DomainName:
Type: String
Description:
en: The domain name of the DNS cache domain.
zh: DNS缓存域的域名。
Required: true
InstanceId:
Type: String
Description:
en: The instance ID associated with the DNS cache domain.
zh: 与DNS缓存域关联的实例ID。
Required: true
SourceProtocol:
Type: String
Description:
en: The protocol used by the source DNS server.
zh: 源DNS服务器使用的协议。
AllowedValues:
- UDP
- TCP
Required: true
SourceDnsServer:
AssociationPropertyMetadata:
Parameters:
Port:
Type: String
Description:
en: The port of the source DNS server.
zh: 源DNS服务器的端口。
Required: true
Host:
Type: String
Description:
en: The host of the source DNS server.
zh: 源DNS服务器的主机。
Required: true
AssociationProperty: List[Parameters]
Type: Json
Description:
en: A list of source DNS servers.
zh: 源DNS服务器列表。
Required: true
MaxLength: 100
CacheTtlMin:
Type: Number
Description:
en: The minimum TTL value of a cached record.
zh: 缓存记录的最小TTL值。
Required: true
MinValue: 30
MaxValue: 86400
CacheTtlMax:
Type: Number
Description:
en: The maximum TTL value of a cached record.
zh: 缓存记录的最大TTL值。
Required: true
MinValue: 30
MaxValue: 86400
Resources:
CacheDomain:
Type: ALIYUN::DNS::CacheDomain
Properties:
SourceEdns:
Ref: SourceEdns
DomainName:
Ref: DomainName
InstanceId:
Ref: InstanceId
SourceProtocol:
Ref: SourceProtocol
SourceDnsServer:
Ref: SourceDnsServer
CacheTtlMin:
Ref: CacheTtlMin
CacheTtlMax:
Ref: CacheTtlMax
Outputs:
DomainName:
Description:
en: The domain name of the DNS cache domain.
zh: DNS缓存的域名。
Value:
Fn::GetAtt:
- CacheDomain
- DomainName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SourceEdns": {
"Type": "String",
"Description": {
"en": "Whether to enable EDNS for the source DNS server.",
"zh": "是否为源DNS服务器启用EDNS。"
},
"AllowedValues": [
"NOT_SUPPORT",
"SUPPORT"
],
"Required": true
},
"DomainName": {
"Type": "String",
"Description": {
"en": "The domain name of the DNS cache domain.",
"zh": "DNS缓存域的域名。"
},
"Required": true
},
"InstanceId": {
"Type": "String",
"Description": {
"en": "The instance ID associated with the DNS cache domain.",
"zh": "与DNS缓存域关联的实例ID。"
},
"Required": true
},
"SourceProtocol": {
"Type": "String",
"Description": {
"en": "The protocol used by the source DNS server.",
"zh": "源DNS服务器使用的协议。"
},
"AllowedValues": [
"UDP",
"TCP"
],
"Required": true
},
"SourceDnsServer": {
"AssociationPropertyMetadata": {
"Parameters": {
"Port": {
"Type": "String",
"Description": {
"en": "The port of the source DNS server.",
"zh": "源DNS服务器的端口。"
},
"Required": true
},
"Host": {
"Type": "String",
"Description": {
"en": "The host of the source DNS server.",
"zh": "源DNS服务器的主机。"
},
"Required": true
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "A list of source DNS servers.",
"zh": "源DNS服务器列表。"
},
"Required": true,
"MaxLength": 100
},
"CacheTtlMin": {
"Type": "Number",
"Description": {
"en": "The minimum TTL value of a cached record.",
"zh": "缓存记录的最小TTL值。"
},
"Required": true,
"MinValue": 30,
"MaxValue": 86400
},
"CacheTtlMax": {
"Type": "Number",
"Description": {
"en": "The maximum TTL value of a cached record.",
"zh": "缓存记录的最大TTL值。"
},
"Required": true,
"MinValue": 30,
"MaxValue": 86400
}
},
"Resources": {
"CacheDomain": {
"Type": "ALIYUN::DNS::CacheDomain",
"Properties": {
"SourceEdns": {
"Ref": "SourceEdns"
},
"DomainName": {
"Ref": "DomainName"
},
"InstanceId": {
"Ref": "InstanceId"
},
"SourceProtocol": {
"Ref": "SourceProtocol"
},
"SourceDnsServer": {
"Ref": "SourceDnsServer"
},
"CacheTtlMin": {
"Ref": "CacheTtlMin"
},
"CacheTtlMax": {
"Ref": "CacheTtlMax"
}
}
}
},
"Outputs": {
"DomainName": {
"Description": {
"en": "The domain name of the DNS cache domain.",
"zh": "DNS缓存的域名。"
},
"Value": {
"Fn::GetAtt": [
"CacheDomain",
"DomainName"
]
}
}
}
}