executeChangeSet method
Updates a stack using the input information that was provided when the specified change set was created. After the call successfully completes, AWS CloudFormation starts updating the stack. Use the DescribeStacks action to view the status of the update.
When you execute a change set, AWS CloudFormation deletes all other change sets associated with the stack because they aren't valid for the updated stack.
If a stack policy is associated with the stack, AWS CloudFormation enforces the policy during the update. You can't specify a temporary stack policy that overrides the current policy.
To create a change set for the entire stack hierachy,
IncludeNestedStacks
must have been set to True
.
May throw InvalidChangeSetStatusException. May throw ChangeSetNotFoundException. May throw InsufficientCapabilitiesException. May throw TokenAlreadyExistsException.
Parameter changeSetName
:
The name or ARN of the change set that you want use to update the
specified stack.
Parameter clientRequestToken
:
A unique identifier for this ExecuteChangeSet
request.
Specify this token if you plan to retry requests so that AWS
CloudFormation knows that you're not attempting to execute a change set to
update a stack with the same name. You might retry
ExecuteChangeSet
requests to ensure that AWS CloudFormation
successfully received them.
Parameter stackName
:
If you specified the name of a change set, specify the stack name or ID
(ARN) that is associated with the change set you want to execute.
Implementation
Future<void> executeChangeSet({
required String changeSetName,
String? clientRequestToken,
String? stackName,
}) async {
ArgumentError.checkNotNull(changeSetName, 'changeSetName');
_s.validateStringLength(
'changeSetName',
changeSetName,
1,
1600,
isRequired: true,
);
_s.validateStringLength(
'clientRequestToken',
clientRequestToken,
1,
128,
);
_s.validateStringLength(
'stackName',
stackName,
1,
1152921504606846976,
);
final $request = <String, dynamic>{};
$request['ChangeSetName'] = changeSetName;
clientRequestToken?.also((arg) => $request['ClientRequestToken'] = arg);
stackName?.also((arg) => $request['StackName'] = arg);
await _protocol.send(
$request,
action: 'ExecuteChangeSet',
version: '2010-05-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['ExecuteChangeSetInput'],
shapes: shapes,
resultWrapper: 'ExecuteChangeSetResult',
);
}