execute_change_set
async
¶
execute_change_set(
*,
config_overrides: Optional[AsyncCloudFormationClientConfig] = 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/async_cloud_formation.py
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 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 | |