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
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ram:UpdateResourceGroup | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ResourceGroupId | string | Yes | The ID of the resource group. You can call the ListResourceGroups operation to obtain the ID. | rg-9gLOoK**** |
NewDisplayName | string | Yes | 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
Examples
Sample success responses
JSON
format
{
"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 code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter.ResourceGroupId | The ResourceGroupId is invalid. | The resource group ID is invalid. |
400 | InvalidParameter.DisplayName | The DisplayName is invalid. | The DisplayName is invalid. |
400 | MissingParameter.DisplayName | You must specify DisplayName. | You must specify the parameter DisplayName. |
400 | InvalidParameter.DisplayName.Length | The maximum length of DisplayName is exceeded. | The maximum length of DisplayName is exceeded. |
404 | EntityNotExists.ResourceGroup | The 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 time | Summary of changes | Operation |
---|
No change history