Readonly
idReadonly
logicalThe logical ID for this CloudFormation stack element. The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId)
.
Readonly
nodeThe tree node.
Readonly
stackThe stack in which this element is defined. CfnElements must be defined within a stack scope (directly or indirectly).
A string that explains a constraint when the constraint is violated. For example, without a constraint description, a parameter that has an allowed pattern of [A-Za-z0-9]+ displays the following error message when the user specifies an invalid value:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
Indicates if this parameter is configured with "NoEcho" enabled.
The parameter value as a Token
The parameter value, if it represents a string list.
The parameter value, if it represents a number.
The parameter value, if it represents a string.
Internal
Lock the logicalId of the element and do not allow any updates (e.g. via overrideLogicalId)
This is needed in cases where you are consuming the LogicalID of an element prior to synthesis and you need to not allow future changes to the id since doing so would cause the value you just consumed to differ from the synth time value of the logicalId.
For example:
const bucket = new Bucket(stack, 'Bucket'); stack.exportValue(bucket.bucketArn) <--- consuming the logicalId bucket.overrideLogicalId('NewLogicalId') <--- updating logicalId
You should most likely never need to use this method, and if you are implementing a feature that requires this, make sure you actually require it.
Internal
Overrides the auto-generated logical ID with a specific ID.
The new logical ID to use for this stack element.
Returns a string representation of this construct.
Static
getStatic
isReturns true
if a construct is a stack element (i.e. part of the
synthesized cloudformation template).
Uses duck-typing instead of instanceof
to allow stack elements from different
versions of this library to be included in the same stack.
The construct as a stack element or undefined if it is not a stack element.
Static
isChecks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
Any object
true if x
is an object created from a class which extends Construct
.
Creates a CloudFormation parameter which references the bucket used to store code artifacts. By default, the bucket name is stored in an SSM Parameter called
/account/services/artifact.bucket
.