全部產品
Search
文件中心

:ALIYUN::ResourceManager::ResourceGroup

更新時間:Feb 06, 2026

ALIYUN::ResourceManager::ResourceGroup類型用於建立資源群組。

文法

{
  "Type": "ALIYUN::ResourceManager::ResourceGroup",
  "Properties": {
    "DisplayName": String,
    "Name": String,
    "Tags": List
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

DisplayName

String

資源群組顯示名稱。

長度為1~30個字元,可包含漢字、英文字母、數字和短劃線(-)。

Name

String

資源群組唯一標識。

長度為3~12個字元,必須以英文字母開頭。可包含英文字母、數字和短劃線(-)。

Tags

List

標籤。

更多資訊,請參見Tags屬性

Tags文法

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

Tags屬性

屬性名稱

類型

必須

允許更新

描述

約束

Key

String

標籤鍵。

Value

String

標籤值。

傳回值

Fn::GetAtt

  • RegionStatuses:各個地區的資源群組狀態。

  • AccountId:資源群組所屬的阿里雲帳號ID。

  • DisplayName:資源群組顯示名稱。

  • Id:資源群組ID。

  • Name:資源群組唯一標識。

  • ResourceGroupId:資源群組 ID 。

樣本

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DisplayName": {
      "Type": "String",
      "Description": "The display name of the resource group"
    },
    "Name": {
      "Type": "String",
      "Description": "The unique identifier of the resource group"
    }
  },
  "Resources": {
    "ResourceManagerResourceGroup": {
      "Type": "ALIYUN::ResourceManager::ResourceGroup",
      "Properties": {
        "DisplayName": {
          "Ref": "DisplayName"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "RegionStatuses": {
      "Description": "The status of the resource group in all regions",
      "Value": {
        "Fn::GetAtt": [
          "ResourceManagerResourceGroup",
          "RegionStatuses"
        ]
      }
    },
    "AccountId": {
      "Description": "The ID of the Alibaba Cloud account to which the resource group belongs",
      "Value": {
        "Fn::GetAtt": [
          "ResourceManagerResourceGroup",
          "AccountId"
        ]
      }
    },
    "DisplayName": {
      "Description": "The display name of the resource group",
      "Value": {
        "Fn::GetAtt": [
          "ResourceManagerResourceGroup",
          "DisplayName"
        ]
      }
    },
    "Id": {
      "Description": "The ID of the resource group",
      "Value": {
        "Fn::GetAtt": [
          "ResourceManagerResourceGroup",
          "Id"
        ]
      }
    },
    "Name": {
      "Description": "The unique identifier of the resource group",
      "Value": {
        "Fn::GetAtt": [
          "ResourceManagerResourceGroup",
          "Name"
        ]
      }
    }
  }
}
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
 DisplayName:
  Type: String
  Description: The display name of the resource group
 Name:
  Type: String
  Description: The unique identifier of the resource group
Resources:
 ResourceManagerResourceGroup:
  Type: 'ALIYUN::ResourceManager::ResourceGroup'
  Properties:
   DisplayName:
    Ref: DisplayName
   Name:
    Ref: Name
Outputs:
 RegionStatuses:
  Description: The status of the resource group in all regions
  Value:
   'Fn::GetAtt':
    - ResourceManagerResourceGroup
    - RegionStatuses
 AccountId:
  Description: The ID of the Alibaba Cloud account to which the resource group belongs
  Value:
   'Fn::GetAtt':
    - ResourceManagerResourceGroup
    - AccountId
 DisplayName:
  Description: The display name of the resource group
  Value:
   'Fn::GetAtt':
    - ResourceManagerResourceGroup
    - DisplayName
 Id:
  Description: The ID of the resource group
  Value:
   'Fn::GetAtt':
    - ResourceManagerResourceGroup
    - Id
 Name:
  Description: The unique identifier of the resource group
  Value:
   'Fn::GetAtt':
    - ResourceManagerResourceGroup
    - Name