All Products
Search
Document Center

Resource Management:CreateResourceGroup

Last Updated:Dec 15, 2025

Creates a resource group.

Operation description

Note A maximum of 30 resource groups can be created within an Alibaba Cloud account.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringYes

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
DisplayNamestringYes

The display name of the resource group.

It must be 1 to 50 characters in length.

my-project
Tagarray<object>No

The list of tags.

objectNo

The list of tags.

KeystringNo

The key of the tag.

The tag key can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

k1
ValuestringNo

The value of the tag.

The tag value can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

v1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

04F0F334-1335-436C-A1D7-6C044FE73368
ResourceGroupobject

The information of the resource group.

AccountIdstring

The ID of the Alibaba Cloud account to which the resource group belongs.

151266687691****
CreateDatestring

The time when the resource group was created. The time is displayed in UTC.

2021-06-05T14:39:13+08:00
DisplayNamestring

The display name of the resource group.

my-project
Idstring

The ID of the resource group.

rg-9gLOoK****
Namestring

The unique identifier of the resource group.

my-project
RegionStatusesobject

The status of the resource group in all regions.

Statusstring

The status of the resource group. Valid values:

  • Creating: The resource group is being created.
  • OK: The resource group is created.
Creating

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 codeError codeError messageDescription
400InvalidParameter.Name.InvalidCharsThe Name is invalid.The Name is invalid.
400InvalidParameter.Name.LengthThe maximum length of Name is exceeded.The maximum length of Name is exceeded.
400InvalidParameter.DisplayName.LengthThe maximum length of DisplayName is exceeded.The maximum length of DisplayName is exceeded.
400MissingParameter.DisplayNameYou must specify DisplayName.You must specify the parameter DisplayName.
400InvalidParameter.DisplayNameThe DisplayName is invalid.The DisplayName is invalid.
409LimitExceeded.ResourceGroupThe 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 timeSummary of changesOperation
2023-12-14The Error code has changed. The request parameters of the API has changedView Change Details