Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::ESS::VServerGroupAttachment

Última atualização: Jun 27, 2026

O recurso ALIYUN::ESS::VServerGroupAttachment associa grupos de servidores virtuais (vServer groups) de uma instância do Server Load Balancer (SLB) a um grupo de dimensionamento.

Sintaxe

{
  "Type": "ALIYUN::ESS::VServerGroupAttachment",
  "Properties": {
    "ScalingGroupId": String,
    "ForceAttach": Boolean,
    "VServerGroups": List
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

ScalingGroupId

String

Sim

Não

ID do grupo de dimensionamento.

Nenhuma.

ForceAttach

Boolean

Não

Não

Indica se as instâncias ECS do grupo de dimensionamento devem ser adicionadas ao grupo de servidores virtuais.

Valores válidos:

  • true

  • false (padrão)

VServerGroups

List

Sim

Sim

Grupos de servidores virtuais a associar.

Propriedades de VServerGroups.

Sintaxe de VServerGroups

"VServerGroups": [
  {
    "LoadBalancerId": String,
    "VServerGroupAttributes": List
  }
]

Propriedades de VServerGroups

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

LoadBalancerId

String

Sim

Não

ID da instância SLB.

Nenhuma.

VServerGroupAttributes

List

Sim

Não

Atributos do grupo de servidores virtuais.

Propriedades de VServerGroupAttributes.

Sintaxe de VServerGroupAttributes

"VServerGroupAttributes": [
  {
    "VServerGroupId": String,
    "Port": Integer,
    "Weight": Integer
  }
]

Propriedades de VServerGroupAttributes

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

VServerGroupId

String

Sim

Não

ID do grupo de servidores virtuais.

Nenhuma.

Port

Integer

Sim

Não

Porta que o Auto Scaling usa para adicionar instâncias ECS ao grupo de servidores virtuais.

Valores válidos: 1 a 65535.

Weight

Integer

Não

Não

Peso das instâncias ECS que o Auto Scaling adiciona ao grupo de servidores virtuais.

Valores válidos: 0 a 100.

Valor padrão: 50.

Valores de retorno

Fn::GetAtt

ScalingGroupId: ID do grupo de dimensionamento.

Exemplos

  • YAML formato

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ForceAttach:
        Description:
          en: 'If instances of scaling group are attached/removed from slb backend server
            when attach/detach vserver group from scaling group.
    
            Valid values:
    
            true
    
            false
    
            Default value: false.'
        Required: false
        Type: Boolean
      ScalingGroupId:
        Description:
          en: The ID of the scaling group.
        Required: true
        Type: String
      VServerGroups:
        AssociationProperty: List[Parameter]
        AssociationPropertyMetadata:
          Parameter:
            AssociationPropertyMetadata:
              Parameters:
                LoadBalancerId:
                  Description:
                    en: Load balancer server ID of VServer Group.
                  Required: true
                  Type: String
                VServerGroupAttributes:
                  AssociationProperty: List[Parameters]
                  AssociationPropertyMetadata:
                    Parameters:
                      Port:
                        Description:
                          en: The port will be used for VServer Group backend server.
                        MaxValue: 65535
                        MinValue: 0
                        Required: true
                        Type: Number
                      VServerGroupId:
                        Description:
                          en: ID of VServer Group.
                        Required: true
                        Type: String
                      Weight:
                        Description:
                          en: 'The weight of an ECS instance attached to the VServer Group.
    
                            Default value: 50.'
                        MaxValue: 100
                        MinValue: 0
                        Required: false
                        Type: Number
                  Description:
                    en: A list of VServer Group attributes.
                  MaxLength: 5
                  MinLength: 1
                  Required: true
                  Type: Json
            Required: false
            Type: Json
        Description:
          en: A list of vserver groups attached on scaling group
        MaxLength: 5
        MinLength: 1
        Required: true
        Type: Json
    Resources:
      VServerGroupAttachment:
        Properties:
          ForceAttach:
            Ref: ForceAttach
          ScalingGroupId:
            Ref: ScalingGroupId
          VServerGroups:
            Ref: VServerGroups
        Type: ALIYUN::ESS::VServerGroupAttachment
    Outputs:
      ScalingGroupId:
        Description: The ID of the scaling group.
        Value:
          Fn::GetAtt:
          - VServerGroupAttachment
          - ScalingGroupId
                            
  • JSON formato

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ScalingGroupId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the scaling group."
          },
          "Required": true
        },
        "ForceAttach": {
          "Type": "Boolean",
          "Description": {
            "en": "If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group.\nValid values:\ntrue\nfalse\nDefault value: false."
          },
          "Required": false
        },
        "VServerGroups": {
          "AssociationPropertyMetadata": {
            "Parameter": {
              "AssociationPropertyMetadata": {
                "Parameters": {
                  "LoadBalancerId": {
                    "Type": "String",
                    "Description": {
                      "en": "Load balancer server ID of VServer Group."
                    },
                    "Required": true
                  },
                  "VServerGroupAttributes": {
                    "AssociationPropertyMetadata": {
                      "Parameters": {
                        "VServerGroupId": {
                          "Type": "String",
                          "Description": {
                            "en": "ID of VServer Group."
                          },
                          "Required": true
                        },
                        "Port": {
                          "Type": "Number",
                          "Description": {
                            "en": "The port will be used for VServer Group backend server."
                          },
                          "Required": true,
                          "MinValue": 0,
                          "MaxValue": 65535
                        },
                        "Weight": {
                          "Type": "Number",
                          "Description": {
                            "en": "The weight of an ECS instance attached to the VServer Group.\nDefault value: 50."
                          },
                          "Required": false,
                          "MinValue": 0,
                          "MaxValue": 100
                        }
                      }
                    },
                    "AssociationProperty": "List[Parameters]",
                    "Type": "Json",
                    "Description": {
                      "en": "A list of VServer Group attributes."
                    },
                    "Required": true,
                    "MinLength": 1,
                    "MaxLength": 5
                  }
                }
              },
              "Type": "Json",
              "Required": false
            }
          },
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "Description": {
            "en": "A list of vserver groups attached on scaling group"
          },
          "Required": true,
          "MinLength": 1,
          "MaxLength": 5
        }
      },
      "Resources": {
        "VServerGroupAttachment": {
          "Type": "ALIYUN::ESS::VServerGroupAttachment",
          "Properties": {
            "ScalingGroupId": {
              "Ref": "ScalingGroupId"
            },
            "ForceAttach": {
              "Ref": "ForceAttach"
            },
            "VServerGroups": {
              "Ref": "VServerGroups"
            }
          }
        }
      },
      "Outputs": {
        "ScalingGroupId": {
          "Description": "The ID of the scaling group.",
          "Value": {
            "Fn::GetAtt": [
              "VServerGroupAttachment",
              "ScalingGroupId"
            ]
          }
        }
      }
    }