class TreeInspector
Language | Type name |
---|---|
.NET | Amazon.CDK.TreeInspector |
Go | github.com/aws/aws-cdk-go/awscdk/v2#TreeInspector |
Java | software.amazon.awscdk.TreeInspector |
Python | aws_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
Name | Type | Description |
---|---|---|
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
Name | Description |
---|---|
add | 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