DeleteChangeSetCommand

Deletes the specified change set. Deleting change sets ensures that no one executes the wrong change set.

If the call successfully completes, CloudFormation successfully deleted the change set.

If IncludeNestedStacks specifies True during the creation of the nested change set, then DeleteChangeSet will delete all change sets that belong to the stacks hierarchy and will also delete all change sets for nested stacks with the status of REVIEW_IN_PROGRESS.

Example Syntax

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

import { CloudFormationClient, DeleteChangeSetCommand } from "@aws-sdk/client-cloudformation"; // ES Modules import
// const { CloudFormationClient, DeleteChangeSetCommand } = require("@aws-sdk/client-cloudformation"); // CommonJS import
const client = new CloudFormationClient(config);
const input = { // DeleteChangeSetInput
  ChangeSetName: "STRING_VALUE", // required
  StackName: "STRING_VALUE",
};
const command = new DeleteChangeSetCommand(input);
const response = await client.send(command);
// {};

DeleteChangeSetCommand Input

See DeleteChangeSetCommandInput for more details

Parameter
Type
Description
ChangeSetName
Required
string | undefined

The name or Amazon Resource Name (ARN) of the change set that you want to delete.

StackName
string | undefined

If you specified the name of a change set to delete, specify the stack name or Amazon Resource Name (ARN) that's associated with it.

DeleteChangeSetCommand Output

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

Throws

Name
Fault
Details
InvalidChangeSetStatusException
client

The specified change set can't be used to update the stack. For example, the change set status might be CREATE_IN_PROGRESS, or the stack status might be UPDATE_IN_PROGRESS.

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