Skip to main content
Lazily produce a value. Can be used to return a string, list or numeric value whose actual value will only be calculated later, during synthesis.

Initializers

import cdktn

cdktn.Lazy()
NameTypeDescription

Static Functions

NameDescription
any_valueProduces a lazy token from an untyped value.
list_valueReturns a list-ified token for a lazy value.
number_valueReturns a numberified token for a lazy value.
string_valueReturns a stringified token for a lazy value.

any_value

import cdktn

cdktn.Lazy.any_value(
  producer: IAnyProducer,
  display_hint: str = None,
  omit_empty_array: bool = None
)
Produces a lazy token from an untyped value.

producerRequired

The lazy producer.

display_hintOptional

  • Type: str
  • Default: No hint
Use the given name as a display hint.

omit_empty_arrayOptional

  • Type: bool
  • Default: false
If the produced value is an array and it is empty, return ‘undefined’ instead.

list_value

import cdktn

cdktn.Lazy.list_value(
  producer: IListProducer,
  display_hint: str = None,
  omit_empty: bool = None
)
Returns a list-ified token for a lazy value.

producerRequired

The producer.

display_hintOptional

  • Type: str
  • Default: No hint
Use the given name as a display hint.

omit_emptyOptional

  • Type: bool
  • Default: false
If the produced list is empty, return ‘undefined’ instead.

number_value

import cdktn

cdktn.Lazy.number_value(
  producer: INumberProducer
)
Returns a numberified token for a lazy value.

producerRequired

The producer.

string_value

import cdktn

cdktn.Lazy.string_value(
  producer: IStringProducer,
  display_hint: str = None
)
Returns a stringified token for a lazy value.

producerRequired

The producer.

display_hintOptional

  • Type: str
  • Default: No hint
Use the given name as a display hint.