ALIYUN::ALB::ZoneShift

更新时间:
复制为 MD 格式

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"
        }
      }
    }
  }
}