aws-cdk-lib.RemovalPolicyOptions

interface RemovalPolicyOptions

LanguageType name
.NETAmazon.CDK.RemovalPolicyOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2#RemovalPolicyOptions
Javasoftware.amazon.awscdk.RemovalPolicyOptions
Pythonaws_cdk.RemovalPolicyOptions
TypeScript (source)aws-cdk-lib » RemovalPolicyOptions

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const removalPolicyOptions: cdk.RemovalPolicyOptions = {
  applyToUpdateReplacePolicy: false,
  default: cdk.RemovalPolicy.DESTROY,
};

Properties

NameTypeDescription
applyToUpdateReplacePolicy?booleanApply the same deletion policy to the resource's "UpdateReplacePolicy".
default?RemovalPolicyThe default policy to apply in case the removal policy is not defined.

applyToUpdateReplacePolicy?

Type: boolean (optional, default: true)

Apply the same deletion policy to the resource's "UpdateReplacePolicy".


default?

Type: RemovalPolicy (optional, default: Default value is resource specific. To determine the default value for a resource, please consult that specific resource's documentation.)

The default policy to apply in case the removal policy is not defined.