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 regular expression that represents the patterns to allow for String types.
An array containing the list of values allowed for the parameter.
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.
A value of the appropriate type for the template to use if no value is specified when a stack is created. If you define constraints for the parameter, you must specify a value that adheres to those constraints.
A string of up to 4000 characters that describes the parameter.
An integer value that determines the largest number of characters you want to allow for String types.
A numeric value that determines the largest numeric value you want to allow for Number types.
An integer value that determines the smallest number of characters you want to allow for String types.
A numeric value that determines the smallest numeric value you want to allow for Number types.
Indicates if this parameter is configured with "NoEcho" enabled.
The data type for the parameter (DataType).
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.
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 load balancer access logs. By default, the bucket name is stored in an SSM Parameter called
/account/services/access-logging/bucket
.