From 63614b9018596705d0167bd895d65067bfd0dfc1 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 4 Oct 2021 12:17:53 +0200 Subject: [PATCH] docs(core): fix reference to nonexistant enum value (#16716) Fixes #16605. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/cfn-resource.ts | 8 ++++++++ packages/@aws-cdk/core/lib/resource.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/core/lib/cfn-resource.ts b/packages/@aws-cdk/core/lib/cfn-resource.ts index d6be50b9149fb..f1b4d76a10563 100644 --- a/packages/@aws-cdk/core/lib/cfn-resource.ts +++ b/packages/@aws-cdk/core/lib/cfn-resource.ts @@ -101,6 +101,14 @@ export class CfnResource extends CfnRefElement { /** * Sets the deletion policy of the resource based on the removal policy specified. + * + * The Removal Policy controls what happens to this resource when it stops + * being managed by CloudFormation, either because you've removed it from the + * CDK application or because you've made a change that requires the resource + * to be replaced. + * + * The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS + * account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). */ public applyRemovalPolicy(policy: RemovalPolicy | undefined, options: RemovalPolicyOptions = {}) { policy = policy || options.default || RemovalPolicy.RETAIN; diff --git a/packages/@aws-cdk/core/lib/resource.ts b/packages/@aws-cdk/core/lib/resource.ts index 65fcacd55bf25..c61e9ba69955e 100644 --- a/packages/@aws-cdk/core/lib/resource.ts +++ b/packages/@aws-cdk/core/lib/resource.ts @@ -203,7 +203,7 @@ export abstract class Resource extends CoreConstruct implements IResource { * CDK application or because you've made a change that requires the resource * to be replaced. * - * The resource can be deleted (`RemovalPolicy.DELETE`), or left in your AWS + * The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS * account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). */ public applyRemovalPolicy(policy: RemovalPolicy) {