Deletes a stack group.

A stack group can be deleted only when the stack group does not contain stack instances. You can call the DeleteStackInstances operation to delete stack instances.

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 of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteStackGroup

The operation that you want to perform. Set the value to DeleteStackGroup.

RegionId String Yes cn-hangzhou

The region ID of the stack group. You can call the DescribeRegions operation to query the most recent region list.

StackGroupName String Yes MyStackGroup

The name of the stack group. The name must be unique within a region.

The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or 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 responses

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, visit the API Error Center.

Error code

Error message

HTTP status code



The StackGroup ({name}) is not empty.


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


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


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