deleteStackSet method

Future<void> deleteStackSet({
  1. required String stackSetName,
  2. CallAs? callAs,
})

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

May throw OperationInProgressException. May throw StackSetNotEmptyException.

Parameter stackSetName : The name or unique ID of the StackSet that you're deleting. You can obtain this value by running ListStackSets.

Parameter callAs : [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 StackSets 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.

Implementation

Future<void> deleteStackSet({
  required String stackSetName,
  CallAs? callAs,
}) async {
  final $request = <String, String>{
    'StackSetName': stackSetName,
    if (callAs != null) 'CallAs': callAs.value,
  };
  await _protocol.send(
    $request,
    action: 'DeleteStackSet',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'DeleteStackSetResult',
  );
}