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