TreeInspector

class aws_cdk.TreeInspector

Bases: object

Inspector that maintains an attribute bag.

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

tree_inspector = cdk.TreeInspector()

Methods

add_attribute(key, value)

Adds attribute to bag.

Keys should be added by convention to prevent conflicts i.e. L1 constructs will contain attributes with keys prefixed with aws:cdk:cloudformation

Parameters:
  • key (str) –

    • key for metadata.

  • value (Any) –

    • value of metadata.

Return type:

None

Attributes

attributes

Represents the bag of attributes as key-value pairs.