ALIYUN::ALB::StartZone

更新时间:
复制为 MD 格式

ALIYUN::ALB::StartZone类型用于绑定负载均衡可用区

语法

{
  "Type": "ALIYUN::ALB::StartZone",
  "Properties": {
    "LoadBalancerId": String,
    "ZoneMappings": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

LoadBalancerId

String

ALB实例的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 ALB instance.
      zh: ALB实例的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 in the zone.
            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:
  LoadBalancerZoneAttachment:
    Type: ALIYUN::ALB::StartZone
    Properties:
      LoadBalancerId:
        Ref: LoadBalancerId
      ZoneMappings:
        Ref: ZoneMappings
                        {
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "LoadBalancerId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the ALB instance.",
        "zh": "ALB实例的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 in the zone.",
              "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": {
    "LoadBalancerZoneAttachment": {
      "Type": "ALIYUN::ALB::StartZone",
      "Properties": {
        "LoadBalancerId": {
          "Ref": "LoadBalancerId"
        },
        "ZoneMappings": {
          "Ref": "ZoneMappings"
        }
      }
    }
  }
}