调用DeleteResourceGroup删除资源组。
接口说明
删除资源组前,请先删除资源组中的资源。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ResourceGroupId |
string |
是 |
资源组 ID。 您可以调用 ListResourceGroups 查询资源组 ID。 |
rg-9gLOoK**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果 |
||
| RequestId |
string |
请求 ID。 |
1C488B66-B819-4D14-8711-C4EAAA13AC01 |
| ResourceGroup |
object |
资源组信息。 |
|
| AccountId |
string |
资源组所属的阿里云账号 ID。 |
123456789**** |
| CreateDate |
string |
资源组创建时间(UTC 时间)。 |
2015-01-23T12:33:18Z |
| DisplayName |
string |
资源组显示名称。 |
my-project |
| Id |
string |
资源组 ID。 |
rg-9gLOoK**** |
| Name |
string |
资源组唯一标识。 |
my-project |
| RegionStatuses |
object |
||
| RegionStatus |
array<object> |
各个地域的资源组状态。 |
|
|
object |
各个地域的资源组状态。 |
||
| RegionId |
string |
地域 ID。 |
cn-qingdao |
| Status |
string |
资源组状态。取值:
|
PendingDelete |
| Status |
string |
资源组状态。取值:
|
PendingDelete |
示例
正常返回示例
JSON格式
{
"RequestId": "1C488B66-B819-4D14-8711-C4EAAA13AC01",
"ResourceGroup": {
"AccountId": "123456789****",
"CreateDate": "2015-01-23T12:33:18Z",
"DisplayName": "my-project",
"Id": "rg-9gLOoK****",
"Name": "my-project",
"RegionStatuses": {
"RegionStatus": [
{
"RegionId": "cn-qingdao",
"Status": "PendingDelete"
}
]
},
"Status": "PendingDelete"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.ResourceGroupId | The ResourceGroupId is invalid. | 资源组ID无效。 |
| 404 | EntityNotExists.ResourceGroup | 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. | 资源组下存在云资源,请先释放资源。 |
| 409 | DeleteConflict.ResourceGroup.ResourceCenterResource | The resource group cannot be deleted while it contains cloud resources detected by the Resource Center. Please release these resources and try again. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。