Show / Hide Table of Contents

Class Construct

Represents the building block of the construct graph.

All constructs besides the root construct must be created within the scope of another construct.

Synopsis

Constructors

constructor(scope, id)

Creates a new construct node.

Properties

node

Construct tree node which offers APIs for interacting with the construct tree.

Methods

isConstruct(x)

Return whether the given object is a Construct

prepare()

Perform final modifications before synthesis

synthesize(session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

validate()

Validate the current construct.

Constructors

constructor(scope, id)

Creates a new construct node.

Declaration
constructor(scope: Construct, id: string);
Parameters
scope Construct
id string

Properties

node

Construct tree node which offers APIs for interacting with the construct tree.

Declaration
readonly node: ConstructNode;
Property Value

ConstructNode

Methods

isConstruct(x)

Return whether the given object is a Construct

Declaration
static isConstruct(x: any): x is Construct;
Parameters
x any
Returns

x is Construct

prepare()

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.

Declaration
protected prepare(): void;
Returns

void

synthesize(session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

Declaration
protected synthesize(session: ISynthesisSession): void;
Parameters
session ISynthesisSession
Returns

void

validate()

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.

Declaration
protected validate(): string[];
Returns

string[]

An array of validation error messages, or an empty array if there the construct is valid.

Back to top Generated by DocFX