All Products
Search
Document Center

Resource Management:UpdateResourceGroup

Last Updated:Feb 13, 2025

Updates the basic information of a resource group.

Operation description

In this example, the display name of the resource group rg-9gLOoK**** is changed to project.

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
ResourceGroupIdstringYes

The ID of the resource group.

You can call the ListResourceGroups operation to obtain the ID.

rg-9gLOoK****
NewDisplayNamestringYes

The display name of the resource group.

The name must be 1 to 50 characters in length.

project

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

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

The information of the resource group.

DisplayNamestring

The display name of the resource group.

project
AccountIdstring

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

123456789****
Namestring

The unique identifier of the resource group.

my-project
CreateDatestring

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

2015-01-23T12:33:18+08:00
Idstring

The ID of the resource group.

rg-9gLOoK****

Examples

Sample success responses

JSONformat

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  "ResourceGroup": {
    "DisplayName": "project",
    "AccountId": "123456789****",
    "Name": "my-project",
    "CreateDate": "2015-01-23T12:33:18+08:00",
    "Id": "rg-9gLOoK****"
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.ResourceGroupIdThe ResourceGroupId is invalid.The resource group ID is invalid.
400InvalidParameter.DisplayNameThe DisplayName is invalid.The DisplayName is invalid.
400MissingParameter.DisplayNameYou must specify DisplayName.You must specify the parameter DisplayName.
400InvalidParameter.DisplayName.LengthThe maximum length of DisplayName is exceeded.The maximum length of DisplayName is exceeded.
404EntityNotExists.ResourceGroupThe specified resource group does not exist. You must first create a resource group.The specified resource group does not exist. You must first create a resource group.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history