@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:35.913Z") @Stability(value=Stable) public interface IResource extends software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IResource.Jsii$Default
Internal default implementation for
IResource. |
static class |
IResource.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyRemovalPolicy(RemovalPolicy policy)
Apply the given removal policy to this resource.
|
ResourceEnvironment |
getEnv()
The environment this resource belongs to.
|
Stack |
getStack()
The stack in which this resource is defined.
|
@Stability(value=Stable) @NotNull ResourceEnvironment getEnv()
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
@Stability(value=Stable) @NotNull Stack getStack()
@Stability(value=Stable)
void applyRemovalPolicy(@NotNull
RemovalPolicy policy)
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).
policy - This parameter is required.Copyright © 2022. All rights reserved.