Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::DEVOPS::VariableGroup

Última atualização: Jun 27, 2026

Cria um grupo de variáveis no Apsara DevOps.

Sintaxe

{
  "Type": "ALIYUN::DEVOPS::VariableGroup",
  "Properties": {
    "Variables": List,
    "Description": String,
    "OrganizationId": String,
    "Name": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Variables

List

Sim

Sim

Variáveis em formato JSON.

String JSON composta pelos campos isEncrypted, name e value. O campo name especifica o nome da variável e value define seu valor. Exemplo:

[{"isEncrypted":true,"name":"name1","value":"vaue1"}]

Para mais informações, consulte Propriedades de Variables.

Description

String

Não

Sim

Descrição do grupo de variáveis.

Nenhuma.

OrganizationId

String

Sim

Não

ID da empresa.

Obtenha o ID da empresa no endpoint do Apsara DevOps. Exemplo:

https://devops.aliyun.com/organization/[OrganizationId]

Name

String

Sim

Sim

Nome do grupo de variáveis.

Nenhuma.

Sintaxe de Variables

"Variables": [
  {
    "isEncrypted": Boolean,
    "name": String,
    "value": String
  }
]

Propriedades de Variables

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

isEncrypted

Boolean

Sim

Não

Indica se a variável é criptografada.

Valores válidos:

  • true

  • false

name

String

Sim

Não

Nome da variável.

Nenhuma.

value

String

Sim

Não

Valor da variável.

Nenhuma.

Valores de retorno

Fn::GetAtt

VariableGroupId: ID do grupo de variáveis.

Exemplos

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Name:
        Description:
          en: The name of variable group.
        Type: String
      OrganizationId:
        Description:
          en: Corporate identity, also known as enterprise id, can obtain in cloud effect access links.
        Type: String
        Default: 5ebbc0228123212b59xxxxx
      Variables:
        AssociationProperty: List[Parameter]
        AssociationPropertyMetadata:
          Parameter:
            AssociationPropertyMetadata:
              Parameters:
                isEncrypted:
                  Description:
                    en: Encryption or not.
                  Type: Boolean
                name:
                  Description:
                    en: Name of the variable.
                  Type: String
                value:
                  Description:
                    en: Value of the variable.
                  Type: String
            Type: Json
        Description:
          en: Variables information.
        Type: Json
        Default:
          - isEncrypted: true
            name: name1
            value: vaue1
    Resources:
      VariableGroup:
        Properties:
          Name:
            Ref: Name
          OrganizationId:
            Ref: OrganizationId
          Variables:
            Ref: Variables
        Type: ALIYUN::DEVOPS::VariableGroup
    Outputs:
      VariableGroupId:
        Description: Variable group id.
        Value:
          Fn::GetAtt:
            - VariableGroup
            - VariableGroupId
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Name": {
          "Description": {
            "en": "The name of variable group."
          },
          "Type": "String"
        },
        "OrganizationId": {
          "Description": {
            "en": "Corporate identity, also known as enterprise id, can obtain in cloud effect access links."
          },
          "Type": "String",
          "Default": "5ebbc0228123212b59xxxxx"
        },
        "Variables": {
          "AssociationProperty": "List[Parameter]",
          "AssociationPropertyMetadata": {
            "Parameter": {
              "AssociationPropertyMetadata": {
                "Parameters": {
                  "isEncrypted": {
                    "Description": {
                      "en": "Encryption or not."
                    },
                    "Type": "Boolean"
                  },
                  "name": {
                    "Description": {
                      "en": "Name of the variable."
                    },
                    "Type": "String"
                  },
                  "value": {
                    "Description": {
                      "en": "Value of the variable."
                    },
                    "Type": "String"
                  }
                }
              },
              "Type": "Json"
            }
          },
          "Description": {
            "en": "Variables information."
          },
          "Type": "Json",
          "Default": [
            {
              "isEncrypted": true,
              "name": "name1",
              "value": "vaue1"
            }
          ]
        }
      },
      "Resources": {
        "VariableGroup": {
          "Properties": {
            "Name": {
              "Ref": "Name"
            },
            "OrganizationId": {
              "Ref": "OrganizationId"
            },
            "Variables": {
              "Ref": "Variables"
            }
          },
          "Type": "ALIYUN::DEVOPS::VariableGroup"
        }
      },
      "Outputs": {
        "VariableGroupId": {
          "Description": "Variable group id.",
          "Value": {
            "Fn::GetAtt": [
              "VariableGroup",
              "VariableGroupId"
            ]
          }
        }
      }
    }