class Reference
Language | Type name |
---|---|
.NET | Amazon.CDK.Reference |
Go | github.com/aws/aws-cdk-go/awscdk/v2#Reference |
Java | software.amazon.awscdk.Reference |
Python | aws_cdk.Reference |
TypeScript (source) | aws-cdk-lib » Reference |
Implements
IResolvable
Extends
Intrinsic
Obtainable from
Aws
.getResponseFieldReference()
, Cfn
.getAtt()
, Custom
.getAtt()
, Api
.getAtt()
An intrinsic Token that represents a reference to a construct.
References are recorded.
Initializer
new Reference(value: any, target: IConstruct, displayName?: string, typeHint?: ResolutionTypeHint)
Parameters
- value
any
- target
IConstruct
- displayName
string
- typeHint
Resolution
— Type that the Intrinsic is expected to evaluate to.Type Hint
Properties
Name | Type | Description |
---|---|---|
creation | string[] | The captured stack trace which represents the location in which this token was created. |
display | string | |
target | IConstruct | |
type | Resolution | Type that the Intrinsic is expected to evaluate to. |
creationStack
Type:
string[]
The captured stack trace which represents the location in which this token was created.
displayName
Type:
string
target
Type:
IConstruct
typeHint?
Type:
Resolution
(optional)
Type that the Intrinsic is expected to evaluate to.
Methods
Name | Description |
---|---|
resolve(_context) | Produce the Token's value at resolution time. |
to | Turn this Token into JSON. |
to | Convert an instance of this Token to a string. |
to | Convert an instance of this Token to a string list. |
static is | Check whether this is actually a Reference. |
resolve(_context)
public resolve(_context: IResolveContext): any
Parameters
- _context
IResolve
Context
Returns
any
Produce the Token's value at resolution time.
JSON()
topublic toJSON(): any
Returns
any
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
String()
topublic toString(): string
Returns
string
Convert an instance of this Token to a string.
This method will be called implicitly by language runtimes if the object is embedded into a string. We treat it the same as an explicit stringification.
StringList()
topublic toStringList(): string[]
Returns
string[]
Convert an instance of this Token to a string list.
This method will be called implicitly by language runtimes if the object is embedded into a list. We treat it the same as an explicit stringification.
Reference(x)
static ispublic static isReference(x: any): boolean
Parameters
- x
any
Returns
boolean
Check whether this is actually a Reference.