API Reference
Constructs
CdkGraph
CdkGraph construct is the cdk-graph framework controller that is responsible for computing the graph, storing serialized graph, and instrumenting plugins per the plugin contract.
Initializers
import software.aws.pdk.cdk_graph.CdkGraph;
CdkGraph.Builder.create(Construct root)
// .plugins(java.util.List<ICdkGraphPlugin>)
.build();
Name | Type | Description |
---|---|---|
root |
software.constructs.Construct |
No description. |
plugins |
java.util.List<ICdkGraphPlugin> |
List of plugins to extends the graph. |
root
Required
- Type: software.constructs.Construct
plugins
Optional
- Type: java.util.List<ICdkGraphPlugin>
List of plugins to extends the graph.
Plugins are invoked at each phases in fifo order.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
report |
Asynchronous report generation. This operation enables running expensive and non-synchronous report generation by plugins post synthesis. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
report
public void report()
Asynchronous report generation. This operation enables running expensive and non-synchronous report generation by plugins post synthesis.
If a given plugin requires performing asynchronous operations or is general expensive, it should
utilize report
rather than synthesize
.
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
import software.aws.pdk.cdk_graph.CdkGraph;
CdkGraph.isConstruct(java.lang.Object x)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: java.lang.Object
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
software.constructs.Node |
The tree node. |
config |
java.util.Map |
Config. |
plugins |
java.util.List<ICdkGraphPlugin> |
List of plugins registered with this instance. |
root |
software.constructs.Construct |
No description. |
graphContext |
CdkGraphContext |
Get the context for the graph instance. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
config
Required
public java.util.Map<java.lang.String, java.lang.Object> getConfig();
- Type: java.util.Map
Config.
plugins
Required
public java.util.List<ICdkGraphPlugin> getPlugins();
- Type: java.util.List<ICdkGraphPlugin>
List of plugins registered with this instance.
root
Required
public Construct getRoot();
- Type: software.constructs.Construct
graphContext
Optional
public CdkGraphContext getGraphContext();
- Type: CdkGraphContext
Get the context for the graph instance.
This will be undefined
before construct synthesis has initiated.
Constants
Name | Type | Description |
---|---|---|
ID |
java.lang.String |
Fixed CdkGraph construct id. |
VERSION |
java.lang.String |
Current CdkGraph semantic version. |
ID
Required
public java.lang.String getId();
- Type: java.lang.String
Fixed CdkGraph construct id.
VERSION
Required
public java.lang.String getVersion();
- Type: java.lang.String
Current CdkGraph semantic version.
Structs
CdkGraphArtifact
CdkGraph artifact definition.
Initializer
import software.aws.pdk.cdk_graph.CdkGraphArtifact;
CdkGraphArtifact.builder()
.filename(java.lang.String)
.filepath(java.lang.String)
.id(java.lang.String)
.source(java.lang.String)
// .description(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
filename |
java.lang.String |
Filename of the artifact. |
filepath |
java.lang.String |
Full path where artifact is stored. |
id |
java.lang.String |
The unique type of the artifact. |
source |
java.lang.String |
The source of the artifact (such as plugin, or core system, etc). |
description |
java.lang.String |
Description of artifact. |
filename
Required
public java.lang.String getFilename();
- Type: java.lang.String
Filename of the artifact.
filepath
Required
public java.lang.String getFilepath();
- Type: java.lang.String
Full path where artifact is stored.
id
Required
public java.lang.String getId();
- Type: java.lang.String
The unique type of the artifact.
source
Required
public java.lang.String getSource();
- Type: java.lang.String
The source of the artifact (such as plugin, or core system, etc).
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
Description of artifact.
ConstructInfo
Source information on a construct (class fqn and version).
Initializer
import software.aws.pdk.cdk_graph.ConstructInfo;
ConstructInfo.builder()
.fqn(java.lang.String)
.version(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
fqn |
java.lang.String |
No description. |
version |
java.lang.String |
No description. |
fqn
Required
public java.lang.String getFqn();
- Type: java.lang.String
version
Required
public java.lang.String getVersion();
- Type: java.lang.String
FilterValue
Filter value to use.
Initializer
import software.aws.pdk.cdk_graph.FilterValue;
FilterValue.builder()
// .regex(java.lang.String)
// .value(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
regex |
java.lang.String |
String representation of a regex. |
value |
java.lang.String |
Raw value. |
regex
Optional
public java.lang.String getRegex();
- Type: java.lang.String
String representation of a regex.
value
Optional
public java.lang.String getValue();
- Type: java.lang.String
Raw value.
ICdkGraphProps
{@link CdkGraph} props.
Initializer
import software.aws.pdk.cdk_graph.ICdkGraphProps;
ICdkGraphProps.builder()
// .plugins(java.util.List<ICdkGraphPlugin>)
.build();
Properties
Name | Type | Description |
---|---|---|
plugins |
java.util.List<ICdkGraphPlugin> |
List of plugins to extends the graph. |
plugins
Optional
public java.util.List<ICdkGraphPlugin> getPlugins();
- Type: java.util.List<ICdkGraphPlugin>
List of plugins to extends the graph.
Plugins are invoked at each phases in fifo order.
IFilter
A filter than can be applied to the graph.
Initializer
import software.aws.pdk.cdk_graph.IFilter;
IFilter.builder()
// .graph(IGraphFilter)
// .store(IGraphStoreFilter)
.build();
Properties
Name | Type | Description |
---|---|---|
graph |
IGraphFilter |
Graph Filter. |
store |
IGraphStoreFilter |
Store Filter. |
graph
Optional
public IGraphFilter getGraph();
- Type: IGraphFilter
Graph Filter.
store
Optional
public IGraphStoreFilter getStore();
- Type: IGraphStoreFilter
Store Filter.
IGraphFilter
Graph filter.
Initializer
import software.aws.pdk.cdk_graph.IGraphFilter;
IGraphFilter.builder()
// .allNodes(java.lang.Boolean)
// .edge(IEdgePredicate)
// .inverse(java.lang.Boolean)
// .node(INodePredicate)
// .strategy(FilterStrategy)
.build();
Properties
Name | Type | Description |
---|---|---|
allNodes |
java.lang.Boolean |
Indicates that all nodes will be filtered, rather than just Resource and CfnResource nodes. |
edge |
IEdgePredicate |
Predicate to match edges. |
inverse |
java.lang.Boolean |
Indicates that matches will be filtered, as opposed to non-matches. |
node |
INodePredicate |
Predicate to match nodes. |
strategy |
FilterStrategy |
Filter strategy to apply to matching nodes. |
allNodes
Optional
public java.lang.Boolean getAllNodes();
- Type: java.lang.Boolean
Indicates that all nodes will be filtered, rather than just Resource and CfnResource nodes.
By enabling this, all Stages, Stacks, and structural construct boundaries will be filtered as well. In general, most users intent is to operate against resources and desire to preserve structural groupings, which is common in most Cfn/Cdk based filtering where inputs are "include" lists.
Defaults to value of containing {@link IGraphFilterPlan.allNodes}
edge
Optional
public IEdgePredicate getEdge();
- Type: IEdgePredicate
Predicate to match edges.
Edges are evaluated after nodes are filtered.
inverse
Optional
public java.lang.Boolean getInverse();
- Type: java.lang.Boolean
- Default: false - Preserve matches, and filter out non-matches.
Indicates that matches will be filtered, as opposed to non-matches.
The default follows common Javascript Array.filter precedence of preserving matches during filtering, while pruning non-matches.
node
Optional
public INodePredicate getNode();
- Type: INodePredicate
Predicate to match nodes.
strategy
Optional
public FilterStrategy getStrategy();
- Type: FilterStrategy
- Default: {FilterStrategy.PRUNE}
Filter strategy to apply to matching nodes.
Edges do not have a strategy, they are always pruned.
IGraphFilterPlan
Graph filter plan.
Initializer
import software.aws.pdk.cdk_graph.IGraphFilterPlan;
IGraphFilterPlan.builder()
// .allNodes(java.lang.Boolean)
// .filters(java.util.List<IFilter>)
// .focus(IGraphFilterPlanFocusConfig)
// .order(ConstructOrder)
// .preset(FilterPreset)
.build();
Properties
Name | Type | Description |
---|---|---|
allNodes |
java.lang.Boolean |
Indicates that all nodes will be filtered, rather than just Resource and CfnResource nodes. |
filters |
java.util.List<IFilter> |
Ordered list of {@link IGraphFilter} and {@link IGraphStoreFilter} filters to apply to the store. |
focus |
IGraphFilterPlanFocusConfig |
Config to focus the graph on specific node. |
order |
software.constructs.ConstructOrder |
The order to visit nodes and edges during filtering. |
preset |
FilterPreset |
Optional preset filter to apply before other filters. |
allNodes
Optional
public java.lang.Boolean getAllNodes();
- Type: java.lang.Boolean
- Default: false By default only Resource and CfnResource nodes are filtered.
Indicates that all nodes will be filtered, rather than just Resource and CfnResource nodes.
By enabling this, all Stages, Stacks, and structural construct boundaries will be filtered as well. In general, most users intent is to operate against resources and desire to preserve structural groupings, which is common in most Cfn/Cdk based filtering where inputs are "include" lists.
filters
Optional
public java.util.List<IFilter> getFilters();
- Type: java.util.List<IFilter>
Ordered list of {@link IGraphFilter} and {@link IGraphStoreFilter} filters to apply to the store.
- Filters are applied after the preset filtering is applied if present.
- Filters are applied sequentially against all nodes, as opposed to IAspect.visitor pattern which are sequentially applied per node.
focus
Optional
public IGraphFilterPlanFocusConfig getFocus();
Config to focus the graph on specific node.
order
Optional
public ConstructOrder getOrder();
- Type: software.constructs.ConstructOrder
- Default: {ConstructOrder.PREORDER}
The order to visit nodes and edges during filtering.
preset
Optional
public FilterPreset getPreset();
- Type: FilterPreset
Optional preset filter to apply before other filters.
IGraphFilterPlanFocusConfig
Initializer
import software.aws.pdk.cdk_graph.IGraphFilterPlanFocusConfig;
IGraphFilterPlanFocusConfig.builder()
.filter(IFilterFocusCallback)
// .noHoist(java.lang.Boolean)
.build();
Properties
Name | Type | Description |
---|---|---|
filter |
IFilterFocusCallback |
The node or resolver to determine the node to focus on. |
noHoist |
java.lang.Boolean |
Indicates if ancestral containers are preserved (eg: Stages, Stack). |
filter
Required
public IFilterFocusCallback getFilter();
- Type: IFilterFocusCallback
The node or resolver to determine the node to focus on.
noHoist
Optional
public java.lang.Boolean getNoHoist();
- Type: java.lang.Boolean
- Default: true
Indicates if ancestral containers are preserved (eg: Stages, Stack).
If false
, the "focused node" will be hoisted to the graph root and all ancestors will be pruned.
If true
, the "focused" will be left in-place, while all siblings and non-scope ancestors will be pruned.
InferredNodeProps
Inferred node props.
Initializer
import software.aws.pdk.cdk_graph.InferredNodeProps;
InferredNodeProps.builder()
.uuid(java.lang.String)
// .attributes(java.util.Map<java.lang.String, java.lang.String)
// .attributes(java.lang.Number)
// .attributes(java.lang.Boolean)
// .attributes(PlainObject)
// .attributes(java.util.List<java.lang.String)
// .attributes(java.lang.Number)
// .attributes(java.lang.Boolean)
// .attributes(PlainObject>>)
// .flags(java.util.List<FlagEnum>)
// .metadata(java.util.List<MetadataEntry>)
// .tags(java.util.Map<java.lang.String, java.lang.String>)
.dependencies(java.util.List<java.lang.String>)
.unresolvedReferences(java.util.List<SGUnresolvedReference>)
// .cfnType(java.lang.String)
// .constructInfo(ConstructInfo)
// .logicalId(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
uuid |
java.lang.String |
Universally unique identity. |
attributes |
java.util.Map |
Serializable entity attributes. |
flags |
java.util.List<FlagEnum> |
Serializable entity flags. |
metadata |
java.util.List |
Serializable entity metadata. |
tags |
java.util.Map |
Serializable entity tags. |
dependencies |
java.util.List |
No description. |
unresolvedReferences |
java.util.List<SGUnresolvedReference> |
No description. |
cfnType |
java.lang.String |
No description. |
constructInfo |
ConstructInfo |
No description. |
logicalId |
java.lang.String |
No description. |
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identity.
attributes
Optional
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Serializable entity attributes.
flags
Optional
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Serializable entity flags.
metadata
Optional
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Serializable entity metadata.
tags
Optional
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Serializable entity tags.
dependencies
Required
public java.util.List<java.lang.String> getDependencies();
- Type: java.util.List
unresolvedReferences
Required
public java.util.List<SGUnresolvedReference> getUnresolvedReferences();
- Type: java.util.List<SGUnresolvedReference>
cfnType
Optional
public java.lang.String getCfnType();
- Type: java.lang.String
constructInfo
Optional
public ConstructInfo getConstructInfo();
- Type: ConstructInfo
logicalId
Optional
public java.lang.String getLogicalId();
- Type: java.lang.String
PlainObject
Serializable plain object value (JSII supported).
Initializer
import software.aws.pdk.cdk_graph.PlainObject;
PlainObject.builder()
.build();
SGEdge
Serializable graph edge entity.
Initializer
import software.aws.pdk.cdk_graph.SGEdge;
SGEdge.builder()
.uuid(java.lang.String)
// .attributes(java.util.Map<java.lang.String, java.lang.String)
// .attributes(java.lang.Number)
// .attributes(java.lang.Boolean)
// .attributes(PlainObject)
// .attributes(java.util.List<java.lang.String)
// .attributes(java.lang.Number)
// .attributes(java.lang.Boolean)
// .attributes(PlainObject>>)
// .flags(java.util.List<FlagEnum>)
// .metadata(java.util.List<MetadataEntry>)
// .tags(java.util.Map<java.lang.String, java.lang.String>)
.direction(EdgeDirectionEnum)
.edgeType(EdgeTypeEnum)
.source(java.lang.String)
.target(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
uuid |
java.lang.String |
Universally unique identity. |
attributes |
java.util.Map |
Serializable entity attributes. |
flags |
java.util.List<FlagEnum> |
Serializable entity flags. |
metadata |
java.util.List |
Serializable entity metadata. |
tags |
java.util.Map |
Serializable entity tags. |
direction |
EdgeDirectionEnum |
Indicates the direction in which the edge is directed. |
edgeType |
EdgeTypeEnum |
Type of edge. |
source |
java.lang.String |
UUID of edge source node (tail). |
target |
java.lang.String |
UUID of edge target node (head). |
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identity.
attributes
Optional
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Serializable entity attributes.
flags
Optional
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Serializable entity flags.
metadata
Optional
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Serializable entity metadata.
tags
Optional
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Serializable entity tags.
direction
Required
public EdgeDirectionEnum getDirection();
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edgeType
Required
public EdgeTypeEnum getEdgeType();
- Type: EdgeTypeEnum
Type of edge.
source
Required
public java.lang.String getSource();
- Type: java.lang.String
UUID of edge source node (tail).
target
Required
public java.lang.String getTarget();
- Type: java.lang.String
UUID of edge target node (head).
SGEntity
Serializable graph entity.
Initializer
import software.aws.pdk.cdk_graph.SGEntity;
SGEntity.builder()
.uuid(java.lang.String)
// .attributes(java.util.Map<java.lang.String, java.lang.String)
// .attributes(java.lang.Number)
// .attributes(java.lang.Boolean)
// .attributes(PlainObject)
// .attributes(java.util.List<java.lang.String)
// .attributes(java.lang.Number)
// .attributes(java.lang.Boolean)
// .attributes(PlainObject>>)
// .flags(java.util.List<FlagEnum>)
// .metadata(java.util.List<MetadataEntry>)
// .tags(java.util.Map<java.lang.String, java.lang.String>)
.build();
Properties
Name | Type | Description |
---|---|---|
uuid |
java.lang.String |
Universally unique identity. |
attributes |
java.util.Map |
Serializable entity attributes. |
flags |
java.util.List<FlagEnum> |
Serializable entity flags. |
metadata |
java.util.List |
Serializable entity metadata. |
tags |
java.util.Map |
Serializable entity tags. |
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identity.
attributes
Optional
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Serializable entity attributes.
flags
Optional
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Serializable entity flags.
metadata
Optional
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Serializable entity metadata.
tags
Optional
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Serializable entity tags.
SGGraphStore
Serializable graph store.
Initializer
import software.aws.pdk.cdk_graph.SGGraphStore;
SGGraphStore.builder()
.edges(java.util.List<SGEdge>)
.tree(SGNode)
.version(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
edges |
java.util.List<SGEdge> |
List of edges. |
tree |
SGNode |
Node tree. |
version |
java.lang.String |
Store version. |
edges
Required
public java.util.List<SGEdge> getEdges();
- Type: java.util.List<SGEdge>
List of edges.
tree
Required
public SGNode getTree();
- Type: SGNode
Node tree.
version
Required
public java.lang.String getVersion();
- Type: java.lang.String
Store version.
SGNode
Serializable graph node entity.
Initializer
import software.aws.pdk.cdk_graph.SGNode;
SGNode.builder()
.uuid(java.lang.String)
// .attributes(java.util.Map<java.lang.String, java.lang.String)
// .attributes(java.lang.Number)
// .attributes(java.lang.Boolean)
// .attributes(PlainObject)
// .attributes(java.util.List<java.lang.String)
// .attributes(java.lang.Number)
// .attributes(java.lang.Boolean)
// .attributes(PlainObject>>)
// .flags(java.util.List<FlagEnum>)
// .metadata(java.util.List<MetadataEntry>)
// .tags(java.util.Map<java.lang.String, java.lang.String>)
.id(java.lang.String)
.nodeType(NodeTypeEnum)
.path(java.lang.String)
// .cfnType(java.lang.String)
// .children(java.util.Map<java.lang.String, SGNode>)
// .constructInfo(ConstructInfo)
// .edges(java.util.List<java.lang.String>)
// .logicalId(java.lang.String)
// .parent(java.lang.String)
// .stack(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
uuid |
java.lang.String |
Universally unique identity. |
attributes |
java.util.Map |
Serializable entity attributes. |
flags |
java.util.List<FlagEnum> |
Serializable entity flags. |
metadata |
java.util.List |
Serializable entity metadata. |
tags |
java.util.Map |
Serializable entity tags. |
id |
java.lang.String |
Node id within parent (unique only between parent child nodes). |
nodeType |
NodeTypeEnum |
Node type. |
path |
java.lang.String |
Node path. |
cfnType |
java.lang.String |
CloudFormation resource type for this node. |
children |
java.util.Map |
Child node record. |
constructInfo |
ConstructInfo |
Synthesized construct information defining jii resolution data. |
edges |
java.util.List |
List of edge UUIDs where this node is the source. |
logicalId |
java.lang.String |
Logical id of the node, which is only unique within containing stack. |
parent |
java.lang.String |
UUID of node parent. |
stack |
java.lang.String |
UUID of node stack. |
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identity.
attributes
Optional
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Serializable entity attributes.
flags
Optional
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Serializable entity flags.
metadata
Optional
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Serializable entity metadata.
tags
Optional
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Serializable entity tags.
id
Required
public java.lang.String getId();
- Type: java.lang.String
Node id within parent (unique only between parent child nodes).
nodeType
Required
public NodeTypeEnum getNodeType();
- Type: NodeTypeEnum
Node type.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
Node path.
cfnType
Optional
public java.lang.String getCfnType();
- Type: java.lang.String
CloudFormation resource type for this node.
children
Optional
public java.util.Map<java.lang.String, SGNode> getChildren();
- Type: java.util.Map
SGNode\>
Child node record.
constructInfo
Optional
public ConstructInfo getConstructInfo();
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
edges
Optional
public java.util.List<java.lang.String> getEdges();
- Type: java.util.List
List of edge UUIDs where this node is the source.
logicalId
Optional
public java.lang.String getLogicalId();
- Type: java.lang.String
Logical id of the node, which is only unique within containing stack.
parent
Optional
public java.lang.String getParent();
- Type: java.lang.String
UUID of node parent.
stack
Optional
public java.lang.String getStack();
- Type: java.lang.String
UUID of node stack.
SGUnresolvedReference
Unresolved reference struct.
During graph computation references are unresolved and stored in this struct.
Initializer
import software.aws.pdk.cdk_graph.SGUnresolvedReference;
SGUnresolvedReference.builder()
.referenceType(ReferenceTypeEnum)
.source(java.lang.String)
.target(java.lang.String)
// .value(java.lang.String)
// .value(java.lang.Number)
// .value(java.lang.Boolean)
// .value(PlainObject)
// .value(java.util.List<java.lang.String)
// .value(java.lang.Number)
// .value(java.lang.Boolean)
// .value(PlainObject>)
.build();
Properties
Name | Type | Description |
---|---|---|
referenceType |
ReferenceTypeEnum |
No description. |
source |
java.lang.String |
No description. |
target |
java.lang.String |
No description. |
value |
java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject OR java.util.List |
No description. |
referenceType
Required
public ReferenceTypeEnum getReferenceType();
- Type: ReferenceTypeEnum
source
Required
public java.lang.String getSource();
- Type: java.lang.String
target
Required
public java.lang.String getTarget();
- Type: java.lang.String
value
Optional
public java.lang.Object getValue();
- Type: java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject OR java.util.List
PlainObject\>
Classes
AppNode
AppNode defines a cdk App.
Initializers
import software.aws.pdk.cdk_graph.AppNode;
new AppNode(IAppNodeProps props);
Name | Type | Description |
---|---|---|
props |
IAppNodeProps |
No description. |
props
Required
- Type: IAppNodeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroys this node by removing all references and removing this node from the store. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
addChild |
Add child node. |
addLink |
Add link to another node. |
addReverseLink |
Add link from another node. |
doesDependOn |
Indicates if this node depends on another node. |
doesReference |
Indicates if this node references another node. |
find |
Recursively find the nearest sub-node matching predicate. |
findAll |
Return this construct and all of its sub-nodes in the given order. |
findAllLinks |
Return all direct links of this node and that of all sub-nodes. |
findAncestor |
Find nearest ancestor of this node matching given predicate. |
findChild |
Find child with given id. |
findLink |
Find link of this node based on predicate. |
findLinks |
Find all links of this node based on predicate. |
getCfnProp |
Get specific CloudFormation property. |
getChild |
Get child node with given id. |
getLinkChains |
Resolve all link chains. |
getNearestAncestor |
Gets the nearest common ancestor shared between this node and another node. |
isAncestor |
Indicates if a specific node is an ancestor of this node. |
isChild |
Indicates if specific node is a child of this node. |
mutateCollapse |
Collapses all sub-nodes of this node into this node. |
mutateCollapseTo |
Collapses this node into an ancestor. |
mutateCollapseToParent |
Collapses this node into it's parent node. |
mutateHoist |
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor. |
mutateMove |
Move this node into a new parent node. |
mutateRemoveChild |
Remove a child node from this node. |
mutateRemoveLink |
Remove a link from this node. |
mutateRemoveReverseLink |
Remove a link to this node. |
mutateUncluster |
Hoist all children to parent and collapse node to parent. |
toString |
Get string representation of this node. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean strict)
Destroys this node by removing all references and removing this node from the store.
strict
Optional
- Type: java.lang.Boolean
Indicates that this node must not have references.
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
addChild
public void addChild(Node node)
Add child node.
node
Required
- Type: Node
addLink
public void addLink(Edge edge)
Add link to another node.
edge
Required
- Type: Edge
addReverseLink
public void addReverseLink(Edge edge)
Add link from another node.
edge
Required
- Type: Edge
doesDependOn
public java.lang.Boolean doesDependOn(Node node)
Indicates if this node depends on another node.
node
Required
- Type: Node
doesReference
public java.lang.Boolean doesReference(Node node)
Indicates if this node references another node.
node
Required
- Type: Node
find
public Node find(INodePredicate predicate)
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
findAll
public java.util.List<Node> findAll()
public java.util.List<Node> findAll(IFindNodeOptions options)
Return this construct and all of its sub-nodes in the given order.
Optionally filter nodes based on predicate.
options
Optional
- Type: IFindNodeOptions
findAllLinks
public java.util.List<Edge> findAllLinks()
public java.util.List<Edge> findAllLinks(IFindEdgeOptions options)
Return all direct links of this node and that of all sub-nodes.
Optionally filter links based on predicate.
options
Optional
- Type: IFindEdgeOptions
findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- Type: java.lang.Number
findChild
public Node findChild(java.lang.String id)
Find child with given id.
Similar to find
but does not throw error if no child found.
id
Required
- Type: java.lang.String
findLink
public Edge findLink(IEdgePredicate predicate)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find link of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
findLinks
public java.util.List<Edge> findLinks(IEdgePredicate predicate)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find all links of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
getCfnProp
public java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject OR java.util.List<java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject> getCfnProp(java.lang.String key)
Get specific CloudFormation property.
key
Required
- Type: java.lang.String
getChild
public Node getChild(java.lang.String id)
Get child node with given id.
id
Required
- Type: java.lang.String
getLinkChains
public java.util.List<java.util.List<java.lang.Object>> getLinkChains()
public java.util.List<java.util.List<java.lang.Object>> getLinkChains(java.lang.Boolean reverse)
Resolve all link chains.
reverse
Optional
- Type: java.lang.Boolean
getNearestAncestor
public Node getNearestAncestor(Node node)
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
isAncestor
public java.lang.Boolean isAncestor(Node ancestor)
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
isChild
public java.lang.Boolean isChild(Node node)
Indicates if specific node is a child of this node.
node
Required
- Type: Node
mutateCollapse
public void mutateCollapse()
Collapses all sub-nodes of this node into this node.
mutateCollapseTo
public Node mutateCollapseTo(Node ancestor)
Collapses this node into an ancestor.
ancestor
Required
- Type: Node
mutateCollapseToParent
public Node mutateCollapseToParent()
Collapses this node into it's parent node.
mutateHoist
public void mutateHoist(Node newParent)
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
newParent
Required
- Type: Node
mutateMove
public void mutateMove(Node newParent)
Move this node into a new parent node.
newParent
Required
- Type: Node
The parent to move this node to.
mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)
Remove a child node from this node.
node
Required
- Type: Node
mutateRemoveLink
public java.lang.Boolean mutateRemoveLink(Edge link)
Remove a link from this node.
link
Required
- Type: Edge
mutateRemoveReverseLink
public java.lang.Boolean mutateRemoveReverseLink(Edge link)
Remove a link to this node.
link
Required
- Type: Edge
mutateUncluster
public void mutateUncluster()
Hoist all children to parent and collapse node to parent.
toString
public java.lang.String toString()
Get string representation of this node.
Static Functions
Name | Description |
---|---|
isAppNode |
Indicates if node is a {@link AppNode}. |
isAppNode
import software.aws.pdk.cdk_graph.AppNode;
AppNode.isAppNode(Node node)
Indicates if node is a {@link AppNode}.
node
Required
- Type: Node
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if this node allows destructive mutations. |
children |
java.util.List<Node> |
Get all direct child nodes. |
dependedOnBy |
java.util.List<Node> |
Get list of Nodes that depend on this node. |
dependencies |
java.util.List<Node> |
Get list of Nodes that this node depends on. |
dependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the source. |
depth |
java.lang.Number |
Indicates the depth of the node relative to root (0). |
id |
java.lang.String |
Node id, which is only unique within parent scope. |
isAsset |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.ASSET}. |
isCfnFqn |
java.lang.Boolean |
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct. |
isCluster |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.CLUSTER}. |
isCustomResource |
java.lang.Boolean |
Indicates if node is a Custom Resource. |
isExtraneous |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children. |
isGraphContainer |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}. |
isLeaf |
java.lang.Boolean |
Indicates if this node is a leaf node, which means it does not have children. |
isTopLevel |
java.lang.Boolean |
Indicates if node is direct child of the graph root node. |
links |
java.util.List<Edge> |
Gets all links (edges) in which this node is the source. |
nodeType |
NodeTypeEnum |
Type of node. |
path |
java.lang.String |
Path of the node. |
referencedBy |
java.util.List<Node> |
Get list of Nodes that reference this node. |
referenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the source. |
references |
java.util.List<Node> |
Get list of Nodes that this node references. |
reverseDependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the target. |
reverseLinks |
java.util.List<Edge> |
Gets all links (edges) in which this node is the target. |
reverseReferenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the target. |
scopes |
java.util.List<Node> |
Gets descending ordered list of ancestors from the root. |
siblings |
java.util.List<Node> |
Get list of siblings of this node. |
cfnProps |
PlainObject |
Gets CloudFormation properties for this node. |
cfnType |
java.lang.String |
Get the CloudFormation resource type for this node. |
constructInfo |
ConstructInfo |
Synthesized construct information defining jii resolution data. |
constructInfoFqn |
java.lang.String |
Synthesized construct information defining jii resolution data. |
logicalId |
java.lang.String |
Logical id of the node, which is only unique within containing stack. |
parent |
Node |
Parent node. |
rootStack |
StackNode |
Get root stack. |
stack |
StackNode |
Stack the node is contained in. |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if this node allows destructive mutations.
children
Required
public java.util.List<Node> getChildren();
- Type: java.util.List<Node>
Get all direct child nodes.
dependedOnBy
Required
public java.util.List<Node> getDependedOnBy();
- Type: java.util.List<Node>
Get list of Nodes that depend on this node.
dependencies
Required
public java.util.List<Node> getDependencies();
- Type: java.util.List<Node>
Get list of Nodes that this node depends on.
dependencyLinks
Required
public java.util.List<Dependency> getDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
public java.lang.Number getDepth();
- Type: java.lang.Number
Indicates the depth of the node relative to root (0).
id
Required
public java.lang.String getId();
- Type: java.lang.String
Node id, which is only unique within parent scope.
isAsset
Required
public java.lang.Boolean getIsAsset();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.ASSET}.
isCfnFqn
Required
public java.lang.Boolean getIsCfnFqn();
- Type: java.lang.Boolean
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
isCluster
Required
public java.lang.Boolean getIsCluster();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
isCustomResource
Required
public java.lang.Boolean getIsCustomResource();
- Type: java.lang.Boolean
Indicates if node is a Custom Resource.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
isGraphContainer
Required
public java.lang.Boolean getIsGraphContainer();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
isLeaf
Required
public java.lang.Boolean getIsLeaf();
- Type: java.lang.Boolean
Indicates if this node is a leaf node, which means it does not have children.
isTopLevel
Required
public java.lang.Boolean getIsTopLevel();
- Type: java.lang.Boolean
Indicates if node is direct child of the graph root node.
links
Required
public java.util.List<Edge> getLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the source.
nodeType
Required
public NodeTypeEnum getNodeType();
- Type: NodeTypeEnum
Type of node.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
Path of the node.
referencedBy
Required
public java.util.List<Node> getReferencedBy();
- Type: java.util.List<Node>
Get list of Nodes that reference this node.
referenceLinks
Required
public java.util.List<Reference> getReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
public java.util.List<Node> getReferences();
- Type: java.util.List<Node>
Get list of Nodes that this node references.
reverseDependencyLinks
Required
public java.util.List<Dependency> getReverseDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the target.
reverseLinks
Required
public java.util.List<Edge> getReverseLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the target.
reverseReferenceLinks
Required
public java.util.List<Reference> getReverseReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
public java.util.List<Node> getScopes();
- Type: java.util.List<Node>
Gets descending ordered list of ancestors from the root.
siblings
Required
public java.util.List<Node> getSiblings();
- Type: java.util.List<Node>
Get list of siblings of this node.
cfnProps
Optional
public PlainObject getCfnProps();
- Type: PlainObject
Gets CloudFormation properties for this node.
cfnType
Optional
public java.lang.String getCfnType();
- Type: java.lang.String
Get the CloudFormation resource type for this node.
constructInfo
Optional
public ConstructInfo getConstructInfo();
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
constructInfoFqn
Optional
public java.lang.String getConstructInfoFqn();
- Type: java.lang.String
Synthesized construct information defining jii resolution data.
logicalId
Optional
public java.lang.String getLogicalId();
- Type: java.lang.String
Logical id of the node, which is only unique within containing stack.
parent
Optional
public Node getParent();
- Type: Node
Parent node.
Only the root node should not have parent.
rootStack
Optional
public StackNode getRootStack();
- Type: StackNode
Get root stack.
stack
Optional
public StackNode getStack();
- Type: StackNode
Stack the node is contained in.
Constants
Name | Type | Description |
---|---|---|
PATH |
java.lang.String |
Fixed path of the App. |
UUID |
java.lang.String |
Fixed UUID for App node. |
PATH
Required
public java.lang.String getPath();
- Type: java.lang.String
Fixed path of the App.
UUID
Required
public java.lang.String getUuid();
- Type: java.lang.String
Fixed UUID for App node.
AttributeReference
Attribute type reference edge.
Initializers
import software.aws.pdk.cdk_graph.AttributeReference;
new AttributeReference(IAttributeReferenceProps props);
Name | Type | Description |
---|---|---|
props |
IAttributeReferenceProps |
No description. |
props
Required
- Type: IAttributeReferenceProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroy the edge. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
isEquivalent |
Indicates if this edge is equivalent to another edge. |
mutateConsume |
Merge an equivalent edge's data into this edge and destroy the other edge. |
mutateDirection |
Change the edge direction. |
mutateSource |
Change the edge source. |
mutateTarget |
Change the edge target. |
toString |
Get string representation of this edge. |
resolveChain |
Resolve reference chain. |
resolveTargets |
Resolve targets by following potential edge chain. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean _strict)
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: java.lang.Boolean
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
isEquivalent
public java.lang.Boolean isEquivalent(Edge edge)
Indicates if this edge is equivalent to another edge.
Edges are considered equivalent if they share same type, source, and target.
edge
Required
- Type: Edge
mutateConsume
public void mutateConsume(Edge edge)
Merge an equivalent edge's data into this edge and destroy the other edge.
Used during filtering operations to consolidate equivalent edges.
edge
Required
- Type: Edge
The edge to consume.
mutateDirection
public void mutateDirection(EdgeDirectionEnum direction)
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutateSource
public void mutateSource(Node node)
Change the edge source.
node
Required
- Type: Node
mutateTarget
public void mutateTarget(Node node)
Change the edge target.
node
Required
- Type: Node
toString
public java.lang.String toString()
Get string representation of this edge.
resolveChain
public java.util.List<java.lang.Object> resolveChain()
Resolve reference chain.
resolveTargets
public java.util.List<Node> resolveTargets()
Resolve targets by following potential edge chain.
Static Functions
Name | Description |
---|---|
findAllInChain |
Find all matching edges based on predicate within an EdgeChain. |
findInChain |
Find first edge matching predicate within an EdgeChain. |
isRef |
Indicates if edge is a Ref based {@link Reference} edge. |
isReference |
Indicates if edge is a {@link Reference}. |
isAtt |
Indicates if edge in an Fn::GetAtt {@link Reference}. |
findAllInChain
import software.aws.pdk.cdk_graph.AttributeReference;
AttributeReference.findAllInChain(java.util.List<java.lang.Object> chain, IEdgePredicate predicate)
Find all matching edges based on predicate within an EdgeChain.
chain
Required
- Type: java.util.List
predicate
Required
- Type: IEdgePredicate
findInChain
import software.aws.pdk.cdk_graph.AttributeReference;
AttributeReference.findInChain(java.util.List<java.lang.Object> chain, IEdgePredicate predicate)
Find first edge matching predicate within an EdgeChain.
chain
Required
- Type: java.util.List
predicate
Required
- Type: IEdgePredicate
isRef
import software.aws.pdk.cdk_graph.AttributeReference;
AttributeReference.isRef(Edge edge)
Indicates if edge is a Ref based {@link Reference} edge.
edge
Required
- Type: Edge
isReference
import software.aws.pdk.cdk_graph.AttributeReference;
AttributeReference.isReference(Edge edge)
Indicates if edge is a {@link Reference}.
edge
Required
- Type: Edge
isAtt
import software.aws.pdk.cdk_graph.AttributeReference;
AttributeReference.isAtt(Edge edge)
Indicates if edge in an Fn::GetAtt {@link Reference}.
edge
Required
- Type: Edge
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if edge allows destructive mutations. |
direction |
EdgeDirectionEnum |
Indicates the direction in which the edge is directed. |
edgeType |
EdgeTypeEnum |
Type of edge. |
isClosed |
java.lang.Boolean |
Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations). |
isCrossStack |
java.lang.Boolean |
Indicates if source and target nodes reside in different root stacks. |
isExtraneous |
java.lang.Boolean |
Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target). |
source |
Node |
Edge source is the node that defines the edge (tail). |
target |
Node |
Edge target is the node being referenced by the source (head). |
referenceType |
ReferenceTypeEnum |
Get type of reference. |
value |
java.lang.String |
Get the resolved attribute value. |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if edge allows destructive mutations.
direction
Required
public EdgeDirectionEnum getDirection();
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edgeType
Required
public EdgeTypeEnum getEdgeType();
- Type: EdgeTypeEnum
Type of edge.
isClosed
Required
public java.lang.Boolean getIsClosed();
- Type: java.lang.Boolean
Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
To check whether it was originally closed, use hasFlag(FlagEnum.CLOSED_EDGE)
instead.
isCrossStack
Required
public java.lang.Boolean getIsCrossStack();
- Type: java.lang.Boolean
Indicates if source and target nodes reside in different root stacks.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).
source
Required
public Node getSource();
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
public Node getTarget();
- Type: Node
Edge target is the node being referenced by the source (head).
referenceType
Required
public ReferenceTypeEnum getReferenceType();
- Type: ReferenceTypeEnum
Get type of reference.
value
Required
public java.lang.String getValue();
- Type: java.lang.String
Get the resolved attribute value.
Constants
Name | Type | Description |
---|---|---|
ATT_TYPE |
java.lang.String |
Attribute defining the type of reference. |
PREFIX |
java.lang.String |
Edge prefix to denote Fn::GetAtt type reference edge. |
ATT_VALUE |
java.lang.String |
Attribute key for resolved value of attribute reference. |
ATT_TYPE
Required
public java.lang.String getAttType();
- Type: java.lang.String
Attribute defining the type of reference.
PREFIX
Required
public java.lang.String getPrefix();
- Type: java.lang.String
Edge prefix to denote Fn::GetAtt type reference edge.
ATT_VALUE
Required
public java.lang.String getAttValue();
- Type: java.lang.String
Attribute key for resolved value of attribute reference.
BaseEntity
- Implements: ISerializableEntity
Base class for all store entities (Node and Edges).
Initializers
import software.aws.pdk.cdk_graph.BaseEntity;
new BaseEntity(IBaseEntityProps props);
Name | Type | Description |
---|---|---|
props |
IBaseEntityProps |
No description. |
props
Required
- Type: IBaseEntityProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroy the entity be removing all references and removing from store. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean strict)
Destroy the entity be removing all references and removing from store.
strict
Optional
- Type: java.lang.Boolean
If strict
, then entity must not have any references remaining when attempting to destroy.
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
CdkGraphContext
CdkGraph context.
Initializers
import software.aws.pdk.cdk_graph.CdkGraphContext;
new CdkGraphContext(Store store, java.lang.String outdir);
Name | Type | Description |
---|---|---|
store |
Store |
No description. |
outdir |
java.lang.String |
No description. |
store
Required
- Type: Store
outdir
Required
- Type: java.lang.String
Methods
Name | Description |
---|---|
getArtifact |
Get CdkGraph artifact by id. |
hasArtifactFile |
Indicates if context has an artifact with filename defined. |
logArtifact |
Logs an artifact entry. |
writeArtifact |
Writes artifact data to outdir and logs the entry. |
getArtifact
public CdkGraphArtifact getArtifact(java.lang.String id)
Get CdkGraph artifact by id.
id
Required
- Type: java.lang.String
hasArtifactFile
public java.lang.Boolean hasArtifactFile(java.lang.String filename)
Indicates if context has an artifact with filename defined.
filename
Required
- Type: java.lang.String
logArtifact
public CdkGraphArtifact logArtifact(CdkGraph OR ICdkGraphPlugin source, java.lang.String id, java.lang.String filepath)
public CdkGraphArtifact logArtifact(CdkGraph OR ICdkGraphPlugin source, java.lang.String id, java.lang.String filepath, java.lang.String description)
Logs an artifact entry.
In general this should not be called directly, as writeArtifact
should be utilized
to perform writing and logging artifacts. However some plugins utilize other tools that generate the artifacts,
in which case the plugin would call this method to log the entry.
source
Required
- Type: CdkGraph OR ICdkGraphPlugin
The source of the artifact, such as the name of plugin.
id
Required
- Type: java.lang.String
Unique id of the artifact.
filepath
Required
- Type: java.lang.String
Full path where the artifact is stored.
description
Optional
- Type: java.lang.String
Description of the artifact.
writeArtifact
public CdkGraphArtifact writeArtifact(CdkGraph OR ICdkGraphPlugin source, java.lang.String id, java.lang.String filename, java.lang.String data)
public CdkGraphArtifact writeArtifact(CdkGraph OR ICdkGraphPlugin source, java.lang.String id, java.lang.String filename, java.lang.String data, java.lang.String description)
Writes artifact data to outdir and logs the entry.
source
Required
- Type: CdkGraph OR ICdkGraphPlugin
The source of the artifact, such as the name of plugin.
id
Required
- Type: java.lang.String
Unique id of the artifact.
filename
Required
- Type: java.lang.String
Relative name of the file.
data
Required
- Type: java.lang.String
description
Optional
- Type: java.lang.String
Description of the artifact.
Properties
Name | Type | Description |
---|---|---|
artifacts |
java.util.Map |
Get record of all graph artifacts keyed by artifact id. |
graphJson |
CdkGraphArtifact |
Get CdkGraph core graph.json artifact. |
outdir |
java.lang.String |
No description. |
store |
Store |
No description. |
artifacts
Required
public java.util.Map<java.lang.String, CdkGraphArtifact> getArtifacts();
- Type: java.util.Map
CdkGraphArtifact\>
Get record of all graph artifacts keyed by artifact id.
graphJson
Required
public CdkGraphArtifact getGraphJson();
- Type: CdkGraphArtifact
Get CdkGraph core graph.json
artifact.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
store
Required
public Store getStore();
- Type: Store
CfnResourceNode
CfnResourceNode defines an L1 cdk resource.
Initializers
import software.aws.pdk.cdk_graph.CfnResourceNode;
new CfnResourceNode(ICfnResourceNodeProps props);
Name | Type | Description |
---|---|---|
props |
ICfnResourceNodeProps |
No description. |
props
Required
- Type: ICfnResourceNodeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroys this node by removing all references and removing this node from the store. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
addChild |
Add child node. |
addLink |
Add link to another node. |
addReverseLink |
Add link from another node. |
doesDependOn |
Indicates if this node depends on another node. |
doesReference |
Indicates if this node references another node. |
find |
Recursively find the nearest sub-node matching predicate. |
findAll |
Return this construct and all of its sub-nodes in the given order. |
findAllLinks |
Return all direct links of this node and that of all sub-nodes. |
findAncestor |
Find nearest ancestor of this node matching given predicate. |
findChild |
Find child with given id. |
findLink |
Find link of this node based on predicate. |
findLinks |
Find all links of this node based on predicate. |
getCfnProp |
Get specific CloudFormation property. |
getChild |
Get child node with given id. |
getLinkChains |
Resolve all link chains. |
getNearestAncestor |
Gets the nearest common ancestor shared between this node and another node. |
isAncestor |
Indicates if a specific node is an ancestor of this node. |
isChild |
Indicates if specific node is a child of this node. |
mutateCollapse |
Collapses all sub-nodes of this node into this node. |
mutateCollapseTo |
Collapses this node into an ancestor. |
mutateCollapseToParent |
Collapses this node into it's parent node. |
mutateHoist |
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor. |
mutateMove |
Move this node into a new parent node. |
mutateRemoveChild |
Remove a child node from this node. |
mutateRemoveLink |
Remove a link from this node. |
mutateRemoveReverseLink |
Remove a link to this node. |
mutateUncluster |
Hoist all children to parent and collapse node to parent. |
toString |
Get string representation of this node. |
isEquivalentFqn |
Evaluates if CfnResourceNode fqn is equivalent to ResourceNode fqn. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean strict)
Destroys this node by removing all references and removing this node from the store.
strict
Optional
- Type: java.lang.Boolean
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
addChild
public void addChild(Node node)
Add child node.
node
Required
- Type: Node
addLink
public void addLink(Edge edge)
Add link to another node.
edge
Required
- Type: Edge
addReverseLink
public void addReverseLink(Edge edge)
Add link from another node.
edge
Required
- Type: Edge
doesDependOn
public java.lang.Boolean doesDependOn(Node node)
Indicates if this node depends on another node.
node
Required
- Type: Node
doesReference
public java.lang.Boolean doesReference(Node node)
Indicates if this node references another node.
node
Required
- Type: Node
find
public Node find(INodePredicate predicate)
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
findAll
public java.util.List<Node> findAll()
public java.util.List<Node> findAll(IFindNodeOptions options)
Return this construct and all of its sub-nodes in the given order.
Optionally filter nodes based on predicate.
options
Optional
- Type: IFindNodeOptions
findAllLinks
public java.util.List<Edge> findAllLinks()
public java.util.List<Edge> findAllLinks(IFindEdgeOptions options)
Return all direct links of this node and that of all sub-nodes.
Optionally filter links based on predicate.
options
Optional
- Type: IFindEdgeOptions
findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- Type: java.lang.Number
findChild
public Node findChild(java.lang.String id)
Find child with given id.
Similar to find
but does not throw error if no child found.
id
Required
- Type: java.lang.String
findLink
public Edge findLink(IEdgePredicate predicate)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find link of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
findLinks
public java.util.List<Edge> findLinks(IEdgePredicate predicate)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find all links of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
getCfnProp
public java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject OR java.util.List<java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject> getCfnProp(java.lang.String key)
Get specific CloudFormation property.
key
Required
- Type: java.lang.String
getChild
public Node getChild(java.lang.String id)
Get child node with given id.
id
Required
- Type: java.lang.String
getLinkChains
public java.util.List<java.util.List<java.lang.Object>> getLinkChains()
public java.util.List<java.util.List<java.lang.Object>> getLinkChains(java.lang.Boolean reverse)
Resolve all link chains.
reverse
Optional
- Type: java.lang.Boolean
getNearestAncestor
public Node getNearestAncestor(Node node)
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
isAncestor
public java.lang.Boolean isAncestor(Node ancestor)
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
isChild
public java.lang.Boolean isChild(Node node)
Indicates if specific node is a child of this node.
node
Required
- Type: Node
mutateCollapse
public void mutateCollapse()
Collapses all sub-nodes of this node into this node.
mutateCollapseTo
public Node mutateCollapseTo(Node ancestor)
Collapses this node into an ancestor.
ancestor
Required
- Type: Node
mutateCollapseToParent
public Node mutateCollapseToParent()
Collapses this node into it's parent node.
mutateHoist
public void mutateHoist(Node newParent)
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
newParent
Required
- Type: Node
mutateMove
public void mutateMove(Node newParent)
Move this node into a new parent node.
newParent
Required
- Type: Node
The parent to move this node to.
mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)
Remove a child node from this node.
node
Required
- Type: Node
mutateRemoveLink
public java.lang.Boolean mutateRemoveLink(Edge link)
Remove a link from this node.
link
Required
- Type: Edge
mutateRemoveReverseLink
public java.lang.Boolean mutateRemoveReverseLink(Edge link)
Remove a link to this node.
link
Required
- Type: Edge
mutateUncluster
public void mutateUncluster()
Hoist all children to parent and collapse node to parent.
toString
public java.lang.String toString()
Get string representation of this node.
isEquivalentFqn
public java.lang.Boolean isEquivalentFqn(ResourceNode resource)
Evaluates if CfnResourceNode fqn is equivalent to ResourceNode fqn.
Example
// Example automatically generated from non-compiling source. May contain errors.
"aws-cdk-lib.aws_lambda.Function";"aws-cdk-lib.aws_lambda.CfnFunction";
resource
Required
- Type: ResourceNode
{@link Graph.ResourceNode } to compare.
Static Functions
Name | Description |
---|---|
isCfnResourceNode |
Indicates if a node is a {@link CfnResourceNode}. |
isCfnResourceNode
import software.aws.pdk.cdk_graph.CfnResourceNode;
CfnResourceNode.isCfnResourceNode(Node node)
Indicates if a node is a {@link CfnResourceNode}.
node
Required
- Type: Node
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if this node allows destructive mutations. |
children |
java.util.List<Node> |
Get all direct child nodes. |
dependedOnBy |
java.util.List<Node> |
Get list of Nodes that depend on this node. |
dependencies |
java.util.List<Node> |
Get list of Nodes that this node depends on. |
dependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the source. |
depth |
java.lang.Number |
Indicates the depth of the node relative to root (0). |
id |
java.lang.String |
Node id, which is only unique within parent scope. |
isAsset |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.ASSET}. |
isCfnFqn |
java.lang.Boolean |
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct. |
isCluster |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.CLUSTER}. |
isCustomResource |
java.lang.Boolean |
Indicates if node is a Custom Resource. |
isExtraneous |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children. |
isGraphContainer |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}. |
isLeaf |
java.lang.Boolean |
Indicates if this node is a leaf node, which means it does not have children. |
isTopLevel |
java.lang.Boolean |
Indicates if node is direct child of the graph root node. |
links |
java.util.List<Edge> |
Gets all links (edges) in which this node is the source. |
nodeType |
NodeTypeEnum |
Type of node. |
path |
java.lang.String |
Path of the node. |
referencedBy |
java.util.List<Node> |
Get list of Nodes that reference this node. |
referenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the source. |
references |
java.util.List<Node> |
Get list of Nodes that this node references. |
reverseDependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the target. |
reverseLinks |
java.util.List<Edge> |
Gets all links (edges) in which this node is the target. |
reverseReferenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the target. |
scopes |
java.util.List<Node> |
Gets descending ordered list of ancestors from the root. |
siblings |
java.util.List<Node> |
Get list of siblings of this node. |
cfnProps |
PlainObject |
Gets CloudFormation properties for this node. |
cfnType |
java.lang.String |
Get the CloudFormation resource type for this node. |
constructInfo |
ConstructInfo |
Synthesized construct information defining jii resolution data. |
constructInfoFqn |
java.lang.String |
Synthesized construct information defining jii resolution data. |
logicalId |
java.lang.String |
Logical id of the node, which is only unique within containing stack. |
parent |
Node |
Parent node. |
rootStack |
StackNode |
Get root stack. |
stack |
StackNode |
Stack the node is contained in. |
isImport |
java.lang.Boolean |
Indicates if this CfnResource is imported (eg: s3.Bucket.fromBucketArn ). |
resource |
ResourceNode |
Reference to the L2 Resource that wraps this L1 CfnResource if it is wrapped. |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if this node allows destructive mutations.
children
Required
public java.util.List<Node> getChildren();
- Type: java.util.List<Node>
Get all direct child nodes.
dependedOnBy
Required
public java.util.List<Node> getDependedOnBy();
- Type: java.util.List<Node>
Get list of Nodes that depend on this node.
dependencies
Required
public java.util.List<Node> getDependencies();
- Type: java.util.List<Node>
Get list of Nodes that this node depends on.
dependencyLinks
Required
public java.util.List<Dependency> getDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
public java.lang.Number getDepth();
- Type: java.lang.Number
Indicates the depth of the node relative to root (0).
id
Required
public java.lang.String getId();
- Type: java.lang.String
Node id, which is only unique within parent scope.
isAsset
Required
public java.lang.Boolean getIsAsset();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.ASSET}.
isCfnFqn
Required
public java.lang.Boolean getIsCfnFqn();
- Type: java.lang.Boolean
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
isCluster
Required
public java.lang.Boolean getIsCluster();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
isCustomResource
Required
public java.lang.Boolean getIsCustomResource();
- Type: java.lang.Boolean
Indicates if node is a Custom Resource.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
isGraphContainer
Required
public java.lang.Boolean getIsGraphContainer();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
isLeaf
Required
public java.lang.Boolean getIsLeaf();
- Type: java.lang.Boolean
Indicates if this node is a leaf node, which means it does not have children.
isTopLevel
Required
public java.lang.Boolean getIsTopLevel();
- Type: java.lang.Boolean
Indicates if node is direct child of the graph root node.
links
Required
public java.util.List<Edge> getLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the source.
nodeType
Required
public NodeTypeEnum getNodeType();
- Type: NodeTypeEnum
Type of node.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
Path of the node.
referencedBy
Required
public java.util.List<Node> getReferencedBy();
- Type: java.util.List<Node>
Get list of Nodes that reference this node.
referenceLinks
Required
public java.util.List<Reference> getReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
public java.util.List<Node> getReferences();
- Type: java.util.List<Node>
Get list of Nodes that this node references.
reverseDependencyLinks
Required
public java.util.List<Dependency> getReverseDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the target.
reverseLinks
Required
public java.util.List<Edge> getReverseLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the target.
reverseReferenceLinks
Required
public java.util.List<Reference> getReverseReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
public java.util.List<Node> getScopes();
- Type: java.util.List<Node>
Gets descending ordered list of ancestors from the root.
siblings
Required
public java.util.List<Node> getSiblings();
- Type: java.util.List<Node>
Get list of siblings of this node.
cfnProps
Optional
public PlainObject getCfnProps();
- Type: PlainObject
Gets CloudFormation properties for this node.
cfnType
Optional
public java.lang.String getCfnType();
- Type: java.lang.String
Get the CloudFormation resource type for this node.
constructInfo
Optional
public ConstructInfo getConstructInfo();
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
constructInfoFqn
Optional
public java.lang.String getConstructInfoFqn();
- Type: java.lang.String
Synthesized construct information defining jii resolution data.
logicalId
Optional
public java.lang.String getLogicalId();
- Type: java.lang.String
Logical id of the node, which is only unique within containing stack.
parent
Optional
public Node getParent();
- Type: Node
Parent node.
Only the root node should not have parent.
rootStack
Optional
public StackNode getRootStack();
- Type: StackNode
Get root stack.
stack
Optional
public StackNode getStack();
- Type: StackNode
Stack the node is contained in.
isImport
Required
public java.lang.Boolean getIsImport();
- Type: java.lang.Boolean
Indicates if this CfnResource is imported (eg: s3.Bucket.fromBucketArn
).
resource
Optional
public ResourceNode getResource();
- Type: ResourceNode
Reference to the L2 Resource that wraps this L1 CfnResource if it is wrapped.
Constants
Name | Type | Description |
---|---|---|
ATT_IMPORT_ARN_TOKEN |
java.lang.String |
Normalized CfnReference attribute. |
ATT_IMPORT_ARN_TOKEN
Required
public java.lang.String getAttImportArnToken();
- Type: java.lang.String
Normalized CfnReference attribute.
Dependency
Dependency edge class defines CloudFormation dependency between resources.
Initializers
import software.aws.pdk.cdk_graph.Dependency;
new Dependency(ITypedEdgeProps props);
Name | Type | Description |
---|---|---|
props |
ITypedEdgeProps |
No description. |
props
Required
- Type: ITypedEdgeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroy the edge. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
isEquivalent |
Indicates if this edge is equivalent to another edge. |
mutateConsume |
Merge an equivalent edge's data into this edge and destroy the other edge. |
mutateDirection |
Change the edge direction. |
mutateSource |
Change the edge source. |
mutateTarget |
Change the edge target. |
toString |
Get string representation of this edge. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean _strict)
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: java.lang.Boolean
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
isEquivalent
public java.lang.Boolean isEquivalent(Edge edge)
Indicates if this edge is equivalent to another edge.
Edges are considered equivalent if they share same type, source, and target.
edge
Required
- Type: Edge
mutateConsume
public void mutateConsume(Edge edge)
Merge an equivalent edge's data into this edge and destroy the other edge.
Used during filtering operations to consolidate equivalent edges.
edge
Required
- Type: Edge
The edge to consume.
mutateDirection
public void mutateDirection(EdgeDirectionEnum direction)
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutateSource
public void mutateSource(Node node)
Change the edge source.
node
Required
- Type: Node
mutateTarget
public void mutateTarget(Node node)
Change the edge target.
node
Required
- Type: Node
toString
public java.lang.String toString()
Get string representation of this edge.
Static Functions
Name | Description |
---|---|
findAllInChain |
Find all matching edges based on predicate within an EdgeChain. |
findInChain |
Find first edge matching predicate within an EdgeChain. |
isDependency |
Indicates if given edge is a {@link Dependency} edge. |
findAllInChain
import software.aws.pdk.cdk_graph.Dependency;
Dependency.findAllInChain(java.util.List<java.lang.Object> chain, IEdgePredicate predicate)
Find all matching edges based on predicate within an EdgeChain.
chain
Required
- Type: java.util.List
predicate
Required
- Type: IEdgePredicate
findInChain
import software.aws.pdk.cdk_graph.Dependency;
Dependency.findInChain(java.util.List<java.lang.Object> chain, IEdgePredicate predicate)
Find first edge matching predicate within an EdgeChain.
chain
Required
- Type: java.util.List
predicate
Required
- Type: IEdgePredicate
isDependency
import software.aws.pdk.cdk_graph.Dependency;
Dependency.isDependency(Edge edge)
Indicates if given edge is a {@link Dependency} edge.
edge
Required
- Type: Edge
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if edge allows destructive mutations. |
direction |
EdgeDirectionEnum |
Indicates the direction in which the edge is directed. |
edgeType |
EdgeTypeEnum |
Type of edge. |
isClosed |
java.lang.Boolean |
Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations). |
isCrossStack |
java.lang.Boolean |
Indicates if source and target nodes reside in different root stacks. |
isExtraneous |
java.lang.Boolean |
Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target). |
source |
Node |
Edge source is the node that defines the edge (tail). |
target |
Node |
Edge target is the node being referenced by the source (head). |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if edge allows destructive mutations.
direction
Required
public EdgeDirectionEnum getDirection();
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edgeType
Required
public EdgeTypeEnum getEdgeType();
- Type: EdgeTypeEnum
Type of edge.
isClosed
Required
public java.lang.Boolean getIsClosed();
- Type: java.lang.Boolean
Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
To check whether it was originally closed, use hasFlag(FlagEnum.CLOSED_EDGE)
instead.
isCrossStack
Required
public java.lang.Boolean getIsCrossStack();
- Type: java.lang.Boolean
Indicates if source and target nodes reside in different root stacks.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).
source
Required
public Node getSource();
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
public Node getTarget();
- Type: Node
Edge target is the node being referenced by the source (head).
Constants
Name | Type | Description |
---|---|---|
PREFIX |
java.lang.String |
Edge prefix to denote dependency edge. |
PREFIX
Required
public java.lang.String getPrefix();
- Type: java.lang.String
Edge prefix to denote dependency edge.
Edge
- Implements: ISerializableEdge
Edge class defines a link (relationship) between nodes, as in standard graph theory.
Initializers
import software.aws.pdk.cdk_graph.Edge;
new Edge(IEdgeProps props);
Name | Type | Description |
---|---|---|
props |
IEdgeProps |
No description. |
props
Required
- Type: IEdgeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroy the edge. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
isEquivalent |
Indicates if this edge is equivalent to another edge. |
mutateConsume |
Merge an equivalent edge's data into this edge and destroy the other edge. |
mutateDirection |
Change the edge direction. |
mutateSource |
Change the edge source. |
mutateTarget |
Change the edge target. |
toString |
Get string representation of this edge. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean _strict)
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: java.lang.Boolean
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
isEquivalent
public java.lang.Boolean isEquivalent(Edge edge)
Indicates if this edge is equivalent to another edge.
Edges are considered equivalent if they share same type, source, and target.
edge
Required
- Type: Edge
mutateConsume
public void mutateConsume(Edge edge)
Merge an equivalent edge's data into this edge and destroy the other edge.
Used during filtering operations to consolidate equivalent edges.
edge
Required
- Type: Edge
The edge to consume.
mutateDirection
public void mutateDirection(EdgeDirectionEnum direction)
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutateSource
public void mutateSource(Node node)
Change the edge source.
node
Required
- Type: Node
mutateTarget
public void mutateTarget(Node node)
Change the edge target.
node
Required
- Type: Node
toString
public java.lang.String toString()
Get string representation of this edge.
Static Functions
Name | Description |
---|---|
findAllInChain |
Find all matching edges based on predicate within an EdgeChain. |
findInChain |
Find first edge matching predicate within an EdgeChain. |
findAllInChain
import software.aws.pdk.cdk_graph.Edge;
Edge.findAllInChain(java.util.List<java.lang.Object> chain, IEdgePredicate predicate)
Find all matching edges based on predicate within an EdgeChain.
chain
Required
- Type: java.util.List
predicate
Required
- Type: IEdgePredicate
findInChain
import software.aws.pdk.cdk_graph.Edge;
Edge.findInChain(java.util.List<java.lang.Object> chain, IEdgePredicate predicate)
Find first edge matching predicate within an EdgeChain.
chain
Required
- Type: java.util.List
predicate
Required
- Type: IEdgePredicate
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if edge allows destructive mutations. |
direction |
EdgeDirectionEnum |
Indicates the direction in which the edge is directed. |
edgeType |
EdgeTypeEnum |
Type of edge. |
isClosed |
java.lang.Boolean |
Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations). |
isCrossStack |
java.lang.Boolean |
Indicates if source and target nodes reside in different root stacks. |
isExtraneous |
java.lang.Boolean |
Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target). |
source |
Node |
Edge source is the node that defines the edge (tail). |
target |
Node |
Edge target is the node being referenced by the source (head). |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if edge allows destructive mutations.
direction
Required
public EdgeDirectionEnum getDirection();
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edgeType
Required
public EdgeTypeEnum getEdgeType();
- Type: EdgeTypeEnum
Type of edge.
isClosed
Required
public java.lang.Boolean getIsClosed();
- Type: java.lang.Boolean
Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
To check whether it was originally closed, use hasFlag(FlagEnum.CLOSED_EDGE)
instead.
isCrossStack
Required
public java.lang.Boolean getIsCrossStack();
- Type: java.lang.Boolean
Indicates if source and target nodes reside in different root stacks.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).
source
Required
public Node getSource();
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
public Node getTarget();
- Type: Node
Edge target is the node being referenced by the source (head).
Filters
Initializers
import software.aws.pdk.cdk_graph.Filters;
new Filters();
Name | Type | Description |
---|---|---|
Static Functions
Name | Description |
---|---|
collapseCdkOwnedResources |
Collapses all Cdk Owned containers, which more closely mirrors the application code by removing resources that are automatically created by cdk. |
collapseCdkWrappers |
Collapses all Cdk Resource wrappers that wrap directly wrap a CfnResource. |
collapseCustomResources |
Collapses Custom Resource nodes to a single node. |
compact |
Collapses extraneous nodes to parent and cdk created nodes on themselves, and prunes extraneous edges. |
excludeCfnType |
Prune all {@link Graph.ResourceNode} and {@link Graph.CfnResourceNode} nodes matching specified list of CloudFormation types. |
excludeNodeType |
Prune all {@link Graph.Node}s matching specified list. |
includeCfnType |
Prune all {@link Graph.ResourceNode} and {@link Graph.CfnResourceNode} nodes except those matching specified list of CloudFormation types. |
includeNodeType |
Prune all {@link Graph.Node}s except those matching specified list. |
pruneCustomResources |
Prune Custom Resource nodes. |
pruneEmptyContainers |
Prune empty containers, which are non-resource default nodes without any children. |
pruneExtraneous |
Prune extraneous nodes and edges. |
uncluster |
Remove clusters by hoisting their children to the parent of the cluster and collapsing the cluster itself to its parent. |
verifyFilterable |
Verify that store is filterable, meaning it allows destructive mutations. |
collapseCdkOwnedResources
import software.aws.pdk.cdk_graph.Filters;
Filters.collapseCdkOwnedResources()
Collapses all Cdk Owned containers, which more closely mirrors the application code by removing resources that are automatically created by cdk.
collapseCdkWrappers
import software.aws.pdk.cdk_graph.Filters;
Filters.collapseCdkWrappers()
Collapses all Cdk Resource wrappers that wrap directly wrap a CfnResource.
Example, s3.Bucket wraps s3.CfnBucket.
collapseCustomResources
import software.aws.pdk.cdk_graph.Filters;
Filters.collapseCustomResources()
Collapses Custom Resource nodes to a single node.
compact
import software.aws.pdk.cdk_graph.Filters;
Filters.compact()
Collapses extraneous nodes to parent and cdk created nodes on themselves, and prunes extraneous edges.
This most closely represents the developers code for the current application and reduces the noise one expects.
Invokes: 1.
- pruneExtraneous()(store);
- collapseCdkOwnedResources()(store);
- collapseCdkWrappers()(store);
- collapseCustomResources()(store);
- ~pruneCustomResources()(store);~
- pruneEmptyContainers()(store);
excludeCfnType
import software.aws.pdk.cdk_graph.Filters;
Filters.excludeCfnType(java.util.List<FilterValue> cfnTypes)
Prune all {@link Graph.ResourceNode} and {@link Graph.CfnResourceNode} nodes matching specified list of CloudFormation types.
cfnTypes
Required
- Type: java.util.List<FilterValue>
excludeNodeType
import software.aws.pdk.cdk_graph.Filters;
Filters.excludeNodeType(java.util.List<FilterValue> nodeTypes)
Prune all {@link Graph.Node}s matching specified list.
This filter targets all nodes (except root) - {@link IGraphFilter.allNodes}
nodeTypes
Required
- Type: java.util.List<FilterValue>
includeCfnType
import software.aws.pdk.cdk_graph.Filters;
Filters.includeCfnType(java.util.List<FilterValue> cfnTypes)
Prune all {@link Graph.ResourceNode} and {@link Graph.CfnResourceNode} nodes except those matching specified list of CloudFormation types.
cfnTypes
Required
- Type: java.util.List<FilterValue>
includeNodeType
import software.aws.pdk.cdk_graph.Filters;
Filters.includeNodeType(java.util.List<FilterValue> nodeTypes)
Prune all {@link Graph.Node}s except those matching specified list.
This filter targets all nodes (except root) - {@link IGraphFilter.allNodes}
nodeTypes
Required
- Type: java.util.List<FilterValue>
pruneCustomResources
import software.aws.pdk.cdk_graph.Filters;
Filters.pruneCustomResources()
Prune Custom Resource nodes.
pruneEmptyContainers
import software.aws.pdk.cdk_graph.Filters;
Filters.pruneEmptyContainers()
Prune empty containers, which are non-resource default nodes without any children.
Generally L3 constructs in which all children have already been pruned, which would be useful as containers, but without children are considered extraneous.
pruneExtraneous
import software.aws.pdk.cdk_graph.Filters;
Filters.pruneExtraneous()
Prune extraneous nodes and edges.
uncluster
import software.aws.pdk.cdk_graph.Filters;
Filters.uncluster(),Filters.uncluster(java.util.List<NodeTypeEnum> clusterTypes)
Remove clusters by hoisting their children to the parent of the cluster and collapsing the cluster itself to its parent.
clusterTypes
Optional
- Type: java.util.List<NodeTypeEnum>
verifyFilterable
import software.aws.pdk.cdk_graph.Filters;
Filters.verifyFilterable(Store store)
Verify that store is filterable, meaning it allows destructive mutations.
store
Required
- Type: Store
ImportReference
Import reference defines Fn::ImportValue type reference edge.
Initializers
import software.aws.pdk.cdk_graph.ImportReference;
new ImportReference(ITypedEdgeProps props);
Name | Type | Description |
---|---|---|
props |
ITypedEdgeProps |
No description. |
props
Required
- Type: ITypedEdgeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroy the edge. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
isEquivalent |
Indicates if this edge is equivalent to another edge. |
mutateConsume |
Merge an equivalent edge's data into this edge and destroy the other edge. |
mutateDirection |
Change the edge direction. |
mutateSource |
Change the edge source. |
mutateTarget |
Change the edge target. |
toString |
Get string representation of this edge. |
resolveChain |
Resolve reference chain. |
resolveTargets |
Resolve targets by following potential edge chain. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean _strict)
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: java.lang.Boolean
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
isEquivalent
public java.lang.Boolean isEquivalent(Edge edge)
Indicates if this edge is equivalent to another edge.
Edges are considered equivalent if they share same type, source, and target.
edge
Required
- Type: Edge
mutateConsume
public void mutateConsume(Edge edge)
Merge an equivalent edge's data into this edge and destroy the other edge.
Used during filtering operations to consolidate equivalent edges.
edge
Required
- Type: Edge
The edge to consume.
mutateDirection
public void mutateDirection(EdgeDirectionEnum direction)
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutateSource
public void mutateSource(Node node)
Change the edge source.
node
Required
- Type: Node
mutateTarget
public void mutateTarget(Node node)
Change the edge target.
node
Required
- Type: Node
toString
public java.lang.String toString()
Get string representation of this edge.
resolveChain
public java.util.List<java.lang.Object> resolveChain()
Resolve reference chain.
resolveTargets
public java.util.List<Node> resolveTargets()
Resolve targets by following potential edge chain.
Static Functions
Name | Description |
---|---|
findAllInChain |
Find all matching edges based on predicate within an EdgeChain. |
findInChain |
Find first edge matching predicate within an EdgeChain. |
isRef |
Indicates if edge is a Ref based {@link Reference} edge. |
isReference |
Indicates if edge is a {@link Reference}. |
isImport |
Indicates if edge is Fn::ImportValue based {@link Reference}. |
findAllInChain
import software.aws.pdk.cdk_graph.ImportReference;
ImportReference.findAllInChain(java.util.List<java.lang.Object> chain, IEdgePredicate predicate)
Find all matching edges based on predicate within an EdgeChain.
chain
Required
- Type: java.util.List
predicate
Required
- Type: IEdgePredicate
findInChain
import software.aws.pdk.cdk_graph.ImportReference;
ImportReference.findInChain(java.util.List<java.lang.Object> chain, IEdgePredicate predicate)
Find first edge matching predicate within an EdgeChain.
chain
Required
- Type: java.util.List
predicate
Required
- Type: IEdgePredicate
isRef
import software.aws.pdk.cdk_graph.ImportReference;
ImportReference.isRef(Edge edge)
Indicates if edge is a Ref based {@link Reference} edge.
edge
Required
- Type: Edge
isReference
import software.aws.pdk.cdk_graph.ImportReference;
ImportReference.isReference(Edge edge)
Indicates if edge is a {@link Reference}.
edge
Required
- Type: Edge
isImport
import software.aws.pdk.cdk_graph.ImportReference;
ImportReference.isImport(Edge edge)
Indicates if edge is Fn::ImportValue based {@link Reference}.
edge
Required
- Type: Edge
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if edge allows destructive mutations. |
direction |
EdgeDirectionEnum |
Indicates the direction in which the edge is directed. |
edgeType |
EdgeTypeEnum |
Type of edge. |
isClosed |
java.lang.Boolean |
Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations). |
isCrossStack |
java.lang.Boolean |
Indicates if source and target nodes reside in different root stacks. |
isExtraneous |
java.lang.Boolean |
Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target). |
source |
Node |
Edge source is the node that defines the edge (tail). |
target |
Node |
Edge target is the node being referenced by the source (head). |
referenceType |
ReferenceTypeEnum |
Get type of reference. |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if edge allows destructive mutations.
direction
Required
public EdgeDirectionEnum getDirection();
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edgeType
Required
public EdgeTypeEnum getEdgeType();
- Type: EdgeTypeEnum
Type of edge.
isClosed
Required
public java.lang.Boolean getIsClosed();
- Type: java.lang.Boolean
Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
To check whether it was originally closed, use hasFlag(FlagEnum.CLOSED_EDGE)
instead.
isCrossStack
Required
public java.lang.Boolean getIsCrossStack();
- Type: java.lang.Boolean
Indicates if source and target nodes reside in different root stacks.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).
source
Required
public Node getSource();
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
public Node getTarget();
- Type: Node
Edge target is the node being referenced by the source (head).
referenceType
Required
public ReferenceTypeEnum getReferenceType();
- Type: ReferenceTypeEnum
Get type of reference.
Constants
Name | Type | Description |
---|---|---|
ATT_TYPE |
java.lang.String |
Attribute defining the type of reference. |
PREFIX |
java.lang.String |
Edge prefix to denote Fn::ImportValue type reference edge. |
ATT_TYPE
Required
public java.lang.String getAttType();
- Type: java.lang.String
Attribute defining the type of reference.
PREFIX
Required
public java.lang.String getPrefix();
- Type: java.lang.String
Edge prefix to denote Fn::ImportValue type reference edge.
NestedStackNode
NestedStackNode defines a cdk NestedStack.
Initializers
import software.aws.pdk.cdk_graph.NestedStackNode;
new NestedStackNode(INestedStackNodeProps props);
Name | Type | Description |
---|---|---|
props |
INestedStackNodeProps |
No description. |
props
Required
- Type: INestedStackNodeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroys this node by removing all references and removing this node from the store. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
addChild |
Add child node. |
addLink |
Add link to another node. |
addReverseLink |
Add link from another node. |
doesDependOn |
Indicates if this node depends on another node. |
doesReference |
Indicates if this node references another node. |
find |
Recursively find the nearest sub-node matching predicate. |
findAll |
Return this construct and all of its sub-nodes in the given order. |
findAllLinks |
Return all direct links of this node and that of all sub-nodes. |
findAncestor |
Find nearest ancestor of this node matching given predicate. |
findChild |
Find child with given id. |
findLink |
Find link of this node based on predicate. |
findLinks |
Find all links of this node based on predicate. |
getCfnProp |
Get specific CloudFormation property. |
getChild |
Get child node with given id. |
getLinkChains |
Resolve all link chains. |
getNearestAncestor |
Gets the nearest common ancestor shared between this node and another node. |
isAncestor |
Indicates if a specific node is an ancestor of this node. |
isChild |
Indicates if specific node is a child of this node. |
mutateCollapse |
Collapses all sub-nodes of this node into this node. |
mutateCollapseTo |
Collapses this node into an ancestor. |
mutateCollapseToParent |
Collapses this node into it's parent node. |
mutateHoist |
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor. |
mutateMove |
Move this node into a new parent node. |
mutateRemoveChild |
Remove a child node from this node. |
mutateRemoveLink |
Remove a link from this node. |
mutateRemoveReverseLink |
Remove a link to this node. |
mutateUncluster |
Hoist all children to parent and collapse node to parent. |
toString |
Get string representation of this node. |
addOutput |
Associate {@link OutputNode} with this stack. |
addParameter |
Associate {@link ParameterNode} with this stack. |
findOutput |
Find {@link OutputNode} with logicalId defined by this stack. |
findParameter |
Find {@link ParameterNode} with parameterId defined by this stack. |
mutateRemoveOutput |
Disassociate {@link OutputNode} from this stack. |
mutateRemoveParameter |
Disassociate {@link ParameterNode} from this stack. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean strict)
Destroys this node by removing all references and removing this node from the store.
strict
Optional
- Type: java.lang.Boolean
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
addChild
public void addChild(Node node)
Add child node.
node
Required
- Type: Node
addLink
public void addLink(Edge edge)
Add link to another node.
edge
Required
- Type: Edge
addReverseLink
public void addReverseLink(Edge edge)
Add link from another node.
edge
Required
- Type: Edge
doesDependOn
public java.lang.Boolean doesDependOn(Node node)
Indicates if this node depends on another node.
node
Required
- Type: Node
doesReference
public java.lang.Boolean doesReference(Node node)
Indicates if this node references another node.
node
Required
- Type: Node
find
public Node find(INodePredicate predicate)
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
findAll
public java.util.List<Node> findAll()
public java.util.List<Node> findAll(IFindNodeOptions options)
Return this construct and all of its sub-nodes in the given order.
Optionally filter nodes based on predicate.
options
Optional
- Type: IFindNodeOptions
findAllLinks
public java.util.List<Edge> findAllLinks()
public java.util.List<Edge> findAllLinks(IFindEdgeOptions options)
Return all direct links of this node and that of all sub-nodes.
Optionally filter links based on predicate.
options
Optional
- Type: IFindEdgeOptions
findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- Type: java.lang.Number
findChild
public Node findChild(java.lang.String id)
Find child with given id.
Similar to find
but does not throw error if no child found.
id
Required
- Type: java.lang.String
findLink
public Edge findLink(IEdgePredicate predicate)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find link of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
findLinks
public java.util.List<Edge> findLinks(IEdgePredicate predicate)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find all links of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
getCfnProp
public java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject OR java.util.List<java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject> getCfnProp(java.lang.String key)
Get specific CloudFormation property.
key
Required
- Type: java.lang.String
getChild
public Node getChild(java.lang.String id)
Get child node with given id.
id
Required
- Type: java.lang.String
getLinkChains
public java.util.List<java.util.List<java.lang.Object>> getLinkChains()
public java.util.List<java.util.List<java.lang.Object>> getLinkChains(java.lang.Boolean reverse)
Resolve all link chains.
reverse
Optional
- Type: java.lang.Boolean
getNearestAncestor
public Node getNearestAncestor(Node node)
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
isAncestor
public java.lang.Boolean isAncestor(Node ancestor)
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
isChild
public java.lang.Boolean isChild(Node node)
Indicates if specific node is a child of this node.
node
Required
- Type: Node
mutateCollapse
public void mutateCollapse()
Collapses all sub-nodes of this node into this node.
mutateCollapseTo
public Node mutateCollapseTo(Node ancestor)
Collapses this node into an ancestor.
ancestor
Required
- Type: Node
mutateCollapseToParent
public Node mutateCollapseToParent()
Collapses this node into it's parent node.
mutateHoist
public void mutateHoist(Node newParent)
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
newParent
Required
- Type: Node
mutateMove
public void mutateMove(Node newParent)
Move this node into a new parent node.
newParent
Required
- Type: Node
The parent to move this node to.
mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)
Remove a child node from this node.
node
Required
- Type: Node
mutateRemoveLink
public java.lang.Boolean mutateRemoveLink(Edge link)
Remove a link from this node.
link
Required
- Type: Edge
mutateRemoveReverseLink
public java.lang.Boolean mutateRemoveReverseLink(Edge link)
Remove a link to this node.
link
Required
- Type: Edge
mutateUncluster
public void mutateUncluster()
Hoist all children to parent and collapse node to parent.
toString
public java.lang.String toString()
Get string representation of this node.
addOutput
public void addOutput(OutputNode node)
Associate {@link OutputNode} with this stack.
node
Required
- Type: OutputNode
addParameter
public void addParameter(ParameterNode node)
Associate {@link ParameterNode} with this stack.
node
Required
- Type: ParameterNode
findOutput
public OutputNode findOutput(java.lang.String logicalId)
Find {@link OutputNode} with logicalId defined by this stack.
logicalId
Required
- Type: java.lang.String
findParameter
public ParameterNode findParameter(java.lang.String parameterId)
Find {@link ParameterNode} with parameterId defined by this stack.
parameterId
Required
- Type: java.lang.String
mutateRemoveOutput
public java.lang.Boolean mutateRemoveOutput(OutputNode node)
Disassociate {@link OutputNode} from this stack.
node
Required
- Type: OutputNode
mutateRemoveParameter
public java.lang.Boolean mutateRemoveParameter(ParameterNode node)
Disassociate {@link ParameterNode} from this stack.
node
Required
- Type: ParameterNode
Static Functions
Name | Description |
---|---|
isStackNode |
Indicates if node is a {@link StackNode}. |
of |
Gets the {@link StackNode} containing a given resource. |
isNestedStackNode |
Indicates if node is a {@link NestedStackNode}. |
isStackNode
import software.aws.pdk.cdk_graph.NestedStackNode;
NestedStackNode.isStackNode(Node node)
Indicates if node is a {@link StackNode}.
node
Required
- Type: Node
of
import software.aws.pdk.cdk_graph.NestedStackNode;
NestedStackNode.of(Node node)
Gets the {@link StackNode} containing a given resource.
node
Required
- Type: Node
isNestedStackNode
import software.aws.pdk.cdk_graph.NestedStackNode;
NestedStackNode.isNestedStackNode(Node node)
Indicates if node is a {@link NestedStackNode}.
node
Required
- Type: Node
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if this node allows destructive mutations. |
children |
java.util.List<Node> |
Get all direct child nodes. |
dependedOnBy |
java.util.List<Node> |
Get list of Nodes that depend on this node. |
dependencies |
java.util.List<Node> |
Get list of Nodes that this node depends on. |
dependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the source. |
depth |
java.lang.Number |
Indicates the depth of the node relative to root (0). |
id |
java.lang.String |
Node id, which is only unique within parent scope. |
isAsset |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.ASSET}. |
isCfnFqn |
java.lang.Boolean |
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct. |
isCluster |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.CLUSTER}. |
isCustomResource |
java.lang.Boolean |
Indicates if node is a Custom Resource. |
isExtraneous |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children. |
isGraphContainer |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}. |
isLeaf |
java.lang.Boolean |
Indicates if this node is a leaf node, which means it does not have children. |
isTopLevel |
java.lang.Boolean |
Indicates if node is direct child of the graph root node. |
links |
java.util.List<Edge> |
Gets all links (edges) in which this node is the source. |
nodeType |
NodeTypeEnum |
Type of node. |
path |
java.lang.String |
Path of the node. |
referencedBy |
java.util.List<Node> |
Get list of Nodes that reference this node. |
referenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the source. |
references |
java.util.List<Node> |
Get list of Nodes that this node references. |
reverseDependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the target. |
reverseLinks |
java.util.List<Edge> |
Gets all links (edges) in which this node is the target. |
reverseReferenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the target. |
scopes |
java.util.List<Node> |
Gets descending ordered list of ancestors from the root. |
siblings |
java.util.List<Node> |
Get list of siblings of this node. |
cfnProps |
PlainObject |
Gets CloudFormation properties for this node. |
cfnType |
java.lang.String |
Get the CloudFormation resource type for this node. |
constructInfo |
ConstructInfo |
Synthesized construct information defining jii resolution data. |
constructInfoFqn |
java.lang.String |
Synthesized construct information defining jii resolution data. |
logicalId |
java.lang.String |
Logical id of the node, which is only unique within containing stack. |
parent |
Node |
Parent node. |
rootStack |
StackNode |
Get root stack. |
stack |
StackNode |
Stack the node is contained in. |
exports |
java.util.List<OutputNode> |
Get all exported {@link OutputNode}s defined by this stack. |
outputs |
java.util.List<OutputNode> |
Get all {@link OutputNode}s defined by this stack. |
parameters |
java.util.List<ParameterNode> |
Get all {@link ParameterNode}s defined by this stack. |
stage |
StageNode |
Get {@link StageNode} containing this stack. |
parentStack |
StackNode |
Get parent stack of this nested stack. |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if this node allows destructive mutations.
children
Required
public java.util.List<Node> getChildren();
- Type: java.util.List<Node>
Get all direct child nodes.
dependedOnBy
Required
public java.util.List<Node> getDependedOnBy();
- Type: java.util.List<Node>
Get list of Nodes that depend on this node.
dependencies
Required
public java.util.List<Node> getDependencies();
- Type: java.util.List<Node>
Get list of Nodes that this node depends on.
dependencyLinks
Required
public java.util.List<Dependency> getDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
public java.lang.Number getDepth();
- Type: java.lang.Number
Indicates the depth of the node relative to root (0).
id
Required
public java.lang.String getId();
- Type: java.lang.String
Node id, which is only unique within parent scope.
isAsset
Required
public java.lang.Boolean getIsAsset();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.ASSET}.
isCfnFqn
Required
public java.lang.Boolean getIsCfnFqn();
- Type: java.lang.Boolean
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
isCluster
Required
public java.lang.Boolean getIsCluster();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
isCustomResource
Required
public java.lang.Boolean getIsCustomResource();
- Type: java.lang.Boolean
Indicates if node is a Custom Resource.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
isGraphContainer
Required
public java.lang.Boolean getIsGraphContainer();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
isLeaf
Required
public java.lang.Boolean getIsLeaf();
- Type: java.lang.Boolean
Indicates if this node is a leaf node, which means it does not have children.
isTopLevel
Required
public java.lang.Boolean getIsTopLevel();
- Type: java.lang.Boolean
Indicates if node is direct child of the graph root node.
links
Required
public java.util.List<Edge> getLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the source.
nodeType
Required
public NodeTypeEnum getNodeType();
- Type: NodeTypeEnum
Type of node.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
Path of the node.
referencedBy
Required
public java.util.List<Node> getReferencedBy();
- Type: java.util.List<Node>
Get list of Nodes that reference this node.
referenceLinks
Required
public java.util.List<Reference> getReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
public java.util.List<Node> getReferences();
- Type: java.util.List<Node>
Get list of Nodes that this node references.
reverseDependencyLinks
Required
public java.util.List<Dependency> getReverseDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the target.
reverseLinks
Required
public java.util.List<Edge> getReverseLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the target.
reverseReferenceLinks
Required
public java.util.List<Reference> getReverseReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
public java.util.List<Node> getScopes();
- Type: java.util.List<Node>
Gets descending ordered list of ancestors from the root.
siblings
Required
public java.util.List<Node> getSiblings();
- Type: java.util.List<Node>
Get list of siblings of this node.
cfnProps
Optional
public PlainObject getCfnProps();
- Type: PlainObject
Gets CloudFormation properties for this node.
cfnType
Optional
public java.lang.String getCfnType();
- Type: java.lang.String
Get the CloudFormation resource type for this node.
constructInfo
Optional
public ConstructInfo getConstructInfo();
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
constructInfoFqn
Optional
public java.lang.String getConstructInfoFqn();
- Type: java.lang.String
Synthesized construct information defining jii resolution data.
logicalId
Optional
public java.lang.String getLogicalId();
- Type: java.lang.String
Logical id of the node, which is only unique within containing stack.
parent
Optional
public Node getParent();
- Type: Node
Parent node.
Only the root node should not have parent.
rootStack
Optional
public StackNode getRootStack();
- Type: StackNode
Get root stack.
stack
Optional
public StackNode getStack();
- Type: StackNode
Stack the node is contained in.
exports
Required
public java.util.List<OutputNode> getExports();
- Type: java.util.List<OutputNode>
Get all exported {@link OutputNode}s defined by this stack.
outputs
Required
public java.util.List<OutputNode> getOutputs();
- Type: java.util.List<OutputNode>
Get all {@link OutputNode}s defined by this stack.
parameters
Required
public java.util.List<ParameterNode> getParameters();
- Type: java.util.List<ParameterNode>
Get all {@link ParameterNode}s defined by this stack.
stage
Optional
public StageNode getStage();
- Type: StageNode
Get {@link StageNode} containing this stack.
parentStack
Optional
public StackNode getParentStack();
- Type: StackNode
Get parent stack of this nested stack.
Node
- Implements: ISerializableNode
Node class is the base definition of node entities in the graph, as in standard graph theory.
Initializers
import software.aws.pdk.cdk_graph.Node;
new Node(INodeProps props);
Name | Type | Description |
---|---|---|
props |
INodeProps |
No description. |
props
Required
- Type: INodeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroys this node by removing all references and removing this node from the store. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
addChild |
Add child node. |
addLink |
Add link to another node. |
addReverseLink |
Add link from another node. |
doesDependOn |
Indicates if this node depends on another node. |
doesReference |
Indicates if this node references another node. |
find |
Recursively find the nearest sub-node matching predicate. |
findAll |
Return this construct and all of its sub-nodes in the given order. |
findAllLinks |
Return all direct links of this node and that of all sub-nodes. |
findAncestor |
Find nearest ancestor of this node matching given predicate. |
findChild |
Find child with given id. |
findLink |
Find link of this node based on predicate. |
findLinks |
Find all links of this node based on predicate. |
getCfnProp |
Get specific CloudFormation property. |
getChild |
Get child node with given id. |
getLinkChains |
Resolve all link chains. |
getNearestAncestor |
Gets the nearest common ancestor shared between this node and another node. |
isAncestor |
Indicates if a specific node is an ancestor of this node. |
isChild |
Indicates if specific node is a child of this node. |
mutateCollapse |
Collapses all sub-nodes of this node into this node. |
mutateCollapseTo |
Collapses this node into an ancestor. |
mutateCollapseToParent |
Collapses this node into it's parent node. |
mutateHoist |
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor. |
mutateMove |
Move this node into a new parent node. |
mutateRemoveChild |
Remove a child node from this node. |
mutateRemoveLink |
Remove a link from this node. |
mutateRemoveReverseLink |
Remove a link to this node. |
mutateUncluster |
Hoist all children to parent and collapse node to parent. |
toString |
Get string representation of this node. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean strict)
Destroys this node by removing all references and removing this node from the store.
strict
Optional
- Type: java.lang.Boolean
Indicates that this node must not have references.
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
addChild
public void addChild(Node node)
Add child node.
node
Required
- Type: Node
addLink
public void addLink(Edge edge)
Add link to another node.
edge
Required
- Type: Edge
addReverseLink
public void addReverseLink(Edge edge)
Add link from another node.
edge
Required
- Type: Edge
doesDependOn
public java.lang.Boolean doesDependOn(Node node)
Indicates if this node depends on another node.
node
Required
- Type: Node
doesReference
public java.lang.Boolean doesReference(Node node)
Indicates if this node references another node.
node
Required
- Type: Node
find
public Node find(INodePredicate predicate)
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
findAll
public java.util.List<Node> findAll()
public java.util.List<Node> findAll(IFindNodeOptions options)
Return this construct and all of its sub-nodes in the given order.
Optionally filter nodes based on predicate.
options
Optional
- Type: IFindNodeOptions
findAllLinks
public java.util.List<Edge> findAllLinks()
public java.util.List<Edge> findAllLinks(IFindEdgeOptions options)
Return all direct links of this node and that of all sub-nodes.
Optionally filter links based on predicate.
options
Optional
- Type: IFindEdgeOptions
findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- Type: java.lang.Number
findChild
public Node findChild(java.lang.String id)
Find child with given id.
Similar to find
but does not throw error if no child found.
id
Required
- Type: java.lang.String
findLink
public Edge findLink(IEdgePredicate predicate)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find link of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
findLinks
public java.util.List<Edge> findLinks(IEdgePredicate predicate)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find all links of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
getCfnProp
public java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject OR java.util.List<java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject> getCfnProp(java.lang.String key)
Get specific CloudFormation property.
key
Required
- Type: java.lang.String
getChild
public Node getChild(java.lang.String id)
Get child node with given id.
id
Required
- Type: java.lang.String
getLinkChains
public java.util.List<java.util.List<java.lang.Object>> getLinkChains()
public java.util.List<java.util.List<java.lang.Object>> getLinkChains(java.lang.Boolean reverse)
Resolve all link chains.
reverse
Optional
- Type: java.lang.Boolean
getNearestAncestor
public Node getNearestAncestor(Node node)
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
isAncestor
public java.lang.Boolean isAncestor(Node ancestor)
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
isChild
public java.lang.Boolean isChild(Node node)
Indicates if specific node is a child of this node.
node
Required
- Type: Node
mutateCollapse
public void mutateCollapse()
Collapses all sub-nodes of this node into this node.
mutateCollapseTo
public Node mutateCollapseTo(Node ancestor)
Collapses this node into an ancestor.
ancestor
Required
- Type: Node
mutateCollapseToParent
public Node mutateCollapseToParent()
Collapses this node into it's parent node.
mutateHoist
public void mutateHoist(Node newParent)
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
newParent
Required
- Type: Node
mutateMove
public void mutateMove(Node newParent)
Move this node into a new parent node.
newParent
Required
- Type: Node
The parent to move this node to.
mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)
Remove a child node from this node.
node
Required
- Type: Node
mutateRemoveLink
public java.lang.Boolean mutateRemoveLink(Edge link)
Remove a link from this node.
link
Required
- Type: Edge
mutateRemoveReverseLink
public java.lang.Boolean mutateRemoveReverseLink(Edge link)
Remove a link to this node.
link
Required
- Type: Edge
mutateUncluster
public void mutateUncluster()
Hoist all children to parent and collapse node to parent.
toString
public java.lang.String toString()
Get string representation of this node.
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if this node allows destructive mutations. |
children |
java.util.List<Node> |
Get all direct child nodes. |
dependedOnBy |
java.util.List<Node> |
Get list of Nodes that depend on this node. |
dependencies |
java.util.List<Node> |
Get list of Nodes that this node depends on. |
dependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the source. |
depth |
java.lang.Number |
Indicates the depth of the node relative to root (0). |
id |
java.lang.String |
Node id, which is only unique within parent scope. |
isAsset |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.ASSET}. |
isCfnFqn |
java.lang.Boolean |
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct. |
isCluster |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.CLUSTER}. |
isCustomResource |
java.lang.Boolean |
Indicates if node is a Custom Resource. |
isExtraneous |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children. |
isGraphContainer |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}. |
isLeaf |
java.lang.Boolean |
Indicates if this node is a leaf node, which means it does not have children. |
isTopLevel |
java.lang.Boolean |
Indicates if node is direct child of the graph root node. |
links |
java.util.List<Edge> |
Gets all links (edges) in which this node is the source. |
nodeType |
NodeTypeEnum |
Type of node. |
path |
java.lang.String |
Path of the node. |
referencedBy |
java.util.List<Node> |
Get list of Nodes that reference this node. |
referenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the source. |
references |
java.util.List<Node> |
Get list of Nodes that this node references. |
reverseDependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the target. |
reverseLinks |
java.util.List<Edge> |
Gets all links (edges) in which this node is the target. |
reverseReferenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the target. |
scopes |
java.util.List<Node> |
Gets descending ordered list of ancestors from the root. |
siblings |
java.util.List<Node> |
Get list of siblings of this node. |
cfnProps |
PlainObject |
Gets CloudFormation properties for this node. |
cfnType |
java.lang.String |
Get the CloudFormation resource type for this node. |
constructInfo |
ConstructInfo |
Synthesized construct information defining jii resolution data. |
constructInfoFqn |
java.lang.String |
Synthesized construct information defining jii resolution data. |
logicalId |
java.lang.String |
Logical id of the node, which is only unique within containing stack. |
parent |
Node |
Parent node. |
rootStack |
StackNode |
Get root stack. |
stack |
StackNode |
Stack the node is contained in. |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if this node allows destructive mutations.
children
Required
public java.util.List<Node> getChildren();
- Type: java.util.List<Node>
Get all direct child nodes.
dependedOnBy
Required
public java.util.List<Node> getDependedOnBy();
- Type: java.util.List<Node>
Get list of Nodes that depend on this node.
dependencies
Required
public java.util.List<Node> getDependencies();
- Type: java.util.List<Node>
Get list of Nodes that this node depends on.
dependencyLinks
Required
public java.util.List<Dependency> getDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
public java.lang.Number getDepth();
- Type: java.lang.Number
Indicates the depth of the node relative to root (0).
id
Required
public java.lang.String getId();
- Type: java.lang.String
Node id, which is only unique within parent scope.
isAsset
Required
public java.lang.Boolean getIsAsset();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.ASSET}.
isCfnFqn
Required
public java.lang.Boolean getIsCfnFqn();
- Type: java.lang.Boolean
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
isCluster
Required
public java.lang.Boolean getIsCluster();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
isCustomResource
Required
public java.lang.Boolean getIsCustomResource();
- Type: java.lang.Boolean
Indicates if node is a Custom Resource.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
isGraphContainer
Required
public java.lang.Boolean getIsGraphContainer();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
isLeaf
Required
public java.lang.Boolean getIsLeaf();
- Type: java.lang.Boolean
Indicates if this node is a leaf node, which means it does not have children.
isTopLevel
Required
public java.lang.Boolean getIsTopLevel();
- Type: java.lang.Boolean
Indicates if node is direct child of the graph root node.
links
Required
public java.util.List<Edge> getLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the source.
nodeType
Required
public NodeTypeEnum getNodeType();
- Type: NodeTypeEnum
Type of node.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
Path of the node.
referencedBy
Required
public java.util.List<Node> getReferencedBy();
- Type: java.util.List<Node>
Get list of Nodes that reference this node.
referenceLinks
Required
public java.util.List<Reference> getReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
public java.util.List<Node> getReferences();
- Type: java.util.List<Node>
Get list of Nodes that this node references.
reverseDependencyLinks
Required
public java.util.List<Dependency> getReverseDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the target.
reverseLinks
Required
public java.util.List<Edge> getReverseLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the target.
reverseReferenceLinks
Required
public java.util.List<Reference> getReverseReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
public java.util.List<Node> getScopes();
- Type: java.util.List<Node>
Gets descending ordered list of ancestors from the root.
siblings
Required
public java.util.List<Node> getSiblings();
- Type: java.util.List<Node>
Get list of siblings of this node.
cfnProps
Optional
public PlainObject getCfnProps();
- Type: PlainObject
Gets CloudFormation properties for this node.
cfnType
Optional
public java.lang.String getCfnType();
- Type: java.lang.String
Get the CloudFormation resource type for this node.
constructInfo
Optional
public ConstructInfo getConstructInfo();
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
constructInfoFqn
Optional
public java.lang.String getConstructInfoFqn();
- Type: java.lang.String
Synthesized construct information defining jii resolution data.
logicalId
Optional
public java.lang.String getLogicalId();
- Type: java.lang.String
Logical id of the node, which is only unique within containing stack.
parent
Optional
public Node getParent();
- Type: Node
Parent node.
Only the root node should not have parent.
rootStack
Optional
public StackNode getRootStack();
- Type: StackNode
Get root stack.
stack
Optional
public StackNode getStack();
- Type: StackNode
Stack the node is contained in.
OutputNode
OutputNode defines a cdk CfnOutput resources.
Initializers
import software.aws.pdk.cdk_graph.OutputNode;
new OutputNode(IOutputNodeProps props);
Name | Type | Description |
---|---|---|
props |
IOutputNodeProps |
No description. |
props
Required
- Type: IOutputNodeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroys this node by removing all references and removing this node from the store. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
addChild |
Add child node. |
addLink |
Add link to another node. |
addReverseLink |
Add link from another node. |
doesDependOn |
Indicates if this node depends on another node. |
doesReference |
Indicates if this node references another node. |
find |
Recursively find the nearest sub-node matching predicate. |
findAll |
Return this construct and all of its sub-nodes in the given order. |
findAllLinks |
Return all direct links of this node and that of all sub-nodes. |
findAncestor |
Find nearest ancestor of this node matching given predicate. |
findChild |
Find child with given id. |
findLink |
Find link of this node based on predicate. |
findLinks |
Find all links of this node based on predicate. |
getCfnProp |
Get specific CloudFormation property. |
getChild |
Get child node with given id. |
getLinkChains |
Resolve all link chains. |
getNearestAncestor |
Gets the nearest common ancestor shared between this node and another node. |
isAncestor |
Indicates if a specific node is an ancestor of this node. |
isChild |
Indicates if specific node is a child of this node. |
mutateCollapse |
Collapses all sub-nodes of this node into this node. |
mutateCollapseTo |
Collapses this node into an ancestor. |
mutateCollapseToParent |
Collapses this node into it's parent node. |
mutateHoist |
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor. |
mutateMove |
Move this node into a new parent node. |
mutateRemoveChild |
Remove a child node from this node. |
mutateRemoveLink |
Remove a link from this node. |
mutateRemoveReverseLink |
Remove a link to this node. |
mutateUncluster |
Hoist all children to parent and collapse node to parent. |
toString |
Get string representation of this node. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean strict)
Destroys this node by removing all references and removing this node from the store.
strict
Optional
- Type: java.lang.Boolean
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
addChild
public void addChild(Node node)
Add child node.
node
Required
- Type: Node
addLink
public void addLink(Edge edge)
Add link to another node.
edge
Required
- Type: Edge
addReverseLink
public void addReverseLink(Edge edge)
Add link from another node.
edge
Required
- Type: Edge
doesDependOn
public java.lang.Boolean doesDependOn(Node node)
Indicates if this node depends on another node.
node
Required
- Type: Node
doesReference
public java.lang.Boolean doesReference(Node node)
Indicates if this node references another node.
node
Required
- Type: Node
find
public Node find(INodePredicate predicate)
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
findAll
public java.util.List<Node> findAll()
public java.util.List<Node> findAll(IFindNodeOptions options)
Return this construct and all of its sub-nodes in the given order.
Optionally filter nodes based on predicate.
options
Optional
- Type: IFindNodeOptions
findAllLinks
public java.util.List<Edge> findAllLinks()
public java.util.List<Edge> findAllLinks(IFindEdgeOptions options)
Return all direct links of this node and that of all sub-nodes.
Optionally filter links based on predicate.
options
Optional
- Type: IFindEdgeOptions
findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- Type: java.lang.Number
findChild
public Node findChild(java.lang.String id)
Find child with given id.
Similar to find
but does not throw error if no child found.
id
Required
- Type: java.lang.String
findLink
public Edge findLink(IEdgePredicate predicate)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find link of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
findLinks
public java.util.List<Edge> findLinks(IEdgePredicate predicate)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow)
public java.util.List<Edge> findLinks(IEdgePredicate predicate, java.lang.Boolean reverse, java.lang.Boolean follow, java.lang.Boolean direct)
Find all links of this node based on predicate.
By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: java.lang.Boolean
Indicates if links are search in reverse order.
follow
Optional
- Type: java.lang.Boolean
Indicates if link chain is followed.
direct
Optional
- Type: java.lang.Boolean
Indicates that only direct links should be searched.
getCfnProp
public java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject OR java.util.List<java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject> getCfnProp(java.lang.String key)
Get specific CloudFormation property.
key
Required
- Type: java.lang.String
getChild
public Node getChild(java.lang.String id)
Get child node with given id.
id
Required
- Type: java.lang.String
getLinkChains
public java.util.List<java.util.List<java.lang.Object>> getLinkChains()
public java.util.List<java.util.List<java.lang.Object>> getLinkChains(java.lang.Boolean reverse)
Resolve all link chains.
reverse
Optional
- Type: java.lang.Boolean
getNearestAncestor
public Node getNearestAncestor(Node node)
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
isAncestor
public java.lang.Boolean isAncestor(Node ancestor)
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
isChild
public java.lang.Boolean isChild(Node node)
Indicates if specific node is a child of this node.
node
Required
- Type: Node
mutateCollapse
public void mutateCollapse()
Collapses all sub-nodes of this node into this node.
mutateCollapseTo
public Node mutateCollapseTo(Node ancestor)
Collapses this node into an ancestor.
ancestor
Required
- Type: Node
mutateCollapseToParent
public Node mutateCollapseToParent()
Collapses this node into it's parent node.
mutateHoist
public void mutateHoist(Node newParent)
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
newParent
Required
- Type: Node
mutateMove
public void mutateMove(Node newParent)
Move this node into a new parent node.
newParent
Required
- Type: Node
The parent to move this node to.
mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)
Remove a child node from this node.
node
Required
- Type: Node
mutateRemoveLink
public java.lang.Boolean mutateRemoveLink(Edge link)
Remove a link from this node.
link
Required
- Type: Edge
mutateRemoveReverseLink
public java.lang.Boolean mutateRemoveReverseLink(Edge link)
Remove a link to this node.
link
Required
- Type: Edge
mutateUncluster
public void mutateUncluster()
Hoist all children to parent and collapse node to parent.
toString
public java.lang.String toString()
Get string representation of this node.
Static Functions
Name | Description |
---|---|
isOutputNode |
Indicates if node is an {@link OutputNode}. |
isOutputNode
import software.aws.pdk.cdk_graph.OutputNode;
OutputNode.isOutputNode(Node node)
Indicates if node is an {@link OutputNode}.
node
Required
- Type: Node
Properties
Name | Type | Description |
---|---|---|
attributes |
java.util.Map |
Get readonly record of all attributes. |
flags |
java.util.List<FlagEnum> |
Get readonly list of all flags. |
isDestroyed |
java.lang.Boolean |
Indicates if the entity has been destroyed (eg: removed from store). |
isMutated |
java.lang.Boolean |
Indicates if the entity has had destructive mutations applied. |
metadata |
java.util.List |
Get readonly list of all metadata entries. |
store |
Store |
Reference to the store. |
tags |
java.util.Map |
Get readonly record of all tags. |
uuid |
java.lang.String |
Universally unique identifier. |
allowDestructiveMutations |
java.lang.Boolean |
Indicates if this node allows destructive mutations. |
children |
java.util.List<Node> |
Get all direct child nodes. |
dependedOnBy |
java.util.List<Node> |
Get list of Nodes that depend on this node. |
dependencies |
java.util.List<Node> |
Get list of Nodes that this node depends on. |
dependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the source. |
depth |
java.lang.Number |
Indicates the depth of the node relative to root (0). |
id |
java.lang.String |
Node id, which is only unique within parent scope. |
isAsset |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.ASSET}. |
isCfnFqn |
java.lang.Boolean |
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct. |
isCluster |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.CLUSTER}. |
isCustomResource |
java.lang.Boolean |
Indicates if node is a Custom Resource. |
isExtraneous |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children. |
isGraphContainer |
java.lang.Boolean |
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}. |
isLeaf |
java.lang.Boolean |
Indicates if this node is a leaf node, which means it does not have children. |
isTopLevel |
java.lang.Boolean |
Indicates if node is direct child of the graph root node. |
links |
java.util.List<Edge> |
Gets all links (edges) in which this node is the source. |
nodeType |
NodeTypeEnum |
Type of node. |
path |
java.lang.String |
Path of the node. |
referencedBy |
java.util.List<Node> |
Get list of Nodes that reference this node. |
referenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the source. |
references |
java.util.List<Node> |
Get list of Nodes that this node references. |
reverseDependencyLinks |
java.util.List<Dependency> |
Gets list of {@link Dependency} links (edges) where this node is the target. |
reverseLinks |
java.util.List<Edge> |
Gets all links (edges) in which this node is the target. |
reverseReferenceLinks |
java.util.List<Reference> |
Gets list of {@link Reference} links (edges) where this node is the target. |
scopes |
java.util.List<Node> |
Gets descending ordered list of ancestors from the root. |
siblings |
java.util.List<Node> |
Get list of siblings of this node. |
cfnProps |
PlainObject |
Gets CloudFormation properties for this node. |
cfnType |
java.lang.String |
Get the CloudFormation resource type for this node. |
constructInfo |
ConstructInfo |
Synthesized construct information defining jii resolution data. |
constructInfoFqn |
java.lang.String |
Synthesized construct information defining jii resolution data. |
logicalId |
java.lang.String |
Logical id of the node, which is only unique within containing stack. |
parent |
Node |
Parent node. |
rootStack |
StackNode |
Get root stack. |
stack |
StackNode |
Stack the node is contained in. |
isExport |
java.lang.Boolean |
Indicates if {@link OutputNode} is exported. |
value |
java.lang.Object |
Get the value* attribute. |
exportName |
java.lang.String |
Get the export name attribute. |
attributes
Required
public java.lang.Object getAttributes();
- Type: java.util.Map
PlainObject\ OR java.util.List\ PlainObject\>>
Get readonly record of all attributes.
flags
Required
public java.util.List<FlagEnum> getFlags();
- Type: java.util.List<FlagEnum>
Get readonly list of all flags.
isDestroyed
Required
public java.lang.Boolean getIsDestroyed();
- Type: java.lang.Boolean
Indicates if the entity has been destroyed (eg: removed from store).
isMutated
Required
public java.lang.Boolean getIsMutated();
- Type: java.lang.Boolean
Indicates if the entity has had destructive mutations applied.
metadata
Required
public java.util.List<MetadataEntry> getMetadata();
- Type: java.util.List
Get readonly list of all metadata entries.
store
Required
public Store getStore();
- Type: Store
Reference to the store.
tags
Required
public java.util.Map<java.lang.String, java.lang.String> getTags();
- Type: java.util.Map
Get readonly record of all tags.
uuid
Required
public java.lang.String getUuid();
- Type: java.lang.String
Universally unique identifier.
allowDestructiveMutations
Required
public java.lang.Boolean getAllowDestructiveMutations();
- Type: java.lang.Boolean
Indicates if this node allows destructive mutations.
children
Required
public java.util.List<Node> getChildren();
- Type: java.util.List<Node>
Get all direct child nodes.
dependedOnBy
Required
public java.util.List<Node> getDependedOnBy();
- Type: java.util.List<Node>
Get list of Nodes that depend on this node.
dependencies
Required
public java.util.List<Node> getDependencies();
- Type: java.util.List<Node>
Get list of Nodes that this node depends on.
dependencyLinks
Required
public java.util.List<Dependency> getDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
public java.lang.Number getDepth();
- Type: java.lang.Number
Indicates the depth of the node relative to root (0).
id
Required
public java.lang.String getId();
- Type: java.lang.String
Node id, which is only unique within parent scope.
isAsset
Required
public java.lang.Boolean getIsAsset();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.ASSET}.
isCfnFqn
Required
public java.lang.Boolean getIsCfnFqn();
- Type: java.lang.Boolean
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
isCluster
Required
public java.lang.Boolean getIsCluster();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
isCustomResource
Required
public java.lang.Boolean getIsCustomResource();
- Type: java.lang.Boolean
Indicates if node is a Custom Resource.
isExtraneous
Required
public java.lang.Boolean getIsExtraneous();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
isGraphContainer
Required
public java.lang.Boolean getIsGraphContainer();
- Type: java.lang.Boolean
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
isLeaf
Required
public java.lang.Boolean getIsLeaf();
- Type: java.lang.Boolean
Indicates if this node is a leaf node, which means it does not have children.
isTopLevel
Required
public java.lang.Boolean getIsTopLevel();
- Type: java.lang.Boolean
Indicates if node is direct child of the graph root node.
links
Required
public java.util.List<Edge> getLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the source.
nodeType
Required
public NodeTypeEnum getNodeType();
- Type: NodeTypeEnum
Type of node.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
Path of the node.
referencedBy
Required
public java.util.List<Node> getReferencedBy();
- Type: java.util.List<Node>
Get list of Nodes that reference this node.
referenceLinks
Required
public java.util.List<Reference> getReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
public java.util.List<Node> getReferences();
- Type: java.util.List<Node>
Get list of Nodes that this node references.
reverseDependencyLinks
Required
public java.util.List<Dependency> getReverseDependencyLinks();
- Type: java.util.List<Dependency>
Gets list of {@link Dependency} links (edges) where this node is the target.
reverseLinks
Required
public java.util.List<Edge> getReverseLinks();
- Type: java.util.List<Edge>
Gets all links (edges) in which this node is the target.
reverseReferenceLinks
Required
public java.util.List<Reference> getReverseReferenceLinks();
- Type: java.util.List<Reference>
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
public java.util.List<Node> getScopes();
- Type: java.util.List<Node>
Gets descending ordered list of ancestors from the root.
siblings
Required
public java.util.List<Node> getSiblings();
- Type: java.util.List<Node>
Get list of siblings of this node.
cfnProps
Optional
public PlainObject getCfnProps();
- Type: PlainObject
Gets CloudFormation properties for this node.
cfnType
Optional
public java.lang.String getCfnType();
- Type: java.lang.String
Get the CloudFormation resource type for this node.
constructInfo
Optional
public ConstructInfo getConstructInfo();
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
constructInfoFqn
Optional
public java.lang.String getConstructInfoFqn();
- Type: java.lang.String
Synthesized construct information defining jii resolution data.
logicalId
Optional
public java.lang.String getLogicalId();
- Type: java.lang.String
Logical id of the node, which is only unique within containing stack.
parent
Optional
public Node getParent();
- Type: Node
Parent node.
Only the root node should not have parent.
rootStack
Optional
public StackNode getRootStack();
- Type: StackNode
Get root stack.
stack
Optional
public StackNode getStack();
- Type: StackNode
Stack the node is contained in.
isExport
Required
public java.lang.Boolean getIsExport();
- Type: java.lang.Boolean
Indicates if {@link OutputNode} is exported.
value
Required
public java.lang.Object getValue();
- Type: java.lang.Object
Get the value* attribute.
exportName
Optional
public java.lang.String getExportName();
- Type: java.lang.String
Get the export name attribute.
Constants
Name | Type | Description |
---|---|---|
ATTR_EXPORT_NAME |
java.lang.String |
Attribute key where output export name is stored. |
ATTR_VALUE |
java.lang.String |
Attribute key where output value is stored. |
ATTR_EXPORT_NAME
Required
public java.lang.String getAttrExportName();
- Type: java.lang.String
Attribute key where output export name is stored.
ATTR_VALUE
Required
public java.lang.String getAttrValue();
- Type: java.lang.String
Attribute key where output value is stored.
ParameterNode
ParameterNode defines a CfnParameter node.
Initializers
import software.aws.pdk.cdk_graph.ParameterNode;
new ParameterNode(IParameterNodeProps props);
Name | Type | Description |
---|---|---|
props |
IParameterNodeProps |
No description. |
props
Required
- Type: IParameterNodeProps
Methods
Name | Description |
---|---|
addAttribute |
Add attribute. |
addFlag |
Add flag. |
addMetadata |
Add metadata entry. |
addTag |
Add tag. |
applyData |
Applies data (attributes, metadata, tags, flag) to entity. |
findMetadata |
Retrieves all metadata entries of a given type. |
getAttribute |
Get attribute by key. |
getTag |
Get tag by key. |
hasAttribute |
Indicates if entity has a given attribute defined, and optionally with a specific value. |
hasFlag |
Indicates if entity has a given flag. |
hasMetadata |
Indicates if entity has matching metadata entry. |
hasTag |
Indicates if entity has tag, optionally verifying tag value. |
mutateDestroy |
Destroys this node by removing all references and removing this node from the store. |
setAttribute |
Set attribute. |
setTag |
Set tag. |
addChild |
Add child node. |
addLink |
Add link to another node. |
addReverseLink |
Add link from another node. |
doesDependOn |
Indicates if this node depends on another node. |
doesReference |
Indicates if this node references another node. |
find |
Recursively find the nearest sub-node matching predicate. |
findAll |
Return this construct and all of its sub-nodes in the given order. |
findAllLinks |
Return all direct links of this node and that of all sub-nodes. |
findAncestor |
Find nearest ancestor of this node matching given predicate. |
findChild |
Find child with given id. |
findLink |
Find link of this node based on predicate. |
findLinks |
Find all links of this node based on predicate. |
getCfnProp |
Get specific CloudFormation property. |
getChild |
Get child node with given id. |
getLinkChains |
Resolve all link chains. |
getNearestAncestor |
Gets the nearest common ancestor shared between this node and another node. |
isAncestor |
Indicates if a specific node is an ancestor of this node. |
isChild |
Indicates if specific node is a child of this node. |
mutateCollapse |
Collapses all sub-nodes of this node into this node. |
mutateCollapseTo |
Collapses this node into an ancestor. |
mutateCollapseToParent |
Collapses this node into it's parent node. |
mutateHoist |
Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor. |
mutateMove |
Move this node into a new parent node. |
mutateRemoveChild |
Remove a child node from this node. |
mutateRemoveLink |
Remove a link from this node. |
mutateRemoveReverseLink |
Remove a link to this node. |
mutateUncluster |
Hoist all children to parent and collapse node to parent. |
toString |
Get string representation of this node. |
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)
Add attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
addFlag
public void addFlag(FlagEnum flag)
Add flag.
flag
Required
- Type: FlagEnum
addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)
Add metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
addTag
public void addTag(java.lang.String key, java.lang.String value)
Add tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
applyData
public void applyData(IBaseEntityDataProps data)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite)
public void applyData(IBaseEntityDataProps data, java.lang.Boolean overwrite, java.lang.Boolean applyFlags)
Applies data (attributes, metadata, tags, flag) to entity.
Generally used only for mutations such as collapse and consume to retain data.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: java.lang.Boolean
applyFlags
Optional
- Type: java.lang.Boolean
Indicates if data is overwritten - Indicates if flags should be applied.
findMetadata
public java.util.List<MetadataEntry> findMetadata(java.lang.String metadataType)
Retrieves all metadata entries of a given type.
metadataType
Required
- Type: java.lang.String
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
Get attribute by key.
key
Required
- Type: java.lang.String
getTag
public java.lang.String getTag(java.lang.String key)
Get tag by key.
key
Required
- Type: java.lang.String
hasAttribute
public java.lang.Boolean hasAttribute(java.lang.String key)
public java.lang.Boolean hasAttribute(java.lang.String key, java.lang.Object value)
Indicates if entity has a given attribute defined, and optionally with a specific value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.Object
hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)
Indicates if entity has matching metadata entry.
metadataType
Required
- Type: java.lang.String
data
Required
- Type: java.lang.Object
hasTag
public java.lang.Boolean hasTag(java.lang.String key)
public java.lang.Boolean hasTag(java.lang.String key, java.lang.String value)
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: java.lang.String
value
Optional
- Type: java.lang.String
mutateDestroy
public void mutateDestroy()
public void mutateDestroy(java.lang.Boolean strict)
Destroys this node by removing all references and removing this node from the store.
strict
Optional
- Type: java.lang.Boolean
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.Object
setTag
public void setTag(java.lang.String key, java.lang.String value)
Set tag.
Will overwrite existing tag.
key
Required
- Type: java.lang.String
value
Required
- Type: java.lang.String
addChild
public void addChild(Node node)
Add child node.
node
Required
- Type: Node
addLink
public void addLink(Edge edge)
Add link to another node.
edge
Required
- Type: Edge
addReverseLink
public void addReverseLink(Edge edge)
Add link from another node.
edge
Required
- Type: Edge
doesDependOn
public java.lang.Boolean doesDependOn(Node node)
Indicates if this node depends on another node.
node
Required
- Type: Node
doesReference
public java.lang.Boolean doesReference(Node node)
Indicates if this node references another node.
node
Required
- Type: Node
find
public Node find(INodePredicate predicate)
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
findAll
public java.util.List<Node> findAll()
public java.util.List<Node> findAll(IFindNodeOptions options)
Return this construct and all of its sub-nodes in the given order.
Optionally filter nodes based on predicate.
options
Optional
- Type: IFindNodeOptions
findAllLinks
public java.util.List<Edge> findAllLinks()
public java.util.List<Edge> findAllLinks(IFindEdgeOptions options)
Return all direct links of this node and that of all sub-nodes.
Optionally filter links based on predicate.
options
Optional
- Type: IFindEdgeOptions
findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- Type: java.lang.Number
findChild
public Node findChild(java.lang.String id)
Find child with given id.
Similar to find
but does not throw error if no child found.
id
Required
- Type: java.lang.String
findLink
public Edge findLink(IEdgePredicate predicate)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse)
public Edge findLink(IEdgePredicate predicate, java.