@Generated(value="jsii-pacmak/0.21.2 (build 4370756)", date="2020-01-23T18:16:35.499Z") @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.
|
Boolean |
tryRemoveChild(String childName)
Remove the child with the given name, if present.
|
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)
The toolkit will fail synthesis when errors are reported.
message - The error message. This parameter is required.@Stability(value=Stable) public void addInfo(String message)
The toolkit will display the info message when apps are synthesized.
message - The info message. This parameter is required.@Stability(value=Stable) public void addMetadata(String type, Object data, Object from)
Entries are arbitrary values and will also include a stack trace to allow tracing back to the code location for when the entry was added. It can be used, for example, to include source mapping in CloudFormation templates to improve diagnostics.
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)
Entries are arbitrary values and will also include a stack trace to allow tracing back to the code location for when the entry was added. It can be used, for example, to include source mapping in CloudFormation templates to improve diagnostics.
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)
The toolkit will display the warning when an app is synthesized, or fail if run in --strict mode.
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)
Context must be set before any children are added, since children may consult context info during construction. If the key already exists, it will be overridden.
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=Experimental) public Boolean tryRemoveChild(String childName)
EXPERIMENTAL
childName - 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()
This can be used, for example, to implement support for deprecation notices, source mapping, etc.
@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()
Includes all components of the tree.
@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 is usually the construct that provides the bulk of the underlying functionality. Useful for modifications of the underlying construct that are not available at the higher levels. Override the defaultChild property.
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 is usually the construct that provides the bulk of the underlying functionality. Useful for modifications of the underlying construct that are not available at the higher levels. Override the defaultChild property.
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 © 2020. All rights reserved.