Creates a resource group.
Operation description
Each Alibaba Cloud account supports up to 30 resource groups.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The unique identifier of the resource group. Must be 2 to 50 characters long and can contain letters, digits, and hyphens (-). Must start with a letter. |
my-project |
| DisplayName |
string |
Yes |
The display name of the resource group. Must be 1 to 50 characters long. |
my-project |
| Tag |
array<object> |
No |
The tags to attach to the resource group. |
|
|
object |
No |
A tag object. |
||
| Key |
string |
No |
The tag key. Up to 128 characters. Cannot start with |
k1 |
| Value |
string |
No |
The tag value. Up to 128 characters. Cannot start with |
v1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
The request ID. |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| ResourceGroup |
object |
The resource group details. |
|
| AccountId |
string |
The Alibaba Cloud account ID that owns the resource group. |
151266687691**** |
| CreateDate |
string |
The time when the resource group was created, in UTC. |
2021-06-05T14:39:13+08:00 |
| DisplayName |
string |
The display name of the resource group. |
my-project |
| Id |
string |
The ID of the resource group. |
rg-9gLOoK**** |
| Name |
string |
The unique identifier of the resource group. |
my-project |
| RegionStatuses |
object |
The resource group status across all regions. |
|
| RegionStatus |
array<object> |
The resource group status per region. |
|
|
object |
The resource group status per region. |
||
| RegionId |
string |
The region ID. |
cn-qingdao |
| Status |
string |
The resource group status. Valid values:
|
Creating |
| Status |
string |
The status of the resource group. Valid values:
|
Creating |
Examples
Success response
JSON format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"ResourceGroup": {
"AccountId": "151266687691****",
"CreateDate": "2021-06-05T14:39:13+08:00",
"DisplayName": "my-project",
"Id": "rg-9gLOoK****",
"Name": "my-project",
"RegionStatuses": {
"RegionStatus": [
{
"RegionId": "cn-qingdao",
"Status": "Creating"
}
]
},
"Status": "Creating"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.Name.InvalidChars | The Name is invalid. | The Name is invalid. |
| 400 | InvalidParameter.Name.Length | The maximum length of Name is exceeded. | The maximum length of Name is exceeded. |
| 400 | InvalidParameter.DisplayName.Length | The maximum length of DisplayName is exceeded. | The maximum length of DisplayName is exceeded. |
| 400 | MissingParameter.DisplayName | You must specify DisplayName. | You must specify the parameter DisplayName. |
| 400 | InvalidParameter.DisplayName | The DisplayName is invalid. | The DisplayName is invalid. |
| 409 | LimitExceeded.ResourceGroup | The count of resource groups beyond the current limits. | The maximum number of resource group is exceeded. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.