Skip to content

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.

rootRequired
  • Type: software.constructs.Construct

pluginsOptional

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.

xRequired
  • 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.

nodeRequired
public Node getNode();
  • Type: software.constructs.Node

The tree node.


configRequired
public java.util.Map<java.lang.String, java.lang.Object> getConfig();
  • Type: java.util.Map

Config.


pluginsRequired
public java.util.List<ICdkGraphPlugin> getPlugins();

List of plugins registered with this instance.


rootRequired
public Construct getRoot();
  • Type: software.constructs.Construct

graphContextOptional
public CdkGraphContext getGraphContext();

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.

IDRequired
public java.lang.String getId();
  • Type: java.lang.String

Fixed CdkGraph construct id.


VERSIONRequired
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.

filenameRequired
public java.lang.String getFilename();
  • Type: java.lang.String

Filename of the artifact.


filepathRequired
public java.lang.String getFilepath();
  • Type: java.lang.String

Full path where artifact is stored.


idRequired
public java.lang.String getId();
  • Type: java.lang.String

The unique type of the artifact.


sourceRequired
public java.lang.String getSource();
  • Type: java.lang.String

The source of the artifact (such as plugin, or core system, etc).


descriptionOptional
public java.lang.String getDescription();
  • Type: java.lang.String

Description of artifact.


ConstructInfo

Source information on a construct (class fqn and version).

https://github.com/aws/aws-cdk/blob/cea1039e3664fdfa89c6f00cdaeb1a0185a12678/packages/%40aws-cdk/core/lib/private/runtime-info.ts#L22

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.

fqnRequired
public java.lang.String getFqn();
  • Type: java.lang.String

versionRequired
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.

regexOptional
public java.lang.String getRegex();
  • Type: java.lang.String

String representation of a regex.


valueOptional
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.

pluginsOptional
public java.util.List<ICdkGraphPlugin> getPlugins();

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.

graphOptional
public IGraphFilter getGraph();

Graph Filter.


storeOptional
public IGraphStoreFilter getStore();

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.

allNodesOptional
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}


edgeOptional
public IEdgePredicate getEdge();

Predicate to match edges.

Edges are evaluated after nodes are filtered.


inverseOptional
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.


nodeOptional
public INodePredicate getNode();

Predicate to match nodes.


strategyOptional
public FilterStrategy getStrategy();

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.

allNodesOptional
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.


filtersOptional
public java.util.List<IFilter> getFilters();

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.

focusOptional
public IGraphFilterPlanFocusConfig getFocus();

Config to focus the graph on specific node.


orderOptional
public ConstructOrder getOrder();
  • Type: software.constructs.ConstructOrder
  • Default: {ConstructOrder.PREORDER}

The order to visit nodes and edges during filtering.


presetOptional
public FilterPreset getPreset();

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).

filterRequired
public IFilterFocusCallback getFilter();

The node or resolver to determine the node to focus on.


noHoistOptional
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.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identity.


attributesOptional
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Serializable entity attributes.

{@link Attributes }


flagsOptional
public java.util.List<FlagEnum> getFlags();

Serializable entity flags.

{@link FlagEnum }


metadataOptional
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Serializable entity metadata.

{@link Metadata }


tagsOptional
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Serializable entity tags.

{@link Tags }


dependenciesRequired
public java.util.List<java.lang.String> getDependencies();
  • Type: java.util.List

unresolvedReferencesRequired
public java.util.List<SGUnresolvedReference> getUnresolvedReferences();

cfnTypeOptional
public java.lang.String getCfnType();
  • Type: java.lang.String

constructInfoOptional
public ConstructInfo getConstructInfo();

logicalIdOptional
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.MapPlainObject\ OR java.util.List\PlainObject\>> 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).

uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identity.


attributesOptional
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Serializable entity attributes.

{@link Attributes }


flagsOptional
public java.util.List<FlagEnum> getFlags();

Serializable entity flags.

{@link FlagEnum }


metadataOptional
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Serializable entity metadata.

{@link Metadata }


tagsOptional
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Serializable entity tags.

{@link Tags }


directionRequired
public EdgeDirectionEnum getDirection();

Indicates the direction in which the edge is directed.


edgeTypeRequired
public EdgeTypeEnum getEdgeType();

Type of edge.


sourceRequired
public java.lang.String getSource();
  • Type: java.lang.String

UUID of edge source node (tail).


targetRequired
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.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identity.


attributesOptional
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Serializable entity attributes.

{@link Attributes }


flagsOptional
public java.util.List<FlagEnum> getFlags();

Serializable entity flags.

{@link FlagEnum }


metadataOptional
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Serializable entity metadata.

{@link Metadata }


tagsOptional
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Serializable entity tags.

{@link 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.

edgesRequired
public java.util.List<SGEdge> getEdges();
  • Type: java.util.List<SGEdge>

List of edges.


treeRequired
public SGNode getTree();

Node tree.


versionRequired
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.MapPlainObject\ OR java.util.List\PlainObject\>> 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.MapSGNode\> 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.

uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identity.


attributesOptional
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Serializable entity attributes.

{@link Attributes }


flagsOptional
public java.util.List<FlagEnum> getFlags();

Serializable entity flags.

{@link FlagEnum }


metadataOptional
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Serializable entity metadata.

{@link Metadata }


tagsOptional
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Serializable entity tags.

{@link Tags }


idRequired
public java.lang.String getId();
  • Type: java.lang.String

Node id within parent (unique only between parent child nodes).


nodeTypeRequired
public NodeTypeEnum getNodeType();

Node type.


pathRequired
public java.lang.String getPath();
  • Type: java.lang.String

Node path.


cfnTypeOptional
public java.lang.String getCfnType();
  • Type: java.lang.String

CloudFormation resource type for this node.


childrenOptional
public java.util.Map<java.lang.String, SGNode> getChildren();
  • Type: java.util.MapSGNode\>

Child node record.


constructInfoOptional
public ConstructInfo getConstructInfo();

Synthesized construct information defining jii resolution data.


edgesOptional
public java.util.List<java.lang.String> getEdges();
  • Type: java.util.List

List of edge UUIDs where this node is the source.


logicalIdOptional
public java.lang.String getLogicalId();
  • Type: java.lang.String

Logical id of the node, which is only unique within containing stack.


parentOptional
public java.lang.String getParent();
  • Type: java.lang.String

UUID of node parent.


stackOptional
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.ListPlainObject\> No description.

referenceTypeRequired
public ReferenceTypeEnum getReferenceType();

sourceRequired
public java.lang.String getSource();
  • Type: java.lang.String

targetRequired
public java.lang.String getTarget();
  • Type: java.lang.String

valueOptional
public java.lang.Object getValue();
  • Type: java.lang.String OR java.lang.Number OR java.lang.Boolean OR PlainObject OR java.util.ListPlainObject\>

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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

strictOptional
  • 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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.String

addChild
public void addChild(Node node)

Add child node.

nodeRequired

public void addLink(Edge edge)

Add link to another node.

edgeRequired

public void addReverseLink(Edge edge)

Add link from another node.

edgeRequired

doesDependOn
public java.lang.Boolean doesDependOn(Node node)

Indicates if this node depends on another node.

nodeRequired

doesReference
public java.lang.Boolean doesReference(Node node)

Indicates if this node references another node.

nodeRequired

find
public Node find(INodePredicate predicate)

Recursively find the nearest sub-node matching predicate.

predicateRequired

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.

optionsOptional

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.

optionsOptional

findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • 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.

idRequired
  • Type: java.lang.String

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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • Type: java.lang.Boolean

Indicates that only direct links should be searched.


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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • 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.

keyRequired
  • Type: java.lang.String

getChild
public Node getChild(java.lang.String id)

Get child node with given id.

idRequired
  • 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.

{@link EdgeChain }

reverseOptional
  • Type: java.lang.Boolean

getNearestAncestor
public Node getNearestAncestor(Node node)

Gets the nearest common ancestor shared between this node and another node.

nodeRequired

isAncestor
public java.lang.Boolean isAncestor(Node ancestor)

Indicates if a specific node is an ancestor of this node.

ancestorRequired

isChild
public java.lang.Boolean isChild(Node node)

Indicates if specific node is a child of this node.

nodeRequired

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.

ancestorRequired

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.

newParentRequired

mutateMove
public void mutateMove(Node newParent)

Move this node into a new parent node.

newParentRequired

The parent to move this node to.


mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)

Remove a child node from this node.

nodeRequired

public java.lang.Boolean mutateRemoveLink(Edge link)

Remove a link from this node.

linkRequired

public java.lang.Boolean mutateRemoveReverseLink(Edge link)

Remove a link to this node.

linkRequired

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}.

nodeRequired

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
public java.util.List<Node> getChildren();
  • Type: java.util.List<Node>

Get all direct child nodes.


dependedOnByRequired
public java.util.List<Node> getDependedOnBy();
  • Type: java.util.List<Node>

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
public java.util.List<Node> getDependencies();
  • Type: java.util.List<Node>

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependencyLinksRequired
public java.util.List<Dependency> getDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the source.


depthRequired
public java.lang.Number getDepth();
  • Type: java.lang.Number

Indicates the depth of the node relative to root (0).


idRequired
public java.lang.String getId();
  • Type: java.lang.String

Node id, which is only unique within parent scope.


isAssetRequired
public java.lang.Boolean getIsAsset();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.ASSET}.


isCfnFqnRequired
public java.lang.Boolean getIsCfnFqn();
  • Type: java.lang.Boolean

Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.

{@link FlagEnum.CFN_FQN }


isClusterRequired
public java.lang.Boolean getIsCluster();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.CLUSTER}.


isCustomResourceRequired
public java.lang.Boolean getIsCustomResource();
  • Type: java.lang.Boolean

Indicates if node is a Custom Resource.


isExtraneousRequired
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.


isGraphContainerRequired
public java.lang.Boolean getIsGraphContainer();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.


isLeafRequired
public java.lang.Boolean getIsLeaf();
  • Type: java.lang.Boolean

Indicates if this node is a leaf node, which means it does not have children.


isTopLevelRequired
public java.lang.Boolean getIsTopLevel();
  • Type: java.lang.Boolean

Indicates if node is direct child of the graph root node.


linksRequired
public java.util.List<Edge> getLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the source.


nodeTypeRequired
public NodeTypeEnum getNodeType();

Type of node.


pathRequired
public java.lang.String getPath();
  • Type: java.lang.String

Path of the node.


referencedByRequired
public java.util.List<Node> getReferencedBy();
  • Type: java.util.List<Node>

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


referenceLinksRequired
public java.util.List<Reference> getReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the source.


referencesRequired
public java.util.List<Node> getReferences();
  • Type: java.util.List<Node>

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverseDependencyLinksRequired
public java.util.List<Dependency> getReverseDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the target.


reverseLinksRequired
public java.util.List<Edge> getReverseLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the target.


reverseReferenceLinksRequired
public java.util.List<Reference> getReverseReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the target.


scopesRequired
public java.util.List<Node> getScopes();
  • Type: java.util.List<Node>

Gets descending ordered list of ancestors from the root.


siblingsRequired
public java.util.List<Node> getSiblings();
  • Type: java.util.List<Node>

Get list of siblings of this node.


cfnPropsOptional
public PlainObject getCfnProps();

Gets CloudFormation properties for this node.


cfnTypeOptional
public java.lang.String getCfnType();
  • Type: java.lang.String

Get the CloudFormation resource type for this node.


constructInfoOptional
public ConstructInfo getConstructInfo();

Synthesized construct information defining jii resolution data.


constructInfoFqnOptional
public java.lang.String getConstructInfoFqn();
  • Type: java.lang.String

Synthesized construct information defining jii resolution data.


logicalIdOptional
public java.lang.String getLogicalId();
  • Type: java.lang.String

Logical id of the node, which is only unique within containing stack.


parentOptional
public Node getParent();

Parent node.

Only the root node should not have parent.


rootStackOptional
public StackNode getRootStack();

Get root stack.


stackOptional
public StackNode getStack();

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.

PATHRequired
public java.lang.String getPath();
  • Type: java.lang.String

Fixed path of the App.


UUIDRequired
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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

_strictOptional
  • Type: java.lang.Boolean

setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

edgeRequired

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.

edgeRequired

The edge to consume.


mutateDirection
public void mutateDirection(EdgeDirectionEnum direction)

Change the edge direction.

directionRequired

mutateSource
public void mutateSource(Node node)

Change the edge source.

nodeRequired

mutateTarget
public void mutateTarget(Node node)

Change the edge target.

nodeRequired

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.

{@link EdgeChain }

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.

chainRequired
  • Type: java.util.List

predicateRequired

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.

chainRequired
  • Type: java.util.List

predicateRequired

isRef
import software.aws.pdk.cdk_graph.AttributeReference;

AttributeReference.isRef(Edge edge)

Indicates if edge is a Ref based {@link Reference} edge.

edgeRequired

isReference
import software.aws.pdk.cdk_graph.AttributeReference;

AttributeReference.isReference(Edge edge)

Indicates if edge is a {@link Reference}.

edgeRequired

isAtt
import software.aws.pdk.cdk_graph.AttributeReference;

AttributeReference.isAtt(Edge edge)

Indicates if edge in an Fn::GetAtt {@link Reference}.

edgeRequired

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if edge allows destructive mutations.


directionRequired
public EdgeDirectionEnum getDirection();

Indicates the direction in which the edge is directed.


edgeTypeRequired
public EdgeTypeEnum getEdgeType();

Type of edge.


isClosedRequired
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.


isCrossStackRequired
public java.lang.Boolean getIsCrossStack();
  • Type: java.lang.Boolean

Indicates if source and target nodes reside in different root stacks.


isExtraneousRequired
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).


sourceRequired
public Node getSource();

Edge source is the node that defines the edge (tail).


targetRequired
public Node getTarget();

Edge target is the node being referenced by the source (head).


referenceTypeRequired
public ReferenceTypeEnum getReferenceType();

Get type of reference.


valueRequired
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_TYPERequired
public java.lang.String getAttType();
  • Type: java.lang.String

Attribute defining the type of reference.


PREFIXRequired
public java.lang.String getPrefix();
  • Type: java.lang.String

Edge prefix to denote Fn::GetAtt type reference edge.


ATT_VALUERequired
public java.lang.String getAttValue();
  • Type: java.lang.String

Attribute key for resolved value of attribute reference.


BaseEntity

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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

strictOptional
  • 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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.String

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
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.

storeRequired

outdirRequired
  • 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.

idRequired
  • Type: java.lang.String

hasArtifactFile
public java.lang.Boolean hasArtifactFile(java.lang.String filename)

Indicates if context has an artifact with filename defined.

filenameRequired
  • 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.

sourceRequired

The source of the artifact, such as the name of plugin.


idRequired
  • Type: java.lang.String

Unique id of the artifact.


filepathRequired
  • Type: java.lang.String

Full path where the artifact is stored.


descriptionOptional
  • 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.

sourceRequired

The source of the artifact, such as the name of plugin.


idRequired
  • Type: java.lang.String

Unique id of the artifact.


filenameRequired
  • Type: java.lang.String

Relative name of the file.


dataRequired
  • Type: java.lang.String

descriptionOptional
  • Type: java.lang.String

Description of the artifact.


Properties

Name Type Description
artifacts java.util.MapCdkGraphArtifact\> 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.

artifactsRequired
public java.util.Map<java.lang.String, CdkGraphArtifact> getArtifacts();
  • Type: java.util.MapCdkGraphArtifact\>

Get record of all graph artifacts keyed by artifact id.


graphJsonRequired
public CdkGraphArtifact getGraphJson();

Get CdkGraph core graph.json artifact.


outdirRequired
public java.lang.String getOutdir();
  • Type: java.lang.String

storeRequired
public Store getStore();

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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

strictOptional
  • Type: java.lang.Boolean

setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.String

addChild
public void addChild(Node node)

Add child node.

nodeRequired

public void addLink(Edge edge)

Add link to another node.

edgeRequired

public void addReverseLink(Edge edge)

Add link from another node.

edgeRequired

doesDependOn
public java.lang.Boolean doesDependOn(Node node)

Indicates if this node depends on another node.

nodeRequired

doesReference
public java.lang.Boolean doesReference(Node node)

Indicates if this node references another node.

nodeRequired

find
public Node find(INodePredicate predicate)

Recursively find the nearest sub-node matching predicate.

predicateRequired

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.

optionsOptional

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.

optionsOptional

findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • 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.

idRequired
  • Type: java.lang.String

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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • Type: java.lang.Boolean

Indicates that only direct links should be searched.


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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • 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.

keyRequired
  • Type: java.lang.String

getChild
public Node getChild(java.lang.String id)

Get child node with given id.

idRequired
  • 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.

{@link EdgeChain }

reverseOptional
  • Type: java.lang.Boolean

getNearestAncestor
public Node getNearestAncestor(Node node)

Gets the nearest common ancestor shared between this node and another node.

nodeRequired

isAncestor
public java.lang.Boolean isAncestor(Node ancestor)

Indicates if a specific node is an ancestor of this node.

ancestorRequired

isChild
public java.lang.Boolean isChild(Node node)

Indicates if specific node is a child of this node.

nodeRequired

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.

ancestorRequired

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.

newParentRequired

mutateMove
public void mutateMove(Node newParent)

Move this node into a new parent node.

newParentRequired

The parent to move this node to.


mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)

Remove a child node from this node.

nodeRequired

public java.lang.Boolean mutateRemoveLink(Edge link)

Remove a link from this node.

linkRequired

public java.lang.Boolean mutateRemoveReverseLink(Edge link)

Remove a link to this node.

linkRequired

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";
resourceRequired

{@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}.

nodeRequired

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
public java.util.List<Node> getChildren();
  • Type: java.util.List<Node>

Get all direct child nodes.


dependedOnByRequired
public java.util.List<Node> getDependedOnBy();
  • Type: java.util.List<Node>

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
public java.util.List<Node> getDependencies();
  • Type: java.util.List<Node>

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependencyLinksRequired
public java.util.List<Dependency> getDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the source.


depthRequired
public java.lang.Number getDepth();
  • Type: java.lang.Number

Indicates the depth of the node relative to root (0).


idRequired
public java.lang.String getId();
  • Type: java.lang.String

Node id, which is only unique within parent scope.


isAssetRequired
public java.lang.Boolean getIsAsset();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.ASSET}.


isCfnFqnRequired
public java.lang.Boolean getIsCfnFqn();
  • Type: java.lang.Boolean

Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.

{@link FlagEnum.CFN_FQN }


isClusterRequired
public java.lang.Boolean getIsCluster();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.CLUSTER}.


isCustomResourceRequired
public java.lang.Boolean getIsCustomResource();
  • Type: java.lang.Boolean

Indicates if node is a Custom Resource.


isExtraneousRequired
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.


isGraphContainerRequired
public java.lang.Boolean getIsGraphContainer();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.


isLeafRequired
public java.lang.Boolean getIsLeaf();
  • Type: java.lang.Boolean

Indicates if this node is a leaf node, which means it does not have children.


isTopLevelRequired
public java.lang.Boolean getIsTopLevel();
  • Type: java.lang.Boolean

Indicates if node is direct child of the graph root node.


linksRequired
public java.util.List<Edge> getLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the source.


nodeTypeRequired
public NodeTypeEnum getNodeType();

Type of node.


pathRequired
public java.lang.String getPath();
  • Type: java.lang.String

Path of the node.


referencedByRequired
public java.util.List<Node> getReferencedBy();
  • Type: java.util.List<Node>

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


referenceLinksRequired
public java.util.List<Reference> getReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the source.


referencesRequired
public java.util.List<Node> getReferences();
  • Type: java.util.List<Node>

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverseDependencyLinksRequired
public java.util.List<Dependency> getReverseDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the target.


reverseLinksRequired
public java.util.List<Edge> getReverseLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the target.


reverseReferenceLinksRequired
public java.util.List<Reference> getReverseReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the target.


scopesRequired
public java.util.List<Node> getScopes();
  • Type: java.util.List<Node>

Gets descending ordered list of ancestors from the root.


siblingsRequired
public java.util.List<Node> getSiblings();
  • Type: java.util.List<Node>

Get list of siblings of this node.


cfnPropsOptional
public PlainObject getCfnProps();

Gets CloudFormation properties for this node.


cfnTypeOptional
public java.lang.String getCfnType();
  • Type: java.lang.String

Get the CloudFormation resource type for this node.


constructInfoOptional
public ConstructInfo getConstructInfo();

Synthesized construct information defining jii resolution data.


constructInfoFqnOptional
public java.lang.String getConstructInfoFqn();
  • Type: java.lang.String

Synthesized construct information defining jii resolution data.


logicalIdOptional
public java.lang.String getLogicalId();
  • Type: java.lang.String

Logical id of the node, which is only unique within containing stack.


parentOptional
public Node getParent();

Parent node.

Only the root node should not have parent.


rootStackOptional
public StackNode getRootStack();

Get root stack.


stackOptional
public StackNode getStack();

Stack the node is contained in.


isImportRequired
public java.lang.Boolean getIsImport();
  • Type: java.lang.Boolean

Indicates if this CfnResource is imported (eg: s3.Bucket.fromBucketArn).


resourceOptional
public ResourceNode getResource();

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_TOKENRequired
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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

_strictOptional
  • Type: java.lang.Boolean

setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

edgeRequired

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.

edgeRequired

The edge to consume.


mutateDirection
public void mutateDirection(EdgeDirectionEnum direction)

Change the edge direction.

directionRequired

mutateSource
public void mutateSource(Node node)

Change the edge source.

nodeRequired

mutateTarget
public void mutateTarget(Node node)

Change the edge target.

nodeRequired

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.

chainRequired
  • Type: java.util.List

predicateRequired

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.

chainRequired
  • Type: java.util.List

predicateRequired

isDependency
import software.aws.pdk.cdk_graph.Dependency;

Dependency.isDependency(Edge edge)

Indicates if given edge is a {@link Dependency} edge.

edgeRequired

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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).

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if edge allows destructive mutations.


directionRequired
public EdgeDirectionEnum getDirection();

Indicates the direction in which the edge is directed.


edgeTypeRequired
public EdgeTypeEnum getEdgeType();

Type of edge.


isClosedRequired
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.


isCrossStackRequired
public java.lang.Boolean getIsCrossStack();
  • Type: java.lang.Boolean

Indicates if source and target nodes reside in different root stacks.


isExtraneousRequired
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).


sourceRequired
public Node getSource();

Edge source is the node that defines the edge (tail).


targetRequired
public Node getTarget();

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.

PREFIXRequired
public java.lang.String getPrefix();
  • Type: java.lang.String

Edge prefix to denote dependency edge.


Edge

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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

_strictOptional
  • Type: java.lang.Boolean

setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

edgeRequired

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.

edgeRequired

The edge to consume.


mutateDirection
public void mutateDirection(EdgeDirectionEnum direction)

Change the edge direction.

directionRequired

mutateSource
public void mutateSource(Node node)

Change the edge source.

nodeRequired

mutateTarget
public void mutateTarget(Node node)

Change the edge target.

nodeRequired

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.

chainRequired
  • Type: java.util.List

predicateRequired

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.

chainRequired
  • Type: java.util.List

predicateRequired

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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).

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if edge allows destructive mutations.


directionRequired
public EdgeDirectionEnum getDirection();

Indicates the direction in which the edge is directed.


edgeTypeRequired
public EdgeTypeEnum getEdgeType();

Type of edge.


isClosedRequired
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.


isCrossStackRequired
public java.lang.Boolean getIsCrossStack();
  • Type: java.lang.Boolean

Indicates if source and target nodes reside in different root stacks.


isExtraneousRequired
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).


sourceRequired
public Node getSource();

Edge source is the node that defines the edge (tail).


targetRequired
public Node getTarget();

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.

  1. pruneExtraneous()(store);
  2. collapseCdkOwnedResources()(store);
  3. collapseCdkWrappers()(store);
  4. collapseCustomResources()(store);
  5. ~pruneCustomResources()(store);~
  6. 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.

cfnTypesRequired

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}

nodeTypesRequired

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.

cfnTypesRequired

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}

nodeTypesRequired

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.

{@link Graph.Node.mutateUncluster }

clusterTypesOptional

verifyFilterable
import software.aws.pdk.cdk_graph.Filters;

Filters.verifyFilterable(Store store)

Verify that store is filterable, meaning it allows destructive mutations.

storeRequired

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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

_strictOptional
  • Type: java.lang.Boolean

setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

edgeRequired

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.

edgeRequired

The edge to consume.


mutateDirection
public void mutateDirection(EdgeDirectionEnum direction)

Change the edge direction.

directionRequired

mutateSource
public void mutateSource(Node node)

Change the edge source.

nodeRequired

mutateTarget
public void mutateTarget(Node node)

Change the edge target.

nodeRequired

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.

{@link EdgeChain }

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.

chainRequired
  • Type: java.util.List

predicateRequired

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.

chainRequired
  • Type: java.util.List

predicateRequired

isRef
import software.aws.pdk.cdk_graph.ImportReference;

ImportReference.isRef(Edge edge)

Indicates if edge is a Ref based {@link Reference} edge.

edgeRequired

isReference
import software.aws.pdk.cdk_graph.ImportReference;

ImportReference.isReference(Edge edge)

Indicates if edge is a {@link Reference}.

edgeRequired

isImport
import software.aws.pdk.cdk_graph.ImportReference;

ImportReference.isImport(Edge edge)

Indicates if edge is Fn::ImportValue based {@link Reference}.

edgeRequired

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if edge allows destructive mutations.


directionRequired
public EdgeDirectionEnum getDirection();

Indicates the direction in which the edge is directed.


edgeTypeRequired
public EdgeTypeEnum getEdgeType();

Type of edge.


isClosedRequired
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.


isCrossStackRequired
public java.lang.Boolean getIsCrossStack();
  • Type: java.lang.Boolean

Indicates if source and target nodes reside in different root stacks.


isExtraneousRequired
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).


sourceRequired
public Node getSource();

Edge source is the node that defines the edge (tail).


targetRequired
public Node getTarget();

Edge target is the node being referenced by the source (head).


referenceTypeRequired
public ReferenceTypeEnum getReferenceType();

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_TYPERequired
public java.lang.String getAttType();
  • Type: java.lang.String

Attribute defining the type of reference.


PREFIXRequired
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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

strictOptional
  • Type: java.lang.Boolean

setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.String

addChild
public void addChild(Node node)

Add child node.

nodeRequired

public void addLink(Edge edge)

Add link to another node.

edgeRequired

public void addReverseLink(Edge edge)

Add link from another node.

edgeRequired

doesDependOn
public java.lang.Boolean doesDependOn(Node node)

Indicates if this node depends on another node.

nodeRequired

doesReference
public java.lang.Boolean doesReference(Node node)

Indicates if this node references another node.

nodeRequired

find
public Node find(INodePredicate predicate)

Recursively find the nearest sub-node matching predicate.

predicateRequired

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.

optionsOptional

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.

optionsOptional

findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • 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.

idRequired
  • Type: java.lang.String

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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • Type: java.lang.Boolean

Indicates that only direct links should be searched.


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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • 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.

keyRequired
  • Type: java.lang.String

getChild
public Node getChild(java.lang.String id)

Get child node with given id.

idRequired
  • 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.

{@link EdgeChain }

reverseOptional
  • Type: java.lang.Boolean

getNearestAncestor
public Node getNearestAncestor(Node node)

Gets the nearest common ancestor shared between this node and another node.

nodeRequired

isAncestor
public java.lang.Boolean isAncestor(Node ancestor)

Indicates if a specific node is an ancestor of this node.

ancestorRequired

isChild
public java.lang.Boolean isChild(Node node)

Indicates if specific node is a child of this node.

nodeRequired

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.

ancestorRequired

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.

newParentRequired

mutateMove
public void mutateMove(Node newParent)

Move this node into a new parent node.

newParentRequired

The parent to move this node to.


mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)

Remove a child node from this node.

nodeRequired

public java.lang.Boolean mutateRemoveLink(Edge link)

Remove a link from this node.

linkRequired

public java.lang.Boolean mutateRemoveReverseLink(Edge link)

Remove a link to this node.

linkRequired

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.

nodeRequired

addParameter
public void addParameter(ParameterNode node)

Associate {@link ParameterNode} with this stack.

nodeRequired

findOutput
public OutputNode findOutput(java.lang.String logicalId)

Find {@link OutputNode} with logicalId defined by this stack.

logicalIdRequired
  • Type: java.lang.String

findParameter
public ParameterNode findParameter(java.lang.String parameterId)

Find {@link ParameterNode} with parameterId defined by this stack.

parameterIdRequired
  • Type: java.lang.String

mutateRemoveOutput
public java.lang.Boolean mutateRemoveOutput(OutputNode node)

Disassociate {@link OutputNode} from this stack.

nodeRequired

mutateRemoveParameter
public java.lang.Boolean mutateRemoveParameter(ParameterNode node)

Disassociate {@link ParameterNode} from this stack.

nodeRequired

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}.

nodeRequired

of
import software.aws.pdk.cdk_graph.NestedStackNode;

NestedStackNode.of(Node node)

Gets the {@link StackNode} containing a given resource.

nodeRequired

isNestedStackNode
import software.aws.pdk.cdk_graph.NestedStackNode;

NestedStackNode.isNestedStackNode(Node node)

Indicates if node is a {@link NestedStackNode}.

nodeRequired

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
public java.util.List<Node> getChildren();
  • Type: java.util.List<Node>

Get all direct child nodes.


dependedOnByRequired
public java.util.List<Node> getDependedOnBy();
  • Type: java.util.List<Node>

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
public java.util.List<Node> getDependencies();
  • Type: java.util.List<Node>

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependencyLinksRequired
public java.util.List<Dependency> getDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the source.


depthRequired
public java.lang.Number getDepth();
  • Type: java.lang.Number

Indicates the depth of the node relative to root (0).


idRequired
public java.lang.String getId();
  • Type: java.lang.String

Node id, which is only unique within parent scope.


isAssetRequired
public java.lang.Boolean getIsAsset();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.ASSET}.


isCfnFqnRequired
public java.lang.Boolean getIsCfnFqn();
  • Type: java.lang.Boolean

Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.

{@link FlagEnum.CFN_FQN }


isClusterRequired
public java.lang.Boolean getIsCluster();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.CLUSTER}.


isCustomResourceRequired
public java.lang.Boolean getIsCustomResource();
  • Type: java.lang.Boolean

Indicates if node is a Custom Resource.


isExtraneousRequired
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.


isGraphContainerRequired
public java.lang.Boolean getIsGraphContainer();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.


isLeafRequired
public java.lang.Boolean getIsLeaf();
  • Type: java.lang.Boolean

Indicates if this node is a leaf node, which means it does not have children.


isTopLevelRequired
public java.lang.Boolean getIsTopLevel();
  • Type: java.lang.Boolean

Indicates if node is direct child of the graph root node.


linksRequired
public java.util.List<Edge> getLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the source.


nodeTypeRequired
public NodeTypeEnum getNodeType();

Type of node.


pathRequired
public java.lang.String getPath();
  • Type: java.lang.String

Path of the node.


referencedByRequired
public java.util.List<Node> getReferencedBy();
  • Type: java.util.List<Node>

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


referenceLinksRequired
public java.util.List<Reference> getReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the source.


referencesRequired
public java.util.List<Node> getReferences();
  • Type: java.util.List<Node>

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverseDependencyLinksRequired
public java.util.List<Dependency> getReverseDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the target.


reverseLinksRequired
public java.util.List<Edge> getReverseLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the target.


reverseReferenceLinksRequired
public java.util.List<Reference> getReverseReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the target.


scopesRequired
public java.util.List<Node> getScopes();
  • Type: java.util.List<Node>

Gets descending ordered list of ancestors from the root.


siblingsRequired
public java.util.List<Node> getSiblings();
  • Type: java.util.List<Node>

Get list of siblings of this node.


cfnPropsOptional
public PlainObject getCfnProps();

Gets CloudFormation properties for this node.


cfnTypeOptional
public java.lang.String getCfnType();
  • Type: java.lang.String

Get the CloudFormation resource type for this node.


constructInfoOptional
public ConstructInfo getConstructInfo();

Synthesized construct information defining jii resolution data.


constructInfoFqnOptional
public java.lang.String getConstructInfoFqn();
  • Type: java.lang.String

Synthesized construct information defining jii resolution data.


logicalIdOptional
public java.lang.String getLogicalId();
  • Type: java.lang.String

Logical id of the node, which is only unique within containing stack.


parentOptional
public Node getParent();

Parent node.

Only the root node should not have parent.


rootStackOptional
public StackNode getRootStack();

Get root stack.


stackOptional
public StackNode getStack();

Stack the node is contained in.


exportsRequired
public java.util.List<OutputNode> getExports();

Get all exported {@link OutputNode}s defined by this stack.


outputsRequired
public java.util.List<OutputNode> getOutputs();

Get all {@link OutputNode}s defined by this stack.


parametersRequired
public java.util.List<ParameterNode> getParameters();

Get all {@link ParameterNode}s defined by this stack.


stageOptional
public StageNode getStage();

Get {@link StageNode} containing this stack.


parentStackOptional
public StackNode getParentStack();

Get parent stack of this nested stack.


Node

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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

strictOptional
  • 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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.String

addChild
public void addChild(Node node)

Add child node.

nodeRequired

public void addLink(Edge edge)

Add link to another node.

edgeRequired

public void addReverseLink(Edge edge)

Add link from another node.

edgeRequired

doesDependOn
public java.lang.Boolean doesDependOn(Node node)

Indicates if this node depends on another node.

nodeRequired

doesReference
public java.lang.Boolean doesReference(Node node)

Indicates if this node references another node.

nodeRequired

find
public Node find(INodePredicate predicate)

Recursively find the nearest sub-node matching predicate.

predicateRequired

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.

optionsOptional

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.

optionsOptional

findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • 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.

idRequired
  • Type: java.lang.String

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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • Type: java.lang.Boolean

Indicates that only direct links should be searched.


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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • 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.

keyRequired
  • Type: java.lang.String

getChild
public Node getChild(java.lang.String id)

Get child node with given id.

idRequired
  • 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.

{@link EdgeChain }

reverseOptional
  • Type: java.lang.Boolean

getNearestAncestor
public Node getNearestAncestor(Node node)

Gets the nearest common ancestor shared between this node and another node.

nodeRequired

isAncestor
public java.lang.Boolean isAncestor(Node ancestor)

Indicates if a specific node is an ancestor of this node.

ancestorRequired

isChild
public java.lang.Boolean isChild(Node node)

Indicates if specific node is a child of this node.

nodeRequired

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.

ancestorRequired

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.

newParentRequired

mutateMove
public void mutateMove(Node newParent)

Move this node into a new parent node.

newParentRequired

The parent to move this node to.


mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)

Remove a child node from this node.

nodeRequired

public java.lang.Boolean mutateRemoveLink(Edge link)

Remove a link from this node.

linkRequired

public java.lang.Boolean mutateRemoveReverseLink(Edge link)

Remove a link to this node.

linkRequired

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.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
public java.util.List<Node> getChildren();
  • Type: java.util.List<Node>

Get all direct child nodes.


dependedOnByRequired
public java.util.List<Node> getDependedOnBy();
  • Type: java.util.List<Node>

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
public java.util.List<Node> getDependencies();
  • Type: java.util.List<Node>

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependencyLinksRequired
public java.util.List<Dependency> getDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the source.


depthRequired
public java.lang.Number getDepth();
  • Type: java.lang.Number

Indicates the depth of the node relative to root (0).


idRequired
public java.lang.String getId();
  • Type: java.lang.String

Node id, which is only unique within parent scope.


isAssetRequired
public java.lang.Boolean getIsAsset();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.ASSET}.


isCfnFqnRequired
public java.lang.Boolean getIsCfnFqn();
  • Type: java.lang.Boolean

Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.

{@link FlagEnum.CFN_FQN }


isClusterRequired
public java.lang.Boolean getIsCluster();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.CLUSTER}.


isCustomResourceRequired
public java.lang.Boolean getIsCustomResource();
  • Type: java.lang.Boolean

Indicates if node is a Custom Resource.


isExtraneousRequired
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.


isGraphContainerRequired
public java.lang.Boolean getIsGraphContainer();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.


isLeafRequired
public java.lang.Boolean getIsLeaf();
  • Type: java.lang.Boolean

Indicates if this node is a leaf node, which means it does not have children.


isTopLevelRequired
public java.lang.Boolean getIsTopLevel();
  • Type: java.lang.Boolean

Indicates if node is direct child of the graph root node.


linksRequired
public java.util.List<Edge> getLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the source.


nodeTypeRequired
public NodeTypeEnum getNodeType();

Type of node.


pathRequired
public java.lang.String getPath();
  • Type: java.lang.String

Path of the node.


referencedByRequired
public java.util.List<Node> getReferencedBy();
  • Type: java.util.List<Node>

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


referenceLinksRequired
public java.util.List<Reference> getReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the source.


referencesRequired
public java.util.List<Node> getReferences();
  • Type: java.util.List<Node>

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverseDependencyLinksRequired
public java.util.List<Dependency> getReverseDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the target.


reverseLinksRequired
public java.util.List<Edge> getReverseLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the target.


reverseReferenceLinksRequired
public java.util.List<Reference> getReverseReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the target.


scopesRequired
public java.util.List<Node> getScopes();
  • Type: java.util.List<Node>

Gets descending ordered list of ancestors from the root.


siblingsRequired
public java.util.List<Node> getSiblings();
  • Type: java.util.List<Node>

Get list of siblings of this node.


cfnPropsOptional
public PlainObject getCfnProps();

Gets CloudFormation properties for this node.


cfnTypeOptional
public java.lang.String getCfnType();
  • Type: java.lang.String

Get the CloudFormation resource type for this node.


constructInfoOptional
public ConstructInfo getConstructInfo();

Synthesized construct information defining jii resolution data.


constructInfoFqnOptional
public java.lang.String getConstructInfoFqn();
  • Type: java.lang.String

Synthesized construct information defining jii resolution data.


logicalIdOptional
public java.lang.String getLogicalId();
  • Type: java.lang.String

Logical id of the node, which is only unique within containing stack.


parentOptional
public Node getParent();

Parent node.

Only the root node should not have parent.


rootStackOptional
public StackNode getRootStack();

Get root stack.


stackOptional
public StackNode getStack();

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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

strictOptional
  • Type: java.lang.Boolean

setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.String

addChild
public void addChild(Node node)

Add child node.

nodeRequired

public void addLink(Edge edge)

Add link to another node.

edgeRequired

public void addReverseLink(Edge edge)

Add link from another node.

edgeRequired

doesDependOn
public java.lang.Boolean doesDependOn(Node node)

Indicates if this node depends on another node.

nodeRequired

doesReference
public java.lang.Boolean doesReference(Node node)

Indicates if this node references another node.

nodeRequired

find
public Node find(INodePredicate predicate)

Recursively find the nearest sub-node matching predicate.

predicateRequired

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.

optionsOptional

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.

optionsOptional

findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • 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.

idRequired
  • Type: java.lang.String

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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • Type: java.lang.Boolean

Indicates that only direct links should be searched.


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.

predicateRequired

Edge predicate function to match edge.


reverseOptional
  • Type: java.lang.Boolean

Indicates if links are search in reverse order.


followOptional
  • Type: java.lang.Boolean

Indicates if link chain is followed.


directOptional
  • 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.

keyRequired
  • Type: java.lang.String

getChild
public Node getChild(java.lang.String id)

Get child node with given id.

idRequired
  • 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.

{@link EdgeChain }

reverseOptional
  • Type: java.lang.Boolean

getNearestAncestor
public Node getNearestAncestor(Node node)

Gets the nearest common ancestor shared between this node and another node.

nodeRequired

isAncestor
public java.lang.Boolean isAncestor(Node ancestor)

Indicates if a specific node is an ancestor of this node.

ancestorRequired

isChild
public java.lang.Boolean isChild(Node node)

Indicates if specific node is a child of this node.

nodeRequired

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.

ancestorRequired

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.

newParentRequired

mutateMove
public void mutateMove(Node newParent)

Move this node into a new parent node.

newParentRequired

The parent to move this node to.


mutateRemoveChild
public java.lang.Boolean mutateRemoveChild(Node node)

Remove a child node from this node.

nodeRequired

public java.lang.Boolean mutateRemoveLink(Edge link)

Remove a link from this node.

linkRequired

public java.lang.Boolean mutateRemoveReverseLink(Edge link)

Remove a link to this node.

linkRequired

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}.

nodeRequired

Properties

Name Type Description
attributes java.util.MapPlainObject\ OR java.util.List\PlainObject\>> 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.

attributesRequired
public java.lang.Object getAttributes();
  • Type: java.util.MapPlainObject\ OR java.util.List\PlainObject\>>

Get readonly record of all attributes.


flagsRequired
public java.util.List<FlagEnum> getFlags();

Get readonly list of all flags.


isDestroyedRequired
public java.lang.Boolean getIsDestroyed();
  • Type: java.lang.Boolean

Indicates if the entity has been destroyed (eg: removed from store).


isMutatedRequired
public java.lang.Boolean getIsMutated();
  • Type: java.lang.Boolean

Indicates if the entity has had destructive mutations applied.


metadataRequired
public java.util.List<MetadataEntry> getMetadata();
  • Type: java.util.List

Get readonly list of all metadata entries.


storeRequired
public Store getStore();

Reference to the store.


tagsRequired
public java.util.Map<java.lang.String, java.lang.String> getTags();
  • Type: java.util.Map

Get readonly record of all tags.


uuidRequired
public java.lang.String getUuid();
  • Type: java.lang.String

Universally unique identifier.


allowDestructiveMutationsRequired
public java.lang.Boolean getAllowDestructiveMutations();
  • Type: java.lang.Boolean

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
public java.util.List<Node> getChildren();
  • Type: java.util.List<Node>

Get all direct child nodes.


dependedOnByRequired
public java.util.List<Node> getDependedOnBy();
  • Type: java.util.List<Node>

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
public java.util.List<Node> getDependencies();
  • Type: java.util.List<Node>

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependencyLinksRequired
public java.util.List<Dependency> getDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the source.


depthRequired
public java.lang.Number getDepth();
  • Type: java.lang.Number

Indicates the depth of the node relative to root (0).


idRequired
public java.lang.String getId();
  • Type: java.lang.String

Node id, which is only unique within parent scope.


isAssetRequired
public java.lang.Boolean getIsAsset();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.ASSET}.


isCfnFqnRequired
public java.lang.Boolean getIsCfnFqn();
  • Type: java.lang.Boolean

Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.

{@link FlagEnum.CFN_FQN }


isClusterRequired
public java.lang.Boolean getIsCluster();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.CLUSTER}.


isCustomResourceRequired
public java.lang.Boolean getIsCustomResource();
  • Type: java.lang.Boolean

Indicates if node is a Custom Resource.


isExtraneousRequired
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.


isGraphContainerRequired
public java.lang.Boolean getIsGraphContainer();
  • Type: java.lang.Boolean

Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.


isLeafRequired
public java.lang.Boolean getIsLeaf();
  • Type: java.lang.Boolean

Indicates if this node is a leaf node, which means it does not have children.


isTopLevelRequired
public java.lang.Boolean getIsTopLevel();
  • Type: java.lang.Boolean

Indicates if node is direct child of the graph root node.


linksRequired
public java.util.List<Edge> getLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the source.


nodeTypeRequired
public NodeTypeEnum getNodeType();

Type of node.


pathRequired
public java.lang.String getPath();
  • Type: java.lang.String

Path of the node.


referencedByRequired
public java.util.List<Node> getReferencedBy();
  • Type: java.util.List<Node>

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


referenceLinksRequired
public java.util.List<Reference> getReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the source.


referencesRequired
public java.util.List<Node> getReferences();
  • Type: java.util.List<Node>

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverseDependencyLinksRequired
public java.util.List<Dependency> getReverseDependencyLinks();

Gets list of {@link Dependency} links (edges) where this node is the target.


reverseLinksRequired
public java.util.List<Edge> getReverseLinks();
  • Type: java.util.List<Edge>

Gets all links (edges) in which this node is the target.


reverseReferenceLinksRequired
public java.util.List<Reference> getReverseReferenceLinks();

Gets list of {@link Reference} links (edges) where this node is the target.


scopesRequired
public java.util.List<Node> getScopes();
  • Type: java.util.List<Node>

Gets descending ordered list of ancestors from the root.


siblingsRequired
public java.util.List<Node> getSiblings();
  • Type: java.util.List<Node>

Get list of siblings of this node.


cfnPropsOptional
public PlainObject getCfnProps();

Gets CloudFormation properties for this node.


cfnTypeOptional
public java.lang.String getCfnType();
  • Type: java.lang.String

Get the CloudFormation resource type for this node.


constructInfoOptional
public ConstructInfo getConstructInfo();

Synthesized construct information defining jii resolution data.


constructInfoFqnOptional
public java.lang.String getConstructInfoFqn();
  • Type: java.lang.String

Synthesized construct information defining jii resolution data.


logicalIdOptional
public java.lang.String getLogicalId();
  • Type: java.lang.String

Logical id of the node, which is only unique within containing stack.


parentOptional
public Node getParent();

Parent node.

Only the root node should not have parent.


rootStackOptional
public StackNode getRootStack();

Get root stack.


stackOptional
public StackNode getStack();

Stack the node is contained in.


isExportRequired
public java.lang.Boolean getIsExport();
  • Type: java.lang.Boolean

Indicates if {@link OutputNode} is exported.


valueRequired
public java.lang.Object getValue();
  • Type: java.lang.Object

Get the value* attribute.


exportNameOptional
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_NAMERequired
public java.lang.String getAttrExportName();
  • Type: java.lang.String

Attribute key where output export name is stored.


ATTR_VALUERequired
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.

propsRequired

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.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

addFlag
public void addFlag(FlagEnum flag)

Add flag.

flagRequired

addMetadata
public void addMetadata(java.lang.String metadataType, java.lang.Object data)

Add metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • Type: java.lang.Object

addTag
public void addTag(java.lang.String key, java.lang.String value)

Add tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • 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.

dataRequired

The data to apply.


overwriteOptional
  • Type: java.lang.Boolean

applyFlagsOptional
  • 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.

metadataTypeRequired
  • Type: java.lang.String

getAttribute
public java.lang.Object getAttribute(java.lang.String key)

Get attribute by key.

keyRequired
  • Type: java.lang.String

getTag
public java.lang.String getTag(java.lang.String key)

Get tag by key.

keyRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • Type: java.lang.Object

hasFlag
public java.lang.Boolean hasFlag(FlagEnum flag)

Indicates if entity has a given flag.

flagRequired

hasMetadata
public java.lang.Boolean hasMetadata(java.lang.String metadataType, java.lang.Object data)

Indicates if entity has matching metadata entry.

metadataTypeRequired
  • Type: java.lang.String

dataRequired
  • 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.

keyRequired
  • Type: java.lang.String

valueOptional
  • 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.

strictOptional
  • Type: java.lang.Boolean

setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.Object

setTag
public void setTag(java.lang.String key, java.lang.String value)

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: java.lang.String

valueRequired
  • Type: java.lang.String

addChild
public void addChild(Node node)

Add child node.

nodeRequired

public void addLink(Edge edge)

Add link to another node.

edgeRequired

public void addReverseLink(Edge edge)

Add link from another node.

edgeRequired

doesDependOn
public java.lang.Boolean doesDependOn(Node node)

Indicates if this node depends on another node.

nodeRequired

doesReference
public java.lang.Boolean doesReference(Node node)

Indicates if this node references another node.

nodeRequired

find
public Node find(INodePredicate predicate)

Recursively find the nearest sub-node matching predicate.

predicateRequired

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.

optionsOptional

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.

optionsOptional

findAncestor
public Node findAncestor(INodePredicate predicate)
public Node findAncestor(INodePredicate predicate, java.lang.Number max)

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • 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.

idRequired
  • Type: java.lang.String

public Edge findLink(IEdgePredicate predicate)
public Edge findLink(IEdgePredicate predicate, java.lang.Boolean reverse)
public Edge findLink(IEdgePredicate predicate, java.