cancelUpdateStack method
Cancels an update on the specified stack. If the call completes successfully, the stack rolls back the update and reverts to the previous stack configuration.
May throw TokenAlreadyExistsException.
Parameter stackName
:
The name or the unique stack ID that is associated with the stack.
Parameter clientRequestToken
:
A unique identifier for this CancelUpdateStack
request.
Specify this token if you plan to retry requests so that AWS
CloudFormation knows that you're not attempting to cancel an update on a
stack with the same name. You might retry CancelUpdateStack
requests to ensure that AWS CloudFormation successfully received them.
Implementation
Future<void> cancelUpdateStack({
required String stackName,
String? clientRequestToken,
}) async {
ArgumentError.checkNotNull(stackName, 'stackName');
_s.validateStringLength(
'clientRequestToken',
clientRequestToken,
1,
128,
);
final $request = <String, dynamic>{};
$request['StackName'] = stackName;
clientRequestToken?.also((arg) => $request['ClientRequestToken'] = arg);
await _protocol.send(
$request,
action: 'CancelUpdateStack',
version: '2010-05-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CancelUpdateStackInput'],
shapes: shapes,
);
}