(private readonly host: Construct, scope: IConstruct, id: string)
| 71 | private _addr?: string; // cache |
| 72 | |
| 73 | public constructor(private readonly host: Construct, scope: IConstruct, id: string) { |
| 74 | id = id ?? ''; // if undefined, convert to empty string |
| 75 | |
| 76 | this.id = sanitizeId(id); |
| 77 | this.scope = scope; |
| 78 | |
| 79 | if (scope && !this.id) { |
| 80 | throw new Error('Only root constructs may have an empty ID'); |
| 81 | } |
| 82 | |
| 83 | // add to parent scope |
| 84 | scope?.node.addChild(host, this.id); |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * The full, absolute path of this construct in the tree. |
nothing calls this directly
no test coverage detected