ALIYUN::DNS::CacheDomain类型用于添加 DNS 权威代理域名。
语法
{
"Type": "ALIYUN::DNS::CacheDomain",
"Properties": {
"CacheTtlMin": Integer,
"CacheTtlMax": Integer,
"DomainName": String,
"InstanceId": String,
"SourceEdns": String,
"SourceProtocol": String,
"SourceDnsServer": List,
"Remark": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
CacheTtlMax |
Integer |
是 |
是 |
缓存记录的最大TTL值。 |
范围限制:最小30,最大86400 |
|
CacheTtlMin |
Integer |
是 |
是 |
缓存记录的最小TTL值。 |
范围限制:最小30,最大86400 |
|
DomainName |
String |
是 |
否 |
DNS缓存域的域名。 |
无 |
|
InstanceId |
String |
是 |
是 |
与DNS缓存域关联的实例ID。 |
无 |
|
SourceDnsServer |
List |
是 |
是 |
源DNS服务器列表。 |
长度限制:最大100。更多信息,请参考SourceDnsServer属性。 |
|
SourceEdns |
String |
是 |
是 |
是否为源DNS服务器启用EDNS。 |
允许值:
|
|
SourceProtocol |
String |
是 |
是 |
源DNS服务器使用的协议。 |
允许值:
|
|
Remark |
String |
否 |
是 |
DNS缓存域的备注。 |
无 |
SourceDnsServer语法
"SourceDnsServer": [
{
"Port": String,
"Host": String
}
]
SourceDnsServer属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Host |
String |
是 |
否 |
源DNS服务器的主机。 |
无 |
|
Port |
String |
是 |
否 |
源DNS服务器的端口。 |
无 |
返回值
Fn::GetAtt
DomainName:DNS缓存的域名。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SourceEdns:
Type: String
Description:
en: Whether EDNS is enabled 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: Port of the source DNS server.
zh: 源DNS服务器的端口。
Required: true
Host:
Type: String
Description:
en: Host of the source DNS server.
zh: 源DNS服务器的主机。
Required: true
AssociationProperty: List[Parameters]
Type: Json
Description:
en: List of source DNS servers.
zh: 源DNS服务器列表。
Required: true
MaxLength: 100
CacheTtlMin:
Type: Number
Description:
en: The minimum TTL value for cached records.
zh: 缓存记录的最小TTL值。
Required: true
MinValue: 30
MaxValue: 86400
CacheTtlMax:
Type: Number
Description:
en: The maximum TTL value for cached records.
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.
zh: DNS缓存的域名。
Value:
Fn::GetAtt:
- CacheDomain
- DomainName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SourceEdns": {
"Type": "String",
"Description": {
"en": "Whether EDNS is enabled 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": "Port of the source DNS server.",
"zh": "源DNS服务器的端口。"
},
"Required": true
},
"Host": {
"Type": "String",
"Description": {
"en": "Host of the source DNS server.",
"zh": "源DNS服务器的主机。"
},
"Required": true
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "List of source DNS servers.",
"zh": "源DNS服务器列表。"
},
"Required": true,
"MaxLength": 100
},
"CacheTtlMin": {
"Type": "Number",
"Description": {
"en": "The minimum TTL value for cached records.",
"zh": "缓存记录的最小TTL值。"
},
"Required": true,
"MinValue": 30,
"MaxValue": 86400
},
"CacheTtlMax": {
"Type": "Number",
"Description": {
"en": "The maximum TTL value for cached records.",
"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.",
"zh": "DNS缓存的域名。"
},
"Value": {
"Fn::GetAtt": [
"CacheDomain",
"DomainName"
]
}
}
}
}
该文章对您有帮助吗?