RemovalPolicy

class aws_cdk.core.RemovalPolicy(value)

Bases: enum.Enum

An enumeration.

Attributes

DESTROY

This is the default removal policy.

It means that when the resource is removed from the app, it will be physically destroyed.

RETAIN

This uses the ‘Retain’ DeletionPolicy, which will cause the resource to be retained in the account, but orphaned from the stack.

SNAPSHOT

This retention policy deletes the resource, but saves a snapshot of its data before deleting, so that it can be re-created later.

Only available for some stateful resources, like databases, EFS volumes, etc.

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options