DeleteStackSetCommand

Deletes a stack set. Before you can delete a stack set, all its member stack instances must be deleted. For more information about how to complete this, see DeleteStackInstances.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { CloudFormationClient, DeleteStackSetCommand } from "@aws-sdk/client-cloudformation"; // ES Modules import
// const { CloudFormationClient, DeleteStackSetCommand } = require("@aws-sdk/client-cloudformation"); // CommonJS import
const client = new CloudFormationClient(config);
const input = { // DeleteStackSetInput
  StackSetName: "STRING_VALUE", // required
  CallAs: "SELF" || "DELEGATED_ADMIN",
};
const command = new DeleteStackSetCommand(input);
const response = await client.send(command);
// {};

DeleteStackSetCommand Input

See DeleteStackSetCommandInput for more details

Parameter
Type
Description
StackSetName
Required
string | undefined

The name or unique ID of the stack set that you're deleting. You can obtain this value by running ListStackSets.

CallAs
CallAs | undefined

[Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

By default, SELF is specified. Use SELF for stack sets with self-managed permissions.

  • If you are signed in to the management account, specify SELF.

  • If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator  in the CloudFormation User Guide.

DeleteStackSetCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
OperationInProgressException
client

Another operation is currently in progress for this stack set. Only one operation can be performed for a stack set at a given time.

StackSetNotEmptyException
client

You can't yet delete this stack set, because it still contains one or more stack instances. Delete all stack instances from the stack set before deleting the stack set.

CloudFormationServiceException
Base exception class for all service exceptions from CloudFormation service.