Creates a resource group.
Operation description
Note
A maximum of 30 resource groups can be created within an Alibaba Cloud account.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Name | string | Yes | The unique identifier of the resource group. It must be 2 to 50 characters in length and can contain letters, digits, and hyphens (-). It must start with a letter. | my-project |
| DisplayName | string | Yes | The display name of the resource group. It must be 1 to 50 characters in length. | my-project |
| Tag | array<object> | No | The list of tags. | |
| object | No | The list of tags. | ||
| Key | string | No | The key of the tag. The tag key can be up to 128 characters in length and cannot start with | k1 |
| Value | string | No | The value of the tag. The tag value can be up to 128 characters in length and cannot start with | v1 |
Response parameters
Examples
Sample success responses
JSONformat
{
"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": {
"test": "test",
"test2": 1
},
"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. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2023-12-14 | The Error code has changed. The request parameters of the API has changed | View Change Details |
