class TreeInspector
Language | Type name |
---|---|
![]() | Amazon.CDK.TreeInspector |
![]() | software.amazon.awscdk.core.TreeInspector |
![]() | aws_cdk.core.TreeInspector |
![]() | @aws-cdk/core » 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/core';
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