CloudFormationClient.delete_stack
rboto-cloudformation==0.4.0 · Service index · Types
Model summary (excerpt): Deletes a specified stack. Once the call completes successfully, stack deletion starts. Deleted stacks don't show up in the DescribeStacks operation if the deletion has been completed successfully. For more information about deleting a stack, see Delete a stack from the CloudFormation console in the CloudFormation User Guide .
Install and imports
from rboto import CloudFormationClient
from collections.abc import Sequence
from rboto_cloudformation.types import (
DeletionMode,
DeploymentConfig,
)
Signature
async def delete_stack(
*,
stack_name: str,
retain_resources: Sequence[str] | None = None,
role_arn: str | None = None,
client_request_token: str | None = None,
deletion_mode: DeletionMode | None = None,
deployment_config: DeploymentConfig | None = None,
) -> None: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
stack_name |
Yes | The name or the unique stack ID that's associated with the stack. |
retain_resources |
No | For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, CloudFormation deletes the stack but doesn't delete the retained resources. Retaining resources is useful when you can't delete a resource, such as a non-empty S3 bucket, but you want to delete the stack. |
role_arn |
No | The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to delete the stack. CloudFormation uses the role's credentials to make calls on your behalf. If you don't specify a value, CloudFormation uses the role that was previously associated with the stack. If no role is available, CloudFormation uses a temporary session that's generated from your user credentials. |
client_request_token |
No | A unique identifier for this DeleteStack request. Specify this token if you plan to retry requests so that CloudFormation knows that you're not attempting to delete a stack with the same name. You might retry DeleteStack requests to ensure that CloudFormation successfully received them. All events initiated by a given stack operation are assigned the same client request token, which you can... |
deletion_mode |
No | Specifies the deletion mode for the stack. Possible values are: STANDARD - Use the standard behavior. Specifying this value is the same as not specifying this parameter. FORCE_DELETE_STACK - Delete the stack if it's stuck in a DELETE_FAILED state due to resource deletion failure. |
deployment_config |
No | The deployment configuration for this stack operation, including the deployment mode. |
Output
None.
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
DeletionMode, DeploymentConfig
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_cloudformation.exceptions:
Other service failures use the service base error; credential, transport and timeout failures use shared errors.