# Reference

An intrinsic Token that represents a reference to a construct.

References are recorded.

Extends: Intrinsic › Reference
Implements: IResolvable

- Source: [`core/lib/reference.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/reference.ts#L12)
- Type last changed: v2.55.0 · 14 Dec 2022

## Initializer

```ts
new Reference(value: any, target: IConstruct, displayName?: string, typeHint?: ResolutionTypeHint)
```

## Properties

- `creationStack`: string[] — The captured stack trace which represents the location in which this token was created.

- `displayName`: string

- `target`: [IConstruct](/cdk/api/v2/docs/constructs.IConstruct.html)

- `typeHint`: [ResolutionTypeHint](/cdk/api/v2/docs/aws-cdk-lib.ResolutionTypeHint.html) — Type that the Intrinsic is expected to evaluate to.

## Methods

- `isReference(x: any): boolean` (static) — Check whether this is actually a Reference.

- `resolve(_context: IResolveContext): any` — Produce the Token's value at resolution time.

- `toJSON(): any` — Turn this Token into JSON.

  Called automatically when JSON.stringify() is called on a Token.

- `toString(): 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.

- `toStringList(): 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.
