execute_change_set
¶
execute_change_set(
*,
config_overrides: Optional[CloudFormationClientConfig] = None,
change_set_name: Optional[ChangeSetNameOrId] = None,
stack_name: Optional[StackNameOrId] = None,
client_request_token: Optional[ClientRequestToken] = None,
disable_rollback: Optional[DisableRollback] = None,
retain_except_on_create: Optional[RetainExceptOnCreate] = None,
) -> ExecuteChangeSetOutput
Updates a stack using the input information that was provided when the specified change set was created. After the call successfully completes, CloudFormation starts updating the stack. Use the DescribeStacks action to view the status of the update.
When you execute a change set, 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, 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 hierarchy, IncludeNestedStacks must have been set to True.
Parameters:
-
change_set_name(Optional[ChangeSetNameOrId], default:None) –The name or Amazon Resource Name (ARN) of the change set that you want use to update the specified stack.
-
stack_name(Optional[StackNameOrId], default:None) –If you specified the name of a change set, specify the stack name or Amazon Resource Name (ARN) that's associated with the change set you want to execute.
-
client_request_token(Optional[ClientRequestToken], default:None) –A unique identifier for this
ExecuteChangeSetrequest. Specify this token if you plan to retry requests so that CloudFormation knows that you're not attempting to execute a change set to update a stack with the same name. You might retryExecuteChangeSetrequests to ensure that CloudFormation successfully received them. -
disable_rollback(Optional[DisableRollback], default:None) –Preserves the state of previously provisioned resources when an operation fails. This parameter can't be specified when the
OnStackFailureparameter to the CreateChangeSet API operation was specified.-
True- if the stack creation fails, do nothing. This is equivalent to specifyingDO_NOTHINGfor theOnStackFailureparameter to the CreateChangeSet API operation. -
False- if the stack creation fails, roll back the stack. This is equivalent to specifyingROLLBACKfor theOnStackFailureparameter to the CreateChangeSet API operation.
Default:
True -
-
retain_except_on_create(Optional[RetainExceptOnCreate], default:None) –When set to
true, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy ofRetain.Default:
false
Raises:
-
ChangeSetNotFoundException–The specified change set name or ID doesn't exit. To view valid change sets for a stack, use the
ListChangeSetsoperation. -
InsufficientCapabilitiesException–The template contains resources with capabilities that weren't specified in the Capabilities parameter.
-
InvalidChangeSetStatusException–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 beUPDATE_IN_PROGRESS. -
TokenAlreadyExistsException–A client request token already exists.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 | |