ResolveOptions

class aws_cdk.ResolveOptions(*, resolver, scope, preparing=None, remove_empty=None)

Bases: object

Options to the resolve() operation.

NOT the same as the ResolveContext; ResolveContext is exposed to Token implementors and resolution hooks, whereas this struct is just to bundle a number of things that would otherwise be arguments to resolve() in a readable way.

Parameters:
  • resolver (ITokenResolver) – The resolver to apply to any resolvable tokens found.

  • scope (IConstruct) – The scope from which resolution is performed.

  • preparing (Optional[bool]) – Whether the resolution is being executed during the prepare phase or not. Default: false

  • remove_empty (Optional[bool]) – Whether to remove undefined elements from arrays and objects when resolving. Default: true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
import constructs as constructs

# construct: constructs.Construct
# token_resolver: cdk.ITokenResolver

resolve_options = cdk.ResolveOptions(
    resolver=token_resolver,
    scope=construct,

    # the properties below are optional
    preparing=False,
    remove_empty=False
)

Attributes

preparing

Whether the resolution is being executed during the prepare phase or not.

Default:

false

remove_empty

Whether to remove undefined elements from arrays and objects when resolving.

Default:

true

resolver

The resolver to apply to any resolvable tokens found.

scope

The scope from which resolution is performed.