Represents the building block of the construct graph.
All constructs besides the root construct must be created within the scope of another construct.
new Construct(scope: Construct, id: string, options?: ConstructOptions)
Construct— The scope in which to define this construct.
string— The scoped construct ID.
Creates a new construct node.
|to||Returns a string representation of this construct.|
|protected on||Perform final modifications before synthesis.|
|protected on||Allows this construct to emit artifacts into the cloud assembly during synthesis.|
|protected on||Validate the current construct.|
public toString(): string
Returns a string representation of this construct.
protected onPrepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
protected onSynthesize(session: ISynthesisSession): void
ISynthesis— The synthesis session.
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as
as they participate in synthesizing the cloud assembly.
protected onValidate(): Array<string>
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.