Show / Hide Table of Contents

Class RemovalPolicies

Manages removal policies for all resources within a construct scope, overriding any existing policies by default.

Inheritance
object
RemovalPolicies
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RemovalPolicies : DeputyBase
Syntax (vb)
Public Class RemovalPolicies Inherits DeputyBase
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK;
            Cluster cluster;


            RemovalPolicies.Of(cluster.OpenIdConnectProvider).Apply(RemovalPolicy.RETAIN);

Synopsis

Methods

Apply(RemovalPolicy, IRemovalPolicyProps?)

Apply a removal policy to all resources within this scope, overriding any existing policies.

Destroy(IRemovalPolicyProps?)

Apply DESTROY removal policy to all resources within this scope.

Of(IConstruct)

Returns the removal policies API for the given scope.

Retain(IRemovalPolicyProps?)

Apply RETAIN removal policy to all resources within this scope.

RetainOnUpdateOrDelete(IRemovalPolicyProps?)

Apply RETAIN_ON_UPDATE_OR_DELETE removal policy to all resources within this scope.

Snapshot(IRemovalPolicyProps?)

Apply SNAPSHOT removal policy to all resources within this scope.

Methods

Apply(RemovalPolicy, IRemovalPolicyProps?)

Apply a removal policy to all resources within this scope, overriding any existing policies.

public virtual void Apply(RemovalPolicy policy, IRemovalPolicyProps? props = null)
Parameters
policy RemovalPolicy

The removal policy to apply.

props IRemovalPolicyProps

Configuration options.

Remarks

ExampleMetadata: infused

Destroy(IRemovalPolicyProps?)

Apply DESTROY removal policy to all resources within this scope.

public virtual void Destroy(IRemovalPolicyProps? props = null)
Parameters
props IRemovalPolicyProps

Configuration options.

Remarks

ExampleMetadata: infused

Of(IConstruct)

Returns the removal policies API for the given scope.

public static RemovalPolicies Of(IConstruct scope)
Parameters
scope IConstruct

The scope.

Returns

RemovalPolicies

Remarks

ExampleMetadata: infused

Retain(IRemovalPolicyProps?)

Apply RETAIN removal policy to all resources within this scope.

public virtual void Retain(IRemovalPolicyProps? props = null)
Parameters
props IRemovalPolicyProps

Configuration options.

Remarks

ExampleMetadata: infused

RetainOnUpdateOrDelete(IRemovalPolicyProps?)

Apply RETAIN_ON_UPDATE_OR_DELETE removal policy to all resources within this scope.

public virtual void RetainOnUpdateOrDelete(IRemovalPolicyProps? props = null)
Parameters
props IRemovalPolicyProps

Configuration options.

Remarks

ExampleMetadata: infused

Snapshot(IRemovalPolicyProps?)

Apply SNAPSHOT removal policy to all resources within this scope.

public virtual void Snapshot(IRemovalPolicyProps? props = null)
Parameters
props IRemovalPolicyProps

Configuration options.

Remarks

ExampleMetadata: infused

Back to top Generated by DocFX