class Reference
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Reference |
Java | software.amazon.awscdk.core.Reference |
Python | aws_cdk.core.Reference |
TypeScript (source) | @aws-cdk/core » Reference |
Implements
IResolvable
Extends
Intrinsic
Obtainable from
Cfn.getAtt(), Custom.getAtt(), Aws.getResponseFieldReference(), Aws.getAtt()
An intrinsic Token that represents a reference to a construct.
References are recorded.
Initializer
new Reference(value: any, target: IConstruct, displayName?: string)
Parameters
- value
any - target
IConstruct - displayName
string
Properties
| Name | Type | Description |
|---|---|---|
| creation | string[] | The captured stack trace which represents the location in which this token was created. |
| display | string | |
| target | IConstruct |
creationStack
Type:
string[]
The captured stack trace which represents the location in which this token was created.
displayName
Type:
string
target
Type:
IConstruct
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. |
| static is | Check whether this is actually a Reference. |
resolve(_context)
public resolve(_context: IResolveContext): any
Parameters
- _context
IResolveContext
Returns
any
Produce the Token's value at resolution time.
toJSON()
public toJSON(): any
Returns
any
Turn this Token into JSON.
Called automatically when JSON.stringify() is called on a Token.
toString()
public 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.
static isReference(x)
public static isReference(x: any): boolean
Parameters
- x
any
Returns
boolean
Check whether this is actually a Reference.

.NET
Java
Python
TypeScript (