Deletes the specified change set. Deleting change sets ensures that no one executes the wrong change set.
If the call successfully completes, CloudFormation successfully deleted the change set.
If IncludeNestedStacks specifies True during the creation of the nested change set, then DeleteChangeSet will delete all change sets that belong to the stacks hierarchy and will also delete all change sets for nested stacks with the status of REVIEW_IN_PROGRESS.
Parameters:
-
change_set_name
(Optional[ChangeSetNameOrId], default:
None
)
–
The name or Amazon Resource Name (ARN) of the change set that you want to delete.
-
stack_name
(Optional[StackNameOrId], default:
None
)
–
If you specified the name of a change set to delete, specify the stack name or Amazon Resource Name (ARN) that's associated with it.
Raises:
-
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 be UPDATE_IN_PROGRESS.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
| def delete_change_set(
self,
*,
config_overrides: Optional[CloudFormationClientConfig] = None,
change_set_name: Optional[
"capo_cloudformation.types.change_set_name_or_id.ChangeSetNameOrId"
] = None,
stack_name: Optional[
"capo_cloudformation.types.stack_name_or_id.StackNameOrId"
] = None,
) -> "capo_cloudformation.types.delete_change_set_output.DeleteChangeSetOutput":
"""<p>Deletes the specified change set. Deleting change sets ensures that no one executes the wrong change set.</p> <p>If the call successfully completes, CloudFormation successfully deleted the change set.</p> <p>If <code>IncludeNestedStacks</code> specifies <code>True</code> during the creation of the nested change set, then <code>DeleteChangeSet</code> will delete all change sets that belong to the stacks hierarchy and will also delete all change sets for nested stacks with the status of <code>REVIEW_IN_PROGRESS</code>.</p>
Args:
change_set_name: <p>The name or Amazon Resource Name (ARN) of the change set that you want to delete.</p>
stack_name: <p>If you specified the name of a change set to delete, specify the stack name or Amazon Resource Name (ARN) that's associated with it.</p>
Raises:
capo_cloudformation.errors.invalid_change_set_status_exception.InvalidChangeSetStatusException: <p>The specified change set can't be used to update the stack. For example, the change set status might be <code>CREATE_IN_PROGRESS</code>, or the stack status might be <code>UPDATE_IN_PROGRESS</code>.</p>
capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudformation.types.delete_change_set_input.DeleteChangeSetInput]",
) -> OperationResponse[
"capo_cloudformation.types.delete_change_set_output.DeleteChangeSetOutput"
]:
import capo_cloudformation._operations.cloud_formation.delete_change_set
output, http_response = (
capo_cloudformation._operations.cloud_formation.delete_change_set.delete_change_set(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteChangeSet")
)
input_: capo_cloudformation.types.delete_change_set_input.DeleteChangeSetInput = {}
if change_set_name is not None:
input_["change_set_name"] = change_set_name
if stack_name is not None:
input_["stack_name"] = stack_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|