Deletes a stack group.
A stack group can be deleted only when the stack group does not contain stacks. You can call the DeleteStackInstances operation to delete stacks.
This topic provides an example on how to delete a stack group. In this example, a stack group named MyStackGroup
in the China (Hangzhou) region is deleted.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | DeleteStackGroup | The operation that you want to perform. Set the value to DeleteStackGroup. |
RegionId | String | No | cn-hangzhou | The ID of the region to which the stack group belongs. You can call the DescribeRegions operation to query the most recent region list. |
StackGroupName | String | No | MyStackGroup | The name of the stack group. The name must be unique in a region. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). The name must start with a digit or a letter. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 14A07460-EBE7-47CA-9757-12CC4761D47A | The ID of the request. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/?Action=DeleteStackGroup
&RegionId=cn-hangzhou
&StackGroupName=MyStackGroup
&<Common request parameters>
Sample success response
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteStackGroupResponse>
<RequestId>14A07460-EBE7-47CA-9757-12CC4761D47A</RequestId>
</DeleteStackGroupResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "14A07460-EBE7-47CA-9757-12CC4761D47A"
}
Error codes
For a list of error codes, see Service error codes.
Error code |
Error message |
HTTP status code |
Description |
---|---|---|---|
StackGroupNotEmpty |
The StackGroup ({name}) is not empty. |
400 |
The error message returned because the stack group contains stacks. name indicates the name of the stack group. |
StackGroupNotFound |
The StackGroup ({name}) could not be found. |
404 |
The error message returned because the stack group does not exist. name indicates the name of the stack group. |