aws-cdk-lib.CfnDynamicReference

class CfnDynamicReference

LanguageType name
.NETAmazon.CDK.CfnDynamicReference
Gogithub.com/aws/aws-cdk-go/awscdk/v2#CfnDynamicReference
Javasoftware.amazon.awscdk.CfnDynamicReference
Pythonaws_cdk.CfnDynamicReference
TypeScript (source)aws-cdk-lib » CfnDynamicReference

Implements IResolvable

Extends Intrinsic

References a dynamically retrieved value.

This is a Construct so that subclasses will (eventually) be able to attach metadata to themselves without having to change call signatures.

See also: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html

Example

new CfnDynamicReference(
  CfnDynamicReferenceService.SECRETS_MANAGER,
  'secret-id:secret-string:json-key:version-stage:version-id',
);

Initializer

new CfnDynamicReference(service: CfnDynamicReferenceService, key: string)

Parameters

  • service CfnDynamicReferenceService
  • key string

Properties

NameTypeDescription
creationStackstring[]The captured stack trace which represents the location in which this token was created.
typeHint?ResolutionTypeHintType 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.


typeHint?

Type: ResolutionTypeHint (optional)

Type that the Intrinsic is expected to evaluate to.

Methods

NameDescription
resolve(_context)Produce the Token's value at resolution time.
toJSON()Turn this Token into JSON.
toString()Convert an instance of this Token to a string.
toStringList()Convert an instance of this Token to a string list.

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.


toStringList()

public 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.