Skip to content
v2.274.0

MissingRemovalPolicies Class ​

Manages removal policies for resources without existing policies within a construct scope.

Example ​

ts
// 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 missingRemovalPolicies = cdk.MissingRemovalPolicies.of(this);

Methods ​

apply(policy: RemovalPolicy, props?: RemovalPolicyProps): voiddef apply(self, policy: RemovalPolicy, props: typing.Optional[RemovalPolicyProps] = None) -> Nonepublic void apply(RemovalPolicy policy, RemovalPolicyProps props)public void Apply(RemovalPolicy policy, RemovalPolicyProps? props = null)func Apply(Policy RemovalPolicy, Props RemovalPolicyProps)#
Apply a removal policy only to resources without existing policies within this scope.
2 parameters

Parameters

  • policypolicypolicypolicyPolicy — The removal policy to apply.
  • propspropspropspropsProps — Configuration options.
destroy(props?: RemovalPolicyProps): voiddef destroy(self, props: typing.Optional[RemovalPolicyProps] = None) -> Nonepublic void destroy(RemovalPolicyProps props)public void Destroy(RemovalPolicyProps? props = null)func Destroy(Props RemovalPolicyProps)#
Apply DESTROY removal policy only to resources without existing policies within this scope.
1 parameter

Parameters

  • propspropspropspropsProps — Configuration options.
of(scope: IConstruct): MissingRemovalPolicies // chainable@staticmethod def of(scope: IConstruct) -> MissingRemovalPoliciespublic static MissingRemovalPolicies of(IConstruct scope)public static MissingRemovalPolicies Of(IConstruct scope)func Of(Scope IConstruct) MissingRemovalPoliciesstatic#
Returns the missing removal policies API for the given scope.
1 parameter

Parameters

  • scopescopescopescopeScope — The scope.
retain(props?: RemovalPolicyProps): voiddef retain(self, props: typing.Optional[RemovalPolicyProps] = None) -> Nonepublic void retain(RemovalPolicyProps props)public void Retain(RemovalPolicyProps? props = null)func Retain(Props RemovalPolicyProps)#
Apply RETAIN removal policy only to resources without existing policies within this scope.
1 parameter

Parameters

  • propspropspropspropsProps — Configuration options.
retainOnUpdateOrDelete(props?: RemovalPolicyProps): voiddef retain_on_update_or_delete(self, props: typing.Optional[RemovalPolicyProps] = None) -> Nonepublic void retainOnUpdateOrDelete(RemovalPolicyProps props)public void RetainOnUpdateOrDelete(RemovalPolicyProps? props = null)func RetainOnUpdateOrDelete(Props RemovalPolicyProps)#
Apply RETAIN_ON_UPDATE_OR_DELETE removal policy only to resources without existing policies within this scope.
1 parameter

Parameters

  • propspropspropspropsProps — Configuration options.
snapshot(props?: RemovalPolicyProps): voiddef snapshot(self, props: typing.Optional[RemovalPolicyProps] = None) -> Nonepublic void snapshot(RemovalPolicyProps props)public void Snapshot(RemovalPolicyProps? props = null)func Snapshot(Props RemovalPolicyProps)#
Apply SNAPSHOT removal policy only to resources without existing policies within this scope.
1 parameter

Parameters

  • propspropspropspropsProps — Configuration options.