Deletes a resource group.
Operation description
Note
Before you delete a resource group, you must delete all the resources in it.
In this example, the resource group whose ID is rg-9gLOoK****
is deleted.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
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**** |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "1C488B66-B819-4D14-8711-C4EAAA13AC01",
"ResourceGroup": {
"DisplayName": "my-project",
"Status": "PendingDelete",
"RegionStatuses": {
"RegionStatus": [
{
"Status": "PendingDelete",
"RegionId": "cn-qingdao"
}
]
},
"AccountId": "123456789****",
"Name": "my-project",
"CreateDate": "2015-01-23T12:33:18Z",
"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. |
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. |
409 | DeleteConflict.ResourceGroup.Resource | Failed to delete the resource group because one or more cloud resources exist in the resource group. Try again later after you release the cloud resources. | Failed to delete the resource group because one or more cloud resources exist in the resource group. Try again later after you release the cloud resources. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
No change history