Todos os produtos
Search
Central de documentação

:ALIYUN::GWLB::LoadBalancer

Última atualização: Jun 27, 2026

O tipo ALIYUN::GWLB::LoadBalancer cria uma instância de Gateway Load Balancer (GWLB).

Sintaxe

{
  "Type": "ALIYUN::GWLB::LoadBalancer",
  "Properties": {
    "VpcId": String,
    "ZoneMappings": List,
    "AddressIpVersion": String,
    "LoadBalancerName": String,
    "ResourceGroupId": String,
    "Tags": List
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Atualização permitida

Descrição

Restrições

VpcId

String

Sim

Não

ID da Virtual Private Cloud (VPC).

Nenhuma

ZoneMappings

List

Sim

Sim

Lista de mapeamentos entre zonas e vSwitches.

Adicione pelo menos uma zona. O limite máximo é de 20 zonas. Se a região atual oferecer suporte a duas ou mais zonas, adicione pelo menos duas. Para obter mais informações, consulte a propriedade ZoneMappings.

AddressIpVersion

String

Não

Não

Versão do protocolo.

Valor válido:

  • Ipv4 (padrão): IPv4.

LoadBalancerName

String

Não

Sim

Nome da instância do Gateway Load Balancer (GWLB).

O nome deve ter de 2 a 128 caracteres e começar com uma letra ou caractere chinês. Pode conter dígitos, pontos (.), sublinhados (_) e hifens (-).

ResourceGroupId

String

Não

Não

ID do grupo de recursos.

Nenhuma

Tags

List

Não

Sim

Lista de tags associadas à instância do SLB.

Para obter mais informações, consulte a propriedade Tags.

Sintaxe de ZoneMappings

"ZoneMappings": [
  {
    "ZoneId": String,
    "VSwitchId": String
  }
]

Propriedades de ZoneMappings

Propriedade

Tipo

Obrigatória

Atualização permitida

Descrição

Restrições

VSwitchId

String

Sim

Sim

vSwitch correspondente à zona.

Cada zona aceita apenas um vSwitch e uma sub-rede.

ZoneId

String

Sim

Sim

ID da zona.

Nenhuma

Sintaxe de Tags

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Propriedades de Tags

Propriedade

Tipo

Obrigatória

Atualização permitida

Descrição

Restrições

Key

String

Sim

Não

Chave da tag.

O valor não pode ser uma string vazia.

A chave da tag pode ter até 128 caracteres. Não deve começar com aliyun ou acs:. Não pode conter http:// nem https://.

Value

String

Não

Não

Valor da tag.

O valor da tag pode ter até 256 caracteres. Não pode conter http:// nem https://.

Valores de retorno

Fn::GetAtt

  • LoadBalancerName: nome da instância do Gateway Load Balancer.

  • AddressIpVersion: versão do protocolo IP.

  • VpcId: ID da VPC.

  • ResourceGroupId: ID do grupo de recursos.

  • CreateTime: hora de criação da instância GWLB.

  • LoadBalancerId: ID da instância GWLB.

  • ZoneMappings: lista de mapeamentos entre zonas e vSwitches.

  • BusinessStatus: status de serviço da instância do pool de endereços IP.

  • Tags: lista de tags.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      en: The ID of the VPC to which the Gateway Load Balancer instance belongs.
    Required: true
  ZoneMappings:
    AssociationPropertyMetadata:
      Parameters:
        ZoneId:
          AssociationProperty: ZoneId
          Type: String
          Description:
            en: The ID of the zone to which the Gateway Load Balancer instance belongs.
          Required: true
        VSwitchId:
          AssociationPropertyMetadata:
            VpcId: ${VpcId}
            ZoneId: ${ZoneId}
          AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
          Type: String
          Description:
            en: The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet.
          Required: true
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: The list of zone and vSwitch mappings. You must add at least one zone. You can add a maximum of 20 zones. If the current region supports two or more zones, add two or more zones.
    Required: true
    MinLength: 1
    MaxLength: 20
Resources:
  ExtensionResource:
    Type: ALIYUN::GWLB::LoadBalancer
    Properties:
      VpcId:
        Ref: VpcId
      ZoneMappings:
        Ref: ZoneMappings
Outputs:
  LoadBalancerName:
    Description: The name of the Gateway Load Balancer instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LoadBalancerName
  AddressIpVersion:
    Description: The protocol version.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AddressIpVersion
  VpcId:
    Description: The ID of the VPC to which the Gateway Load Balancer instance belongs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VpcId
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceGroupId
  CreateTime:
    Description: The resource creation time, in Greenwich Mean Time, in the format of **yyyy-MM-ddTHH:mm:ssZ**.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  LoadBalancerId:
    Description: The ID of the Gateway Load Balancer instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LoadBalancerId
  ZoneMappings:
    Description: The list of zone and vSwitch mappings. You must add at least one zone. You can add a maximum of 20 zones. If the current region supports two or more zones, add two or more zones.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ZoneMappings
  BusinessStatus:
    Description: The business status of the Gateway Load Balancer instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - BusinessStatus
  Tags:
    Description: The list of tags.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Tags
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "en": "The ID of the VPC to which the Gateway Load Balancer instance belongs."
      },
      "Required": true
    },
    "ZoneMappings": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "ZoneId": {
            "AssociationProperty": "ZoneId",
            "Type": "String",
            "Description": {
              "en": "The ID of the zone to which the Gateway Load Balancer instance belongs."
            },
            "Required": true
          },
          "VSwitchId": {
            "AssociationPropertyMetadata": {
              "VpcId": "${VpcId}",
              "ZoneId": "${ZoneId}"
            },
            "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
            "Type": "String",
            "Description": {
              "en": "The ID of the vSwitch that corresponds to the zone. Each zone can use only one vSwitch and subnet."
            },
            "Required": true
          }
        }
      },
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "The list of zone and vSwitch mappings. You must add at least one zone. You can add a maximum of 20 zones. If the current region supports two or more zones, add two or more zones."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 20
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::GWLB::LoadBalancer",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "ZoneMappings": {
          "Ref": "ZoneMappings"
        }
      }
    }
  },
  "Outputs": {
    "LoadBalancerName": {
      "Description": "The name of the Gateway Load Balancer instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LoadBalancerName"
        ]
      }
    },
    "AddressIpVersion": {
      "Description": "The protocol version.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AddressIpVersion"
        ]
      }
    },
    "VpcId": {
      "Description": "The ID of the VPC to which the Gateway Load Balancer instance belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VpcId"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceGroupId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The resource creation time, in Greenwich Mean Time, in the format of **yyyy-MM-ddTHH:mm:ssZ**.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "LoadBalancerId": {
      "Description": "The ID of the Gateway Load Balancer instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LoadBalancerId"
        ]
      }
    },
    "ZoneMappings": {
      "Description": "The list of zone and vSwitch mappings. You must add at least one zone. You can add a maximum of 20 zones. If the current region supports two or more zones, add two or more zones.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ZoneMappings"
        ]
      }
    },
    "BusinessStatus": {
      "Description": "The business status of the Gateway Load Balancer instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "BusinessStatus"
        ]
      }
    },
    "Tags": {
      "Description": "The list of tags.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Tags"
        ]
      }
    }
  }
}