すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::DEVOPS::VariableGroup

最終更新日:Mar 17, 2025

ALIYUN::DEVOPS::VariableGroup は、変数グループを作成するために使用されます。

構文

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

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Variables

List

はい

はい

JSON 形式の変数。

isEncrypted、name、および value フィールドで構成される JSON 文字列。 name フィールドは変数名を指定し、value フィールドは変数値を指定します。例:

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

詳細については、「変数プロパティ」をご参照ください。

Description

String

いいえ

はい

変数グループの説明。

なし。

OrganizationId

String

はい

いいえ

企業 ID。

企業 ID は String 型です。 Apsara DevOps エンドポイントにアクセスすることで、企業 ID を取得できます。例:

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

Name

String

はい

はい

変数グループの名前。

なし。

Variables 構文

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

Variables プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

isEncrypted

Boolean

はい

いいえ

変数グループを暗号化するかどうかを指定します。

有効な値:

  • true

  • false

name

String

はい

いいえ

変数名。

なし。

value

String

はい

いいえ

変数値。

なし。

戻り値

Fn::GetAtt

VariableGroupId: 変数グループの ID

  • YAML 形式

    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 形式

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