deleteChangeSet method

Future<void> deleteChangeSet({
  1. required String changeSetName,
  2. String? stackName,
})

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

If the call successfully completes, AWS 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.

May throw InvalidChangeSetStatusException.

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

Parameter stackName : If you specified the name of a change set to delete, specify the stack name or ID (ARN) that is associated with it.

Implementation

Future<void> deleteChangeSet({
  required String changeSetName,
  String? stackName,
}) async {
  ArgumentError.checkNotNull(changeSetName, 'changeSetName');
  _s.validateStringLength(
    'changeSetName',
    changeSetName,
    1,
    1600,
    isRequired: true,
  );
  _s.validateStringLength(
    'stackName',
    stackName,
    1,
    1152921504606846976,
  );
  final $request = <String, dynamic>{};
  $request['ChangeSetName'] = changeSetName;
  stackName?.also((arg) => $request['StackName'] = arg);
  await _protocol.send(
    $request,
    action: 'DeleteChangeSet',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteChangeSetInput'],
    shapes: shapes,
    resultWrapper: 'DeleteChangeSetResult',
  );
}