@Generated(value="jsii-pacmak/1.11.0 (build 1e9b8e1)", date="2020-09-13T06:02:42.282Z") @Stability(value=Stable) public abstract class Resource extends Construct implements IResource
Modifier | Constructor and Description |
---|---|
protected |
Resource(Construct scope,
String id) |
protected |
Resource(Construct scope,
String id,
ResourceProps props) |
protected |
Resource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Resource(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected String |
generatePhysicalName() |
ResourceEnvironment |
getEnv()
The environment this resource belongs to.
|
protected String |
getPhysicalName()
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
|
protected String |
getResourceArnAttribute(String arnAttr,
ArnComponents arnComponents)
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g.
|
protected String |
getResourceNameAttribute(String nameAttr)
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g.
|
Stack |
getStack()
The stack in which this resource is defined.
|
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNode
protected Resource(software.amazon.jsii.JsiiObjectRef objRef)
protected Resource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected Resource(@NotNull Construct scope, @NotNull String id, @Nullable ResourceProps props)
scope
- This parameter is required.id
- This parameter is required.props
- @Stability(value=Stable) @NotNull protected String generatePhysicalName()
@Stability(value=Experimental) @NotNull protected String getResourceArnAttribute(@NotNull String arnAttr, @NotNull ArnComponents arnComponents)
Normally, this token will resolve to arnAttr
, but if the resource is
referenced across environments, arnComponents
will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName
in arnComponents
.
EXPERIMENTAL
arnAttr
- The CFN attribute which resolves to the ARN of the resource. This parameter is required.arnComponents
- The format of the ARN of this resource. This parameter is required.@Stability(value=Experimental) @NotNull protected String getResourceNameAttribute(@NotNull String nameAttr)
Normally, this token will resolve to nameAttr
, but if the resource is
referenced across environments, it will be resolved to this.physicalName
,
which will be a concrete name.
EXPERIMENTAL
nameAttr
- The CFN attribute which resolves to the resource's name. This parameter is required.@Stability(value=Stable) @NotNull public 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=Experimental) @NotNull protected String getPhysicalName()
This value will resolve to one of the following:
"my-awesome-bucket"
)undefined
, when a name should be generated by CloudFormationEXPERIMENTAL
Copyright © 2020. All rights reserved.