ALIYUN::DNS::CustomLine类型用于给域名添加自定义线路。
语法
{
"Type": "ALIYUN::DNS::CustomLine",
"Properties": {
"DomainName": String,
"IpSegment": List,
"LineName": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
DomainName |
String |
是 |
否 |
与自定义线路关联的域名。 |
无 |
|
IpSegment |
List |
是 |
否 |
自定义线路的IP段列表。 |
长度限制:最小1,最大500。更多信息,请参考IpSegment属性。 |
|
LineName |
String |
是 |
是 |
自定义线路的名称。 |
无 |
IpSegment语法
"IpSegment": [
{
"StartIp": String,
"EndIp": String
}
]
IpSegment属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
EndIp |
String |
否 |
否 |
IP段的结束IP地址。 |
无 |
|
StartIp |
String |
否 |
否 |
IP段的起始IP地址。 |
无 |
返回值
Fn::GetAtt
LineId:自定义线路的ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DomainName:
Type: String
Description:
en: The domain name associated with the custom line.
zh: 与自定义线路关联的域名。
Required: true
IpSegment:
AssociationPropertyMetadata:
Parameters:
StartIp:
Type: String
Description:
en: The start IP address of the segment.
zh: IP段的起始IP地址。
Required: false
EndIp:
Type: String
Description:
en: The end IP address of the segment.
zh: IP段的结束IP地址。
Required: false
AssociationProperty: List[Parameters]
Type: Json
Description:
en: The list of IP segments for the custom line.
zh: 自定义线路的IP段列表。
Required: true
MinLength: 1
MaxLength: 500
LineName:
Type: String
Description:
en: The name of the custom line.
zh: 自定义线路的名称。
Required: true
Resources:
CustomLine:
Type: ALIYUN::DNS::CustomLine
Properties:
DomainName:
Ref: DomainName
IpSegment:
Ref: IpSegment
LineName:
Ref: LineName
Outputs:
LineId:
Description:
en: The ID of the custom line.
zh: 自定义线路的ID。
Value:
Fn::GetAtt:
- CustomLine
- LineId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DomainName": {
"Type": "String",
"Description": {
"en": "The domain name associated with the custom line.",
"zh": "与自定义线路关联的域名。"
},
"Required": true
},
"IpSegment": {
"AssociationPropertyMetadata": {
"Parameters": {
"StartIp": {
"Type": "String",
"Description": {
"en": "The start IP address of the segment.",
"zh": "IP段的起始IP地址。"
},
"Required": false
},
"EndIp": {
"Type": "String",
"Description": {
"en": "The end IP address of the segment.",
"zh": "IP段的结束IP地址。"
},
"Required": false
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "The list of IP segments for the custom line.",
"zh": "自定义线路的IP段列表。"
},
"Required": true,
"MinLength": 1,
"MaxLength": 500
},
"LineName": {
"Type": "String",
"Description": {
"en": "The name of the custom line.",
"zh": "自定义线路的名称。"
},
"Required": true
}
},
"Resources": {
"CustomLine": {
"Type": "ALIYUN::DNS::CustomLine",
"Properties": {
"DomainName": {
"Ref": "DomainName"
},
"IpSegment": {
"Ref": "IpSegment"
},
"LineName": {
"Ref": "LineName"
}
}
}
},
"Outputs": {
"LineId": {
"Description": {
"en": "The ID of the custom line.",
"zh": "自定义线路的ID。"
},
"Value": {
"Fn::GetAtt": [
"CustomLine",
"LineId"
]
}
}
}
}
该文章对您有帮助吗?