aws-cdk-lib.TreeInspector

class TreeInspector

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

Inspector that maintains an attribute bag.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const treeInspector = new cdk.TreeInspector();

Initializer

new TreeInspector()

Properties

NameTypeDescription
attributes{ [string]: any }Represents the bag of attributes as key-value pairs.

attributes

Type: { [string]: any }

Represents the bag of attributes as key-value pairs.

Methods

NameDescription
addAttribute(key, value)Adds attribute to bag.

addAttribute(key, value)

public addAttribute(key: string, value: any): void

Parameters

  • key string — - key for metadata.
  • value any — - value of metadata.

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