ALIYUN::ALB::ZoneShift类型用于ALB可用区切换。
语法
{
"Type": "ALIYUN::ALB::ZoneShift",
"Properties": {
"LoadBalancerId": String,
"ZoneMappings": List
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
LoadBalancerId |
String |
是 |
否 |
负载均衡器的ID。 |
无 |
|
ZoneMappings |
List |
是 |
否 |
可用区映射列表。 |
长度限制:1,更多信息,请参考ZoneMappings属性。 |
ZoneMappings语法
"ZoneMappings": [
{
"ZoneId": String,
"VSwitchId": String
}
]
ZoneMappings属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
VSwitchId |
String |
是 |
否 |
交换机的ID。 |
无 |
|
ZoneId |
String |
是 |
否 |
可用区ID。 |
无 |
返回值
Fn::GetAtt
无
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
LoadBalancerId:
Type: String
Description:
en: The ID of the load balancer.
zh: 负载均衡器的ID。
Required: true
ZoneMappings:
AssociationPropertyMetadata:
Parameters:
ZoneId:
AssociationProperty: ZoneId
Type: String
Description:
en: The ID of the zone.
zh: 可用区ID。
Required: true
VSwitchId:
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
Type: String
Description:
en: The ID of the vSwitch.
zh: 交换机的ID。
Required: true
AssociationProperty: List[Parameters]
Type: Json
Description:
en: The list of zone mappings. Each element contains VSwitchId and ZoneId.
zh: 可用区映射列表。每个元素包含VSwitchId和ZoneId。
Required: true
MinLength: 1
MaxLength: 1
Resources:
ZoneShift:
Type: ALIYUN::ALB::ZoneShift
Properties:
LoadBalancerId:
Ref: LoadBalancerId
ZoneMappings:
Ref: ZoneMappings
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"LoadBalancerId": {
"Type": "String",
"Description": {
"en": "The ID of the load balancer.",
"zh": "负载均衡器的ID。"
},
"Required": true
},
"ZoneMappings": {
"AssociationPropertyMetadata": {
"Parameters": {
"ZoneId": {
"AssociationProperty": "ZoneId",
"Type": "String",
"Description": {
"en": "The ID of the zone.",
"zh": "可用区ID。"
},
"Required": true
},
"VSwitchId": {
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"Type": "String",
"Description": {
"en": "The ID of the vSwitch.",
"zh": "交换机的ID。"
},
"Required": true
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "The list of zone mappings. Each element contains VSwitchId and ZoneId.",
"zh": "可用区映射列表。每个元素包含VSwitchId和ZoneId。"
},
"Required": true,
"MinLength": 1,
"MaxLength": 1
}
},
"Resources": {
"ZoneShift": {
"Type": "ALIYUN::ALB::ZoneShift",
"Properties": {
"LoadBalancerId": {
"Ref": "LoadBalancerId"
},
"ZoneMappings": {
"Ref": "ZoneMappings"
}
}
}
}
}
该文章对您有帮助吗?