@Generated(value="jsii-pacmak/0.20.8 (build bd5ef4d)", date="2019-11-25T14:22:09.457Z") @Stability(value=Stable) public class ConstructNode extends software.amazon.jsii.JsiiObject
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_SEP
Separator used to delimit construct path components.
|
| Modifier | Constructor and Description |
|---|---|
|
ConstructNode(Construct host,
IConstruct scope,
String id) |
protected |
ConstructNode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ConstructNode(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependency(IDependable... dependencies)
Add an ordering dependency on another Construct.
|
void |
addError(String message)
Adds an { error:
|
void |
addInfo(String message)
Adds a { "aws:cdk:info":
|
void |
addMetadata(String type,
Object data)
Adds a metadata entry to this construct.
|
void |
addMetadata(String type,
Object data,
Object from)
Adds a metadata entry to this construct.
|
void |
addWarning(String message)
Adds a { warning:
|
void |
applyAspect(IAspect aspect)
Applies the aspect to this Constructs node.
|
List<IConstruct> |
findAll()
Return this construct and all of its children in the given order.
|
List<IConstruct> |
findAll(ConstructOrder order)
Return this construct and all of its children in the given order.
|
IConstruct |
findChild(String id)
Return a direct child by id.
|
List<IConstruct> |
getChildren()
All direct children of this construct.
|
IConstruct |
getDefaultChild()
Returns the child construct that has the id `Default` or `Resource"`.
|
List<Dependency> |
getDependencies()
Return all dependencies registered on this node or any of its children.
|
String |
getId()
The id of this construct within the current scope.
|
Boolean |
getLocked()
Returns true if this construct or the scopes in which it is defined are locked.
|
List<MetadataEntry> |
getMetadata()
An immutable array of metadata objects associated with this construct.
|
String |
getPath()
The full, absolute path of this construct in the tree.
|
IConstruct |
getRoot() |
IConstruct |
getScope()
Returns the scope in which this construct is defined.
|
List<IConstruct> |
getScopes()
All parent scopes of this construct.
|
String |
getUniqueId()
A tree-global unique alphanumeric identifier for this construct.
|
static void |
prepare(ConstructNode node)
Invokes "prepare" on all constructs (depth-first, post-order) in the tree under `node`.
|
void |
setContext(String key,
Object value)
This can be used to set contextual values.
|
void |
setDefaultChild(IConstruct value)
Returns the child construct that has the id `Default` or `Resource"`.
|
static CloudAssembly |
synth(ConstructNode root)
Synthesizes a CloudAssembly from a construct tree.
|
static CloudAssembly |
synth(ConstructNode root,
SynthesisOptions options)
Synthesizes a CloudAssembly from a construct tree.
|
IConstruct |
tryFindChild(String id)
Return a direct child by id, or undefined.
|
Object |
tryGetContext(String key)
Retrieves a value from tree context.
|
static List<ValidationError> |
validate(ConstructNode node)
Invokes "validate" on all constructs in the tree (depth-first, pre-order) and returns the list of all errors.
|
jsiiAsyncCall, jsiiCall, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticGet, jsiiStaticSet@Stability(value=Stable) public static final String PATH_SEP
protected ConstructNode(software.amazon.jsii.JsiiObjectRef objRef)
protected ConstructNode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) public ConstructNode(Construct host, IConstruct scope, String id)
host - This parameter is required.scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) public static void prepare(ConstructNode node)
node - The root node. This parameter is required.@Stability(value=Stable) public static CloudAssembly synth(ConstructNode root, SynthesisOptions options)
root - The root of the construct tree. This parameter is required.options - Synthesis options.@Stability(value=Stable) public static CloudAssembly synth(ConstructNode root)
root - The root of the construct tree. This parameter is required.@Stability(value=Stable) public static List<ValidationError> validate(ConstructNode node)
An empty list indicates that there are no errors.
node - The root node. This parameter is required.@Stability(value=Stable) public void addDependency(IDependable... dependencies)
All constructs in the dependency's scope will be deployed before any construct in this construct's scope.
dependencies - This parameter is required.@Stability(value=Stable) public void addError(String message)
message - The error message. This parameter is required.@Stability(value=Stable) public void addInfo(String message)
message - The info message. This parameter is required.@Stability(value=Stable) public void addMetadata(String type, Object data, Object from)
type - a string denoting the type of metadata. This parameter is required.data - the value of the metadata (can be a Token). This parameter is required.from - a function under which to restrict the metadata entry's stack trace (defaults to this.addMetadata).@Stability(value=Stable) public void addMetadata(String type, Object data)
type - a string denoting the type of metadata. This parameter is required.data - the value of the metadata (can be a Token). This parameter is required.@Stability(value=Stable) public void addWarning(String message)
message - The warning message. This parameter is required.@Stability(value=Stable) public void applyAspect(IAspect aspect)
aspect - This parameter is required.@Stability(value=Stable) public List<IConstruct> findAll(ConstructOrder order)
order - @Stability(value=Stable) public List<IConstruct> findAll()
@Stability(value=Stable) public IConstruct findChild(String id)
Throws an error if the child is not found.
id - Identifier of direct child. This parameter is required.@Stability(value=Stable) public void setContext(String key, Object value)
key - The context key. This parameter is required.value - The context value. This parameter is required.@Stability(value=Stable) public IConstruct tryFindChild(String id)
id - Identifier of direct child. This parameter is required.@Stability(value=Stable) public Object tryGetContext(String key)
Context is usually initialized at the root, but can be overridden at any point in the tree.
key - The context key. This parameter is required.@Stability(value=Stable) public List<IConstruct> getChildren()
@Stability(value=Stable) public List<Dependency> getDependencies()
@Stability(value=Stable) public String getId()
This is a a scope-unique id. To obtain an app-unique id for this construct, use uniqueId.
@Stability(value=Stable) public Boolean getLocked()
@Stability(value=Stable) public List<MetadataEntry> getMetadata()
@Stability(value=Stable) public String getPath()
Components are separated by '/'.
@Stability(value=Stable) public IConstruct getRoot()
@Stability(value=Stable) public List<IConstruct> getScopes()
@Stability(value=Stable) public String getUniqueId()
@Stability(value=Stable) public IConstruct getScope()
The value is undefined at the root of the construct scope tree.
@Stability(value=Stable) public IConstruct getDefaultChild()
This should only be used in the cases where the correct default child is not named 'Resource' or 'Default' as it should be.
If you set this to undefined, the default behavior of finding the child named 'Resource' or 'Default' will be used.
@Stability(value=Stable) public void setDefaultChild(IConstruct value)
This should only be used in the cases where the correct default child is not named 'Resource' or 'Default' as it should be.
If you set this to undefined, the default behavior of finding the child named 'Resource' or 'Default' will be used.
Copyright © 2019. All rights reserved.