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.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code for different SDKs.

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.


Sample requests

&<Common request parameters>

Sample success response

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "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



The StackGroup ({name}) is not empty.


The error message returned because the stack group contains stacks. name indicates the name of the stack group.


The StackGroup ({name}) could not be found.


The error message returned because the stack group does not exist. name indicates the name of the stack group.