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 aws.pdk.cdk_graph

aws.pdk.cdk_graph.CdkGraph(
  root: Construct,
  plugins: typing.List[ICdkGraphPlugin] = None
)
Name Type Description
root constructs.Construct No description.
plugins typing.List[ICdkGraphPlugin] List of plugins to extends the graph.

rootRequired
  • Type: constructs.Construct

pluginsOptional

List of plugins to extends the graph.

Plugins are invoked at each phases in fifo order.


Methods

Name Description
to_string 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.

to_string
def to_string() -> str

Returns a string representation of this construct.

report
def report() -> None

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
is_construct Checks if x is a construct.

is_construct
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.CdkGraph.is_construct(
  x: typing.Any
)

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: typing.Any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
config typing.Mapping[typing.Any] Config.
plugins typing.List[ICdkGraphPlugin] List of plugins registered with this instance.
root constructs.Construct No description.
graph_context CdkGraphContext Get the context for the graph instance.

nodeRequired
node: Node
  • Type: constructs.Node

The tree node.


configRequired
config: typing.Mapping[typing.Any]
  • Type: typing.Mapping[typing.Any]

Config.


pluginsRequired
plugins: typing.List[ICdkGraphPlugin]

List of plugins registered with this instance.


rootRequired
root: Construct
  • Type: constructs.Construct

graph_contextOptional
graph_context: CdkGraphContext

Get the context for the graph instance.

This will be undefined before construct synthesis has initiated.


Constants

Name Type Description
ID str Fixed CdkGraph construct id.
VERSION str Current CdkGraph semantic version.

IDRequired
ID: str
  • Type: str

Fixed CdkGraph construct id.


VERSIONRequired
VERSION: str
  • Type: str

Current CdkGraph semantic version.


Structs

CdkGraphArtifact

CdkGraph artifact definition.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.CdkGraphArtifact(
  filename: str,
  filepath: str,
  id: str,
  source: str,
  description: str = None
)

Properties

Name Type Description
filename str Filename of the artifact.
filepath str Full path where artifact is stored.
id str The unique type of the artifact.
source str The source of the artifact (such as plugin, or core system, etc).
description str Description of artifact.

filenameRequired
filename: str
  • Type: str

Filename of the artifact.


filepathRequired
filepath: str
  • Type: str

Full path where artifact is stored.


idRequired
id: str
  • Type: str

The unique type of the artifact.


sourceRequired
source: str
  • Type: str

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


descriptionOptional
description: str
  • Type: str

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 aws.pdk.cdk_graph

aws.pdk.cdk_graph.ConstructInfo(
  fqn: str,
  version: str
)

Properties

Name Type Description
fqn str No description.
version str No description.

fqnRequired
fqn: str
  • Type: str

versionRequired
version: str
  • Type: str

FilterValue

Filter value to use.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.FilterValue(
  regex: str = None,
  value: str = None
)

Properties

Name Type Description
regex str String representation of a regex.
value str Raw value.

regexOptional
regex: str
  • Type: str

String representation of a regex.


valueOptional
value: str
  • Type: str

Raw value.


ICdkGraphProps

{@link CdkGraph} props.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ICdkGraphProps(
  plugins: typing.List[ICdkGraphPlugin] = None
)

Properties

Name Type Description
plugins typing.List[ICdkGraphPlugin] List of plugins to extends the graph.

pluginsOptional
plugins: typing.List[ICdkGraphPlugin]

List of plugins to extends the graph.

Plugins are invoked at each phases in fifo order.


IFilter

A filter than can be applied to the graph.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.IFilter(
  graph: IGraphFilter = None,
  store: IGraphStoreFilter = None
)

Properties

Name Type Description
graph IGraphFilter Graph Filter.
store IGraphStoreFilter Store Filter.

graphOptional
graph: IGraphFilter

Graph Filter.


storeOptional
store: IGraphStoreFilter

Store Filter.


IGraphFilter

Graph filter.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.IGraphFilter(
  all_nodes: bool = None,
  edge: IEdgePredicate = None,
  inverse: bool = None,
  node: INodePredicate = None,
  strategy: FilterStrategy = None
)

Properties

Name Type Description
all_nodes bool Indicates that all nodes will be filtered, rather than just Resource and CfnResource nodes.
edge IEdgePredicate Predicate to match edges.
inverse bool 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.

all_nodesOptional
all_nodes: bool
  • Type: bool

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
edge: IEdgePredicate

Predicate to match edges.

Edges are evaluated after nodes are filtered.


inverseOptional
inverse: bool
  • Type: bool
  • 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
node: INodePredicate

Predicate to match nodes.


strategyOptional
strategy: FilterStrategy

Filter strategy to apply to matching nodes.

Edges do not have a strategy, they are always pruned.


IGraphFilterPlan

Graph filter plan.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.IGraphFilterPlan(
  all_nodes: bool = None,
  filters: typing.List[IFilter] = None,
  focus: IGraphFilterPlanFocusConfig = None,
  order: ConstructOrder = None,
  preset: FilterPreset = None
)

Properties

Name Type Description
all_nodes bool Indicates that all nodes will be filtered, rather than just Resource and CfnResource nodes.
filters typing.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 constructs.ConstructOrder The order to visit nodes and edges during filtering.
preset FilterPreset Optional preset filter to apply before other filters.

all_nodesOptional
all_nodes: bool
  • Type: bool
  • 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
filters: typing.List[IFilter]

Ordered list of {@link IGraphFilter} and {@link IGraphStoreFilter} filters to apply to the store.

  • Filters are applied after the preset filtering is applied if present.
  • Filters are applied sequentially against all nodes, as opposed to IAspect.visitor pattern which are sequentially applied per node.

focusOptional
focus: IGraphFilterPlanFocusConfig

Config to focus the graph on specific node.


orderOptional
order: ConstructOrder
  • Type: constructs.ConstructOrder
  • Default: {ConstructOrder.PREORDER}

The order to visit nodes and edges during filtering.


presetOptional
preset: FilterPreset

Optional preset filter to apply before other filters.


IGraphFilterPlanFocusConfig

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.IGraphFilterPlanFocusConfig(
  filter: IFilterFocusCallback,
  no_hoist: bool = None
)

Properties

Name Type Description
filter IFilterFocusCallback The node or resolver to determine the node to focus on.
no_hoist bool Indicates if ancestral containers are preserved (eg: Stages, Stack).

filterRequired
filter: IFilterFocusCallback

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


no_hoistOptional
no_hoist: bool
  • Type: bool
  • 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 aws.pdk.cdk_graph

aws.pdk.cdk_graph.InferredNodeProps(
  uuid: str,
  attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] = None,
  flags: typing.List[FlagEnum] = None,
  metadata: typing.List[MetadataEntry] = None,
  tags: typing.Mapping[str] = None,
  dependencies: typing.List[str],
  unresolved_references: typing.List[SGUnresolvedReference],
  cfn_type: str = None,
  construct_info: ConstructInfo = None,
  logical_id: str = None
)

Properties

Name Type Description
uuid str Universally unique identity.
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Serializable entity attributes.
flags typing.List[FlagEnum] Serializable entity flags.
metadata typing.List[constructs.MetadataEntry] Serializable entity metadata.
tags typing.Mapping[str] Serializable entity tags.
dependencies typing.List[str] No description.
unresolved_references typing.List[SGUnresolvedReference] No description.
cfn_type str No description.
construct_info ConstructInfo No description.
logical_id str No description.

uuidRequired
uuid: str
  • Type: str

Universally unique identity.


attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Serializable entity attributes.

{@link Attributes }


flagsOptional
flags: typing.List[FlagEnum]

Serializable entity flags.

{@link FlagEnum }


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Serializable entity metadata.

{@link Metadata }


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Serializable entity tags.

{@link Tags }


dependenciesRequired
dependencies: typing.List[str]
  • Type: typing.List[str]

unresolved_referencesRequired
unresolved_references: typing.List[SGUnresolvedReference]

cfn_typeOptional
cfn_type: str
  • Type: str

construct_infoOptional
construct_info: ConstructInfo

logical_idOptional
logical_id: str
  • Type: str

PlainObject

Serializable plain object value (JSII supported).

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.PlainObject()

SGEdge

Serializable graph edge entity.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.SGEdge(
  uuid: str,
  attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] = None,
  flags: typing.List[FlagEnum] = None,
  metadata: typing.List[MetadataEntry] = None,
  tags: typing.Mapping[str] = None,
  direction: EdgeDirectionEnum,
  edge_type: EdgeTypeEnum,
  source: str,
  target: str
)

Properties

Name Type Description
uuid str Universally unique identity.
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Serializable entity attributes.
flags typing.List[FlagEnum] Serializable entity flags.
metadata typing.List[constructs.MetadataEntry] Serializable entity metadata.
tags typing.Mapping[str] Serializable entity tags.
direction EdgeDirectionEnum Indicates the direction in which the edge is directed.
edge_type EdgeTypeEnum Type of edge.
source str UUID of edge source node (tail).
target str UUID of edge target node (head).

uuidRequired
uuid: str
  • Type: str

Universally unique identity.


attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Serializable entity attributes.

{@link Attributes }


flagsOptional
flags: typing.List[FlagEnum]

Serializable entity flags.

{@link FlagEnum }


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Serializable entity metadata.

{@link Metadata }


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Serializable entity tags.

{@link Tags }


directionRequired
direction: EdgeDirectionEnum

Indicates the direction in which the edge is directed.


edge_typeRequired
edge_type: EdgeTypeEnum

Type of edge.


sourceRequired
source: str
  • Type: str

UUID of edge source node (tail).


targetRequired
target: str
  • Type: str

UUID of edge target node (head).


SGEntity

Serializable graph entity.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.SGEntity(
  uuid: str,
  attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] = None,
  flags: typing.List[FlagEnum] = None,
  metadata: typing.List[MetadataEntry] = None,
  tags: typing.Mapping[str] = None
)

Properties

Name Type Description
uuid str Universally unique identity.
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Serializable entity attributes.
flags typing.List[FlagEnum] Serializable entity flags.
metadata typing.List[constructs.MetadataEntry] Serializable entity metadata.
tags typing.Mapping[str] Serializable entity tags.

uuidRequired
uuid: str
  • Type: str

Universally unique identity.


attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Serializable entity attributes.

{@link Attributes }


flagsOptional
flags: typing.List[FlagEnum]

Serializable entity flags.

{@link FlagEnum }


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Serializable entity metadata.

{@link Metadata }


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Serializable entity tags.

{@link Tags }


SGGraphStore

Serializable graph store.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.SGGraphStore(
  edges: typing.List[SGEdge],
  tree: SGNode,
  version: str
)

Properties

Name Type Description
edges typing.List[SGEdge] List of edges.
tree SGNode Node tree.
version str Store version.

edgesRequired
edges: typing.List[SGEdge]

List of edges.


treeRequired
tree: SGNode

Node tree.


versionRequired
version: str
  • Type: str

Store version.


SGNode

Serializable graph node entity.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.SGNode(
  uuid: str,
  attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] = None,
  flags: typing.List[FlagEnum] = None,
  metadata: typing.List[MetadataEntry] = None,
  tags: typing.Mapping[str] = None,
  id: str,
  node_type: NodeTypeEnum,
  path: str,
  cfn_type: str = None,
  children: typing.Mapping[SGNode] = None,
  construct_info: ConstructInfo = None,
  edges: typing.List[str] = None,
  logical_id: str = None,
  parent: str = None,
  stack: str = None
)

Properties

Name Type Description
uuid str Universally unique identity.
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Serializable entity attributes.
flags typing.List[FlagEnum] Serializable entity flags.
metadata typing.List[constructs.MetadataEntry] Serializable entity metadata.
tags typing.Mapping[str] Serializable entity tags.
id str Node id within parent (unique only between parent child nodes).
node_type NodeTypeEnum Node type.
path str Node path.
cfn_type str CloudFormation resource type for this node.
children typing.Mapping[SGNode] Child node record.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
edges typing.List[str] List of edge UUIDs where this node is the source.
logical_id str Logical id of the node, which is only unique within containing stack.
parent str UUID of node parent.
stack str UUID of node stack.

uuidRequired
uuid: str
  • Type: str

Universally unique identity.


attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Serializable entity attributes.

{@link Attributes }


flagsOptional
flags: typing.List[FlagEnum]

Serializable entity flags.

{@link FlagEnum }


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Serializable entity metadata.

{@link Metadata }


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Serializable entity tags.

{@link Tags }


idRequired
id: str
  • Type: str

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


node_typeRequired
node_type: NodeTypeEnum

Node type.


pathRequired
path: str
  • Type: str

Node path.


cfn_typeOptional
cfn_type: str
  • Type: str

CloudFormation resource type for this node.


childrenOptional
children: typing.Mapping[SGNode]
  • Type: typing.Mapping[SGNode]

Child node record.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


edgesOptional
edges: typing.List[str]
  • Type: typing.List[str]

List of edge UUIDs where this node is the source.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: str
  • Type: str

UUID of node parent.


stackOptional
stack: str
  • Type: str

UUID of node stack.


SGUnresolvedReference

Unresolved reference struct.

During graph computation references are unresolved and stored in this struct.

Initializer

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.SGUnresolvedReference(
  reference_type: ReferenceTypeEnum,
  source: str,
  target: str,
  value: typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]] = None
)

Properties

Name Type Description
reference_type ReferenceTypeEnum No description.
source str No description.
target str No description.
value typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]] No description.

reference_typeRequired
reference_type: ReferenceTypeEnum

sourceRequired
source: str
  • Type: str

targetRequired
target: str
  • Type: str

valueOptional
value: typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]
  • Type: typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Classes

AppNode

AppNode defines a cdk App.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.AppNode(
  props: IAppNodeProps
)
Name Type Description
props IAppNodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

Indicates that this node must not have references.


set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

Static Functions

Name Description
is_app_node Indicates if node is a {@link AppNode}.

is_app_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.AppNode.is_app_node(
  node: Node
)

Indicates if node is a {@link AppNode}.

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


Constants

Name Type Description
PATH str Fixed path of the App.
UUID str Fixed UUID for App node.

PATHRequired
PATH: str
  • Type: str

Fixed path of the App.


UUIDRequired
UUID: str
  • Type: str

Fixed UUID for App node.


AttributeReference

Attribute type reference edge.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.AttributeReference(
  props: IAttributeReferenceProps
)
Name Type Description
props IAttributeReferenceProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroy the edge.
set_attribute Set attribute.
set_tag Set tag.
is_equivalent Indicates if this edge is equivalent to another edge.
mutate_consume Merge an equivalent edge's data into this edge and destroy the other edge.
mutate_direction Change the edge direction.
mutate_source Change the edge source.
mutate_target Change the edge target.
to_string Get string representation of this edge.
resolve_chain Resolve reference chain.
resolve_targets Resolve targets by following potential edge chain.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  _strict: bool = None
) -> None

Destroy the edge.

Remove all references and remove from store.

_strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

is_equivalent
def is_equivalent(
  edge: Edge
) -> bool

Indicates if this edge is equivalent to another edge.

Edges are considered equivalent if they share same type, source, and target.

edgeRequired

mutate_consume
def mutate_consume(
  edge: Edge
) -> None

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.


mutate_direction
def mutate_direction(
  direction: EdgeDirectionEnum
) -> None

Change the edge direction.

directionRequired

mutate_source
def mutate_source(
  node: Node
) -> None

Change the edge source.

nodeRequired

mutate_target
def mutate_target(
  node: Node
) -> None

Change the edge target.

nodeRequired

to_string
def to_string() -> str

Get string representation of this edge.

resolve_chain
def resolve_chain() -> typing.List[typing.Any]

Resolve reference chain.

resolve_targets
def resolve_targets() -> typing.List[Node]

Resolve targets by following potential edge chain.

{@link EdgeChain }

Static Functions

Name Description
find_all_in_chain Find all matching edges based on predicate within an EdgeChain.
find_in_chain Find first edge matching predicate within an EdgeChain.
is_ref Indicates if edge is a Ref based {@link Reference} edge.
is_reference Indicates if edge is a {@link Reference}.
is_att Indicates if edge in an Fn::GetAtt {@link Reference}.

find_all_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.AttributeReference.find_all_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find all matching edges based on predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

find_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.AttributeReference.find_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find first edge matching predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

is_ref
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.AttributeReference.is_ref(
  edge: Edge
)

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

edgeRequired

is_reference
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.AttributeReference.is_reference(
  edge: Edge
)

Indicates if edge is a {@link Reference}.

edgeRequired

is_att
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.AttributeReference.is_att(
  edge: Edge
)

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

edgeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if edge allows destructive mutations.
direction EdgeDirectionEnum Indicates the direction in which the edge is directed.
edge_type EdgeTypeEnum Type of edge.
is_closed bool Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
is_cross_stack bool Indicates if source and target nodes reside in different root stacks.
is_extraneous bool 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).
reference_type ReferenceTypeEnum Get type of reference.
value str Get the resolved attribute value.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if edge allows destructive mutations.


directionRequired
direction: EdgeDirectionEnum

Indicates the direction in which the edge is directed.


edge_typeRequired
edge_type: EdgeTypeEnum

Type of edge.


is_closedRequired
is_closed: bool
  • Type: bool

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.


is_cross_stackRequired
is_cross_stack: bool
  • Type: bool

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


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).


sourceRequired
source: Node

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


targetRequired
target: Node

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


reference_typeRequired
reference_type: ReferenceTypeEnum

Get type of reference.


valueRequired
value: str
  • Type: str

Get the resolved attribute value.


Constants

Name Type Description
ATT_TYPE str Attribute defining the type of reference.
PREFIX str Edge prefix to denote Fn::GetAtt type reference edge.
ATT_VALUE str Attribute key for resolved value of attribute reference.

ATT_TYPERequired
ATT_TYPE: str
  • Type: str

Attribute defining the type of reference.


PREFIXRequired
PREFIX: str
  • Type: str

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


ATT_VALUERequired
ATT_VALUE: str
  • Type: str

Attribute key for resolved value of attribute reference.


BaseEntity

Base class for all store entities (Node and Edges).

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.BaseEntity(
  props: IBaseEntityProps
)
Name Type Description
props IBaseEntityProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroy the entity be removing all references and removing from store.
set_attribute Set attribute.
set_tag Set tag.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroy the entity be removing all references and removing from store.

strictOptional
  • Type: bool

If strict, then entity must not have any references remaining when attempting to destroy.


set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


CdkGraphContext

CdkGraph context.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.CdkGraphContext(
  store: Store,
  outdir: str
)
Name Type Description
store Store No description.
outdir str No description.

storeRequired

outdirRequired
  • Type: str

Methods

Name Description
get_artifact Get CdkGraph artifact by id.
has_artifact_file Indicates if context has an artifact with filename defined.
log_artifact Logs an artifact entry.
write_artifact Writes artifact data to outdir and logs the entry.

get_artifact
def get_artifact(
  id: str
) -> CdkGraphArtifact

Get CdkGraph artifact by id.

idRequired
  • Type: str

has_artifact_file
def has_artifact_file(
  filename: str
) -> bool

Indicates if context has an artifact with filename defined.

filenameRequired
  • Type: str

log_artifact
def log_artifact(
  source: typing.Union[CdkGraph, ICdkGraphPlugin],
  id: str,
  filepath: str,
  description: str = None
) -> CdkGraphArtifact

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: str

Unique id of the artifact.


filepathRequired
  • Type: str

Full path where the artifact is stored.


descriptionOptional
  • Type: str

Description of the artifact.


write_artifact
def write_artifact(
  source: typing.Union[CdkGraph, ICdkGraphPlugin],
  id: str,
  filename: str,
  data: str,
  description: str = None
) -> CdkGraphArtifact

Writes artifact data to outdir and logs the entry.

sourceRequired

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


idRequired
  • Type: str

Unique id of the artifact.


filenameRequired
  • Type: str

Relative name of the file.


dataRequired
  • Type: str

descriptionOptional
  • Type: str

Description of the artifact.


Properties

Name Type Description
artifacts typing.Mapping[CdkGraphArtifact] Get record of all graph artifacts keyed by artifact id.
graph_json CdkGraphArtifact Get CdkGraph core graph.json artifact.
outdir str No description.
store Store No description.

artifactsRequired
artifacts: typing.Mapping[CdkGraphArtifact]

Get record of all graph artifacts keyed by artifact id.


graph_jsonRequired
graph_json: CdkGraphArtifact

Get CdkGraph core graph.json artifact.


outdirRequired
outdir: str
  • Type: str

storeRequired
store: Store

CfnResourceNode

CfnResourceNode defines an L1 cdk resource.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.CfnResourceNode(
  props: ICfnResourceNodeProps
)
Name Type Description
props ICfnResourceNodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.
is_equivalent_fqn Evaluates if CfnResourceNode fqn is equivalent to ResourceNode fqn.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

is_equivalent_fqn
def is_equivalent_fqn(
  resource: ResourceNode
) -> bool

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
is_cfn_resource_node Indicates if a node is a {@link CfnResourceNode}.

is_cfn_resource_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.CfnResourceNode.is_cfn_resource_node(
  node: Node
)

Indicates if a node is a {@link CfnResourceNode}.

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.
is_import bool 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
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


is_importRequired
is_import: bool
  • Type: bool

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


resourceOptional
resource: ResourceNode

Reference to the L2 Resource that wraps this L1 CfnResource if it is wrapped.


Constants

Name Type Description
ATT_IMPORT_ARN_TOKEN str Normalized CfnReference attribute.

ATT_IMPORT_ARN_TOKENRequired
ATT_IMPORT_ARN_TOKEN: str
  • Type: str

Normalized CfnReference attribute.


Dependency

Dependency edge class defines CloudFormation dependency between resources.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Dependency(
  props: ITypedEdgeProps
)
Name Type Description
props ITypedEdgeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroy the edge.
set_attribute Set attribute.
set_tag Set tag.
is_equivalent Indicates if this edge is equivalent to another edge.
mutate_consume Merge an equivalent edge's data into this edge and destroy the other edge.
mutate_direction Change the edge direction.
mutate_source Change the edge source.
mutate_target Change the edge target.
to_string Get string representation of this edge.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  _strict: bool = None
) -> None

Destroy the edge.

Remove all references and remove from store.

_strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

is_equivalent
def is_equivalent(
  edge: Edge
) -> bool

Indicates if this edge is equivalent to another edge.

Edges are considered equivalent if they share same type, source, and target.

edgeRequired

mutate_consume
def mutate_consume(
  edge: Edge
) -> None

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.


mutate_direction
def mutate_direction(
  direction: EdgeDirectionEnum
) -> None

Change the edge direction.

directionRequired

mutate_source
def mutate_source(
  node: Node
) -> None

Change the edge source.

nodeRequired

mutate_target
def mutate_target(
  node: Node
) -> None

Change the edge target.

nodeRequired

to_string
def to_string() -> str

Get string representation of this edge.

Static Functions

Name Description
find_all_in_chain Find all matching edges based on predicate within an EdgeChain.
find_in_chain Find first edge matching predicate within an EdgeChain.
is_dependency Indicates if given edge is a {@link Dependency} edge.

find_all_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Dependency.find_all_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find all matching edges based on predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

find_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Dependency.find_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find first edge matching predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

is_dependency
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Dependency.is_dependency(
  edge: Edge
)

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

edgeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if edge allows destructive mutations.
direction EdgeDirectionEnum Indicates the direction in which the edge is directed.
edge_type EdgeTypeEnum Type of edge.
is_closed bool Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
is_cross_stack bool Indicates if source and target nodes reside in different root stacks.
is_extraneous bool 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
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if edge allows destructive mutations.


directionRequired
direction: EdgeDirectionEnum

Indicates the direction in which the edge is directed.


edge_typeRequired
edge_type: EdgeTypeEnum

Type of edge.


is_closedRequired
is_closed: bool
  • Type: bool

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.


is_cross_stackRequired
is_cross_stack: bool
  • Type: bool

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


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).


sourceRequired
source: Node

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


targetRequired
target: Node

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


Constants

Name Type Description
PREFIX str Edge prefix to denote dependency edge.

PREFIXRequired
PREFIX: str
  • Type: str

Edge prefix to denote dependency edge.


Edge

Edge class defines a link (relationship) between nodes, as in standard graph theory.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Edge(
  props: IEdgeProps
)
Name Type Description
props IEdgeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroy the edge.
set_attribute Set attribute.
set_tag Set tag.
is_equivalent Indicates if this edge is equivalent to another edge.
mutate_consume Merge an equivalent edge's data into this edge and destroy the other edge.
mutate_direction Change the edge direction.
mutate_source Change the edge source.
mutate_target Change the edge target.
to_string Get string representation of this edge.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  _strict: bool = None
) -> None

Destroy the edge.

Remove all references and remove from store.

_strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

is_equivalent
def is_equivalent(
  edge: Edge
) -> bool

Indicates if this edge is equivalent to another edge.

Edges are considered equivalent if they share same type, source, and target.

edgeRequired

mutate_consume
def mutate_consume(
  edge: Edge
) -> None

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.


mutate_direction
def mutate_direction(
  direction: EdgeDirectionEnum
) -> None

Change the edge direction.

directionRequired

mutate_source
def mutate_source(
  node: Node
) -> None

Change the edge source.

nodeRequired

mutate_target
def mutate_target(
  node: Node
) -> None

Change the edge target.

nodeRequired

to_string
def to_string() -> str

Get string representation of this edge.

Static Functions

Name Description
find_all_in_chain Find all matching edges based on predicate within an EdgeChain.
find_in_chain Find first edge matching predicate within an EdgeChain.

find_all_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Edge.find_all_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find all matching edges based on predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

find_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Edge.find_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find first edge matching predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if edge allows destructive mutations.
direction EdgeDirectionEnum Indicates the direction in which the edge is directed.
edge_type EdgeTypeEnum Type of edge.
is_closed bool Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
is_cross_stack bool Indicates if source and target nodes reside in different root stacks.
is_extraneous bool 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
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if edge allows destructive mutations.


directionRequired
direction: EdgeDirectionEnum

Indicates the direction in which the edge is directed.


edge_typeRequired
edge_type: EdgeTypeEnum

Type of edge.


is_closedRequired
is_closed: bool
  • Type: bool

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.


is_cross_stackRequired
is_cross_stack: bool
  • Type: bool

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


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).


sourceRequired
source: Node

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


targetRequired
target: Node

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


Filters

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters()
Name Type Description

Static Functions

Name Description
collapse_cdk_owned_resources Collapses all Cdk Owned containers, which more closely mirrors the application code by removing resources that are automatically created by cdk.
collapse_cdk_wrappers Collapses all Cdk Resource wrappers that wrap directly wrap a CfnResource.
collapse_custom_resources Collapses Custom Resource nodes to a single node.
compact Collapses extraneous nodes to parent and cdk created nodes on themselves, and prunes extraneous edges.
exclude_cfn_type Prune all {@link Graph.ResourceNode} and {@link Graph.CfnResourceNode} nodes matching specified list of CloudFormation types.
exclude_node_type Prune all {@link Graph.Node}s matching specified list.
include_cfn_type Prune all {@link Graph.ResourceNode} and {@link Graph.CfnResourceNode} nodes except those matching specified list of CloudFormation types.
include_node_type Prune all {@link Graph.Node}s except those matching specified list.
prune_custom_resources Prune Custom Resource nodes.
prune_empty_containers Prune empty containers, which are non-resource default nodes without any children.
prune_extraneous 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.
verify_filterable Verify that store is filterable, meaning it allows destructive mutations.

collapse_cdk_owned_resources
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.collapse_cdk_owned_resources()

Collapses all Cdk Owned containers, which more closely mirrors the application code by removing resources that are automatically created by cdk.

collapse_cdk_wrappers
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.collapse_cdk_wrappers()

Collapses all Cdk Resource wrappers that wrap directly wrap a CfnResource.

Example, s3.Bucket wraps s3.CfnBucket.

collapse_custom_resources
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.collapse_custom_resources()

Collapses Custom Resource nodes to a single node.

compact
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.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);
exclude_cfn_type
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.exclude_cfn_type(
  cfn_types: typing.List[FilterValue]
)

Prune all {@link Graph.ResourceNode} and {@link Graph.CfnResourceNode} nodes matching specified list of CloudFormation types.

cfn_typesRequired

exclude_node_type
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.exclude_node_type(
  node_types: typing.List[FilterValue]
)

Prune all {@link Graph.Node}s matching specified list.

This filter targets all nodes (except root) - {@link IGraphFilter.allNodes}

node_typesRequired

include_cfn_type
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.include_cfn_type(
  cfn_types: typing.List[FilterValue]
)

Prune all {@link Graph.ResourceNode} and {@link Graph.CfnResourceNode} nodes except those matching specified list of CloudFormation types.

cfn_typesRequired

include_node_type
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.include_node_type(
  node_types: typing.List[FilterValue]
)

Prune all {@link Graph.Node}s except those matching specified list.

This filter targets all nodes (except root) - {@link IGraphFilter.allNodes}

node_typesRequired

prune_custom_resources
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.prune_custom_resources()

Prune Custom Resource nodes.

prune_empty_containers
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.prune_empty_containers()

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.

prune_extraneous
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.prune_extraneous()

Prune extraneous nodes and edges.

uncluster
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.uncluster(
  cluster_types: typing.List[NodeTypeEnum] = None
)

Remove clusters by hoisting their children to the parent of the cluster and collapsing the cluster itself to its parent.

{@link Graph.Node.mutateUncluster }

cluster_typesOptional

verify_filterable
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Filters.verify_filterable(
  store: Store
)

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

storeRequired

ImportReference

Import reference defines Fn::ImportValue type reference edge.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ImportReference(
  props: ITypedEdgeProps
)
Name Type Description
props ITypedEdgeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroy the edge.
set_attribute Set attribute.
set_tag Set tag.
is_equivalent Indicates if this edge is equivalent to another edge.
mutate_consume Merge an equivalent edge's data into this edge and destroy the other edge.
mutate_direction Change the edge direction.
mutate_source Change the edge source.
mutate_target Change the edge target.
to_string Get string representation of this edge.
resolve_chain Resolve reference chain.
resolve_targets Resolve targets by following potential edge chain.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  _strict: bool = None
) -> None

Destroy the edge.

Remove all references and remove from store.

_strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

is_equivalent
def is_equivalent(
  edge: Edge
) -> bool

Indicates if this edge is equivalent to another edge.

Edges are considered equivalent if they share same type, source, and target.

edgeRequired

mutate_consume
def mutate_consume(
  edge: Edge
) -> None

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.


mutate_direction
def mutate_direction(
  direction: EdgeDirectionEnum
) -> None

Change the edge direction.

directionRequired

mutate_source
def mutate_source(
  node: Node
) -> None

Change the edge source.

nodeRequired

mutate_target
def mutate_target(
  node: Node
) -> None

Change the edge target.

nodeRequired

to_string
def to_string() -> str

Get string representation of this edge.

resolve_chain
def resolve_chain() -> typing.List[typing.Any]

Resolve reference chain.

resolve_targets
def resolve_targets() -> typing.List[Node]

Resolve targets by following potential edge chain.

{@link EdgeChain }

Static Functions

Name Description
find_all_in_chain Find all matching edges based on predicate within an EdgeChain.
find_in_chain Find first edge matching predicate within an EdgeChain.
is_ref Indicates if edge is a Ref based {@link Reference} edge.
is_reference Indicates if edge is a {@link Reference}.
is_import Indicates if edge is Fn::ImportValue based {@link Reference}.

find_all_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ImportReference.find_all_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find all matching edges based on predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

find_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ImportReference.find_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find first edge matching predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

is_ref
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ImportReference.is_ref(
  edge: Edge
)

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

edgeRequired

is_reference
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ImportReference.is_reference(
  edge: Edge
)

Indicates if edge is a {@link Reference}.

edgeRequired

is_import
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ImportReference.is_import(
  edge: Edge
)

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

edgeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if edge allows destructive mutations.
direction EdgeDirectionEnum Indicates the direction in which the edge is directed.
edge_type EdgeTypeEnum Type of edge.
is_closed bool Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
is_cross_stack bool Indicates if source and target nodes reside in different root stacks.
is_extraneous bool 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).
reference_type ReferenceTypeEnum Get type of reference.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if edge allows destructive mutations.


directionRequired
direction: EdgeDirectionEnum

Indicates the direction in which the edge is directed.


edge_typeRequired
edge_type: EdgeTypeEnum

Type of edge.


is_closedRequired
is_closed: bool
  • Type: bool

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.


is_cross_stackRequired
is_cross_stack: bool
  • Type: bool

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


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).


sourceRequired
source: Node

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


targetRequired
target: Node

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


reference_typeRequired
reference_type: ReferenceTypeEnum

Get type of reference.


Constants

Name Type Description
ATT_TYPE str Attribute defining the type of reference.
PREFIX str Edge prefix to denote Fn::ImportValue type reference edge.

ATT_TYPERequired
ATT_TYPE: str
  • Type: str

Attribute defining the type of reference.


PREFIXRequired
PREFIX: str
  • Type: str

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


NestedStackNode

NestedStackNode defines a cdk NestedStack.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.NestedStackNode(
  props: INestedStackNodeProps
)
Name Type Description
props INestedStackNodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.
add_output Associate {@link OutputNode} with this stack.
add_parameter Associate {@link ParameterNode} with this stack.
find_output Find {@link OutputNode} with logicalId defined by this stack.
find_parameter Find {@link ParameterNode} with parameterId defined by this stack.
mutate_remove_output Disassociate {@link OutputNode} from this stack.
mutate_remove_parameter Disassociate {@link ParameterNode} from this stack.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

add_output
def add_output(
  node: OutputNode
) -> None

Associate {@link OutputNode} with this stack.

nodeRequired

add_parameter
def add_parameter(
  node: ParameterNode
) -> None

Associate {@link ParameterNode} with this stack.

nodeRequired

find_output
def find_output(
  logical_id: str
) -> OutputNode

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

logical_idRequired
  • Type: str

find_parameter
def find_parameter(
  parameter_id: str
) -> ParameterNode

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

parameter_idRequired
  • Type: str

mutate_remove_output
def mutate_remove_output(
  node: OutputNode
) -> bool

Disassociate {@link OutputNode} from this stack.

nodeRequired

mutate_remove_parameter
def mutate_remove_parameter(
  node: ParameterNode
) -> bool

Disassociate {@link ParameterNode} from this stack.

nodeRequired

Static Functions

Name Description
is_stack_node Indicates if node is a {@link StackNode}.
of Gets the {@link StackNode} containing a given resource.
is_nested_stack_node Indicates if node is a {@link NestedStackNode}.

is_stack_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.NestedStackNode.is_stack_node(
  node: Node
)

Indicates if node is a {@link StackNode}.

nodeRequired

of
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.NestedStackNode.of(
  node: Node
)

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

nodeRequired

is_nested_stack_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.NestedStackNode.is_nested_stack_node(
  node: Node
)

Indicates if node is a {@link NestedStackNode}.

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.
exports typing.List[OutputNode] Get all exported {@link OutputNode}s defined by this stack.
outputs typing.List[OutputNode] Get all {@link OutputNode}s defined by this stack.
parameters typing.List[ParameterNode] Get all {@link ParameterNode}s defined by this stack.
stage StageNode Get {@link StageNode} containing this stack.
parent_stack StackNode Get parent stack of this nested stack.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


exportsRequired
exports: typing.List[OutputNode]

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


outputsRequired
outputs: typing.List[OutputNode]

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


parametersRequired
parameters: typing.List[ParameterNode]

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


stageOptional
stage: StageNode

Get {@link StageNode} containing this stack.


parent_stackOptional
parent_stack: StackNode

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 aws.pdk.cdk_graph

aws.pdk.cdk_graph.Node(
  props: INodeProps
)
Name Type Description
props INodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

Indicates that this node must not have references.


set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


OutputNode

OutputNode defines a cdk CfnOutput resources.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.OutputNode(
  props: IOutputNodeProps
)
Name Type Description
props IOutputNodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

Static Functions

Name Description
is_output_node Indicates if node is an {@link OutputNode}.

is_output_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.OutputNode.is_output_node(
  node: Node
)

Indicates if node is an {@link OutputNode}.

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.
is_export bool Indicates if {@link OutputNode} is exported.
value typing.Any Get the value* attribute.
export_name str Get the export name attribute.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


is_exportRequired
is_export: bool
  • Type: bool

Indicates if {@link OutputNode} is exported.


valueRequired
value: typing.Any
  • Type: typing.Any

Get the value* attribute.


export_nameOptional
export_name: str
  • Type: str

Get the export name attribute.


Constants

Name Type Description
ATTR_EXPORT_NAME str Attribute key where output export name is stored.
ATTR_VALUE str Attribute key where output value is stored.

ATTR_EXPORT_NAMERequired
ATTR_EXPORT_NAME: str
  • Type: str

Attribute key where output export name is stored.


ATTR_VALUERequired
ATTR_VALUE: str
  • Type: str

Attribute key where output value is stored.


ParameterNode

ParameterNode defines a CfnParameter node.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ParameterNode(
  props: IParameterNodeProps
)
Name Type Description
props IParameterNodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

Static Functions

Name Description
is_parameter_node Indicates if node is a {@link ParameterNode}.

is_parameter_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ParameterNode.is_parameter_node(
  node: Node
)

Indicates if node is a {@link ParameterNode}.

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.
is_stack_reference bool Indicates if parameter is a reference to a stack.
parameter_type typing.Any Get the parameter type attribute.
value typing.Any Get the value attribute.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


is_stack_referenceRequired
is_stack_reference: bool
  • Type: bool

Indicates if parameter is a reference to a stack.


parameter_typeRequired
parameter_type: typing.Any
  • Type: typing.Any

Get the parameter type attribute.


valueRequired
value: typing.Any
  • Type: typing.Any

Get the value attribute.


Constants

Name Type Description
ATTR_TYPE str Attribute key where parameter type is stored.
ATTR_VALUE str Attribute key where parameter value is store.

ATTR_TYPERequired
ATTR_TYPE: str
  • Type: str

Attribute key where parameter type is stored.


ATTR_VALUERequired
ATTR_VALUE: str
  • Type: str

Attribute key where parameter value is store.


Reference

Reference edge class defines a directed relationship between nodes.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Reference(
  props: IReferenceProps
)
Name Type Description
props IReferenceProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroy the edge.
set_attribute Set attribute.
set_tag Set tag.
is_equivalent Indicates if this edge is equivalent to another edge.
mutate_consume Merge an equivalent edge's data into this edge and destroy the other edge.
mutate_direction Change the edge direction.
mutate_source Change the edge source.
mutate_target Change the edge target.
to_string Get string representation of this edge.
resolve_chain Resolve reference chain.
resolve_targets Resolve targets by following potential edge chain.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  _strict: bool = None
) -> None

Destroy the edge.

Remove all references and remove from store.

_strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

is_equivalent
def is_equivalent(
  edge: Edge
) -> bool

Indicates if this edge is equivalent to another edge.

Edges are considered equivalent if they share same type, source, and target.

edgeRequired

mutate_consume
def mutate_consume(
  edge: Edge
) -> None

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.


mutate_direction
def mutate_direction(
  direction: EdgeDirectionEnum
) -> None

Change the edge direction.

directionRequired

mutate_source
def mutate_source(
  node: Node
) -> None

Change the edge source.

nodeRequired

mutate_target
def mutate_target(
  node: Node
) -> None

Change the edge target.

nodeRequired

to_string
def to_string() -> str

Get string representation of this edge.

resolve_chain
def resolve_chain() -> typing.List[typing.Any]

Resolve reference chain.

resolve_targets
def resolve_targets() -> typing.List[Node]

Resolve targets by following potential edge chain.

{@link EdgeChain }

Static Functions

Name Description
find_all_in_chain Find all matching edges based on predicate within an EdgeChain.
find_in_chain Find first edge matching predicate within an EdgeChain.
is_ref Indicates if edge is a Ref based {@link Reference} edge.
is_reference Indicates if edge is a {@link Reference}.

find_all_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Reference.find_all_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find all matching edges based on predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

find_in_chain
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Reference.find_in_chain(
  chain: typing.List[typing.Any],
  predicate: IEdgePredicate
)

Find first edge matching predicate within an EdgeChain.

chainRequired
  • Type: typing.List[typing.Any]

predicateRequired

is_ref
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Reference.is_ref(
  edge: Edge
)

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

edgeRequired

is_reference
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Reference.is_reference(
  edge: Edge
)

Indicates if edge is a {@link Reference}.

edgeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if edge allows destructive mutations.
direction EdgeDirectionEnum Indicates the direction in which the edge is directed.
edge_type EdgeTypeEnum Type of edge.
is_closed bool Indicates if the Edge's source and target are the same, or were the same when it was created (prior to mutations).
is_cross_stack bool Indicates if source and target nodes reside in different root stacks.
is_extraneous bool 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).
reference_type ReferenceTypeEnum Get type of reference.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if edge allows destructive mutations.


directionRequired
direction: EdgeDirectionEnum

Indicates the direction in which the edge is directed.


edge_typeRequired
edge_type: EdgeTypeEnum

Type of edge.


is_closedRequired
is_closed: bool
  • Type: bool

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.


is_cross_stackRequired
is_cross_stack: bool
  • Type: bool

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


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if edge is extraneous which is determined by explicitly having EXTRANEOUS flag added and/or being a closed loop (source===target).


sourceRequired
source: Node

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


targetRequired
target: Node

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


reference_typeRequired
reference_type: ReferenceTypeEnum

Get type of reference.


Constants

Name Type Description
ATT_TYPE str Attribute defining the type of reference.
PREFIX str Edge prefix to denote Ref type reference edge.

ATT_TYPERequired
ATT_TYPE: str
  • Type: str

Attribute defining the type of reference.


PREFIXRequired
PREFIX: str
  • Type: str

Edge prefix to denote Ref type reference edge.


ResourceNode

ResourceNode class defines a L2 cdk resource construct.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ResourceNode(
  props: IResourceNodeProps
)
Name Type Description
props IResourceNodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.
mutate_cfn_resource Modifies the L1 resource wrapped by this L2 resource.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

Indicates that this node must not have references.


set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

mutate_cfn_resource
def mutate_cfn_resource(
  cfn_resource: CfnResourceNode = None
) -> None

Modifies the L1 resource wrapped by this L2 resource.

cfn_resourceOptional

Static Functions

Name Description
is_resource_node Indicates if node is a {@link ResourceNode}.

is_resource_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.ResourceNode.is_resource_node(
  node: Node
)

Indicates if node is a {@link ResourceNode}.

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Get the cfn properties from the L1 resource that this L2 resource wraps.
cfn_type str Get the CloudFormation resource type for this L2 resource or for the L1 resource is wraps.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.
is_cdk_owned bool Indicates if this resource is owned by cdk (defined in cdk library).
is_wrapper bool Indicates if Resource wraps a single CfnResource.
cfn_resource CfnResourceNode Get the default/primary CfnResource that this Resource wraps.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Get the cfn properties from the L1 resource that this L2 resource wraps.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this L2 resource or for the L1 resource is wraps.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


is_cdk_ownedRequired
is_cdk_owned: bool
  • Type: bool

Indicates if this resource is owned by cdk (defined in cdk library).


is_wrapperRequired
is_wrapper: bool
  • Type: bool

Indicates if Resource wraps a single CfnResource.


cfn_resourceOptional
cfn_resource: CfnResourceNode

Get the default/primary CfnResource that this Resource wraps.


Constants

Name Type Description
ATT_WRAPPED_CFN_PROPS str Attribute key for cfn properties.
ATT_WRAPPED_CFN_TYPE str Attribute key for cfn resource type.

ATT_WRAPPED_CFN_PROPSRequired
ATT_WRAPPED_CFN_PROPS: str
  • Type: str

Attribute key for cfn properties.


ATT_WRAPPED_CFN_TYPERequired
ATT_WRAPPED_CFN_TYPE: str
  • Type: str

Attribute key for cfn resource type.


RootNode

RootNode represents the root of the store tree.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.RootNode(
  store: Store
)
Name Type Description
store Store Reference to the store.

storeRequired

Reference to the store.


Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor > {@link RootNode} does not support this mutation.
mutate_collapse_to_parent Collapses this node into it's parent node > {@link RootNode} does not support this mutation.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  _strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

{@link RootNode} does not support this mutation

_strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate. The root not is excluded from list

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

{@link RootNode} does not support this mutation

mutate_collapse_to
def mutate_collapse_to(
  _ancestor: Node
) -> Node

Collapses this node into an ancestor > {@link RootNode} does not support this mutation.

_ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node > {@link RootNode} does not support this mutation.

mutate_hoist
def mutate_hoist(
  _newparent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

{@link RootNode} does not support this mutation

_newparentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

Static Functions

Name Description
is_root_node Indicates if node is a {@link RootNode}.

is_root_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.RootNode.is_root_node(
  node: Node
)

Indicates if node is a {@link RootNode}.

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


Constants

Name Type Description
PATH str Fixed path of root.
UUID str Fixed UUID of root.

PATHRequired
PATH: str
  • Type: str

Fixed path of root.


UUIDRequired
UUID: str
  • Type: str

Fixed UUID of root.


StackNode

StackNode defines a cdk Stack.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.StackNode(
  props: IStackNodeProps
)
Name Type Description
props IStackNodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.
add_output Associate {@link OutputNode} with this stack.
add_parameter Associate {@link ParameterNode} with this stack.
find_output Find {@link OutputNode} with logicalId defined by this stack.
find_parameter Find {@link ParameterNode} with parameterId defined by this stack.
mutate_remove_output Disassociate {@link OutputNode} from this stack.
mutate_remove_parameter Disassociate {@link ParameterNode} from this stack.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

add_output
def add_output(
  node: OutputNode
) -> None

Associate {@link OutputNode} with this stack.

nodeRequired

add_parameter
def add_parameter(
  node: ParameterNode
) -> None

Associate {@link ParameterNode} with this stack.

nodeRequired

find_output
def find_output(
  logical_id: str
) -> OutputNode

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

logical_idRequired
  • Type: str

find_parameter
def find_parameter(
  parameter_id: str
) -> ParameterNode

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

parameter_idRequired
  • Type: str

mutate_remove_output
def mutate_remove_output(
  node: OutputNode
) -> bool

Disassociate {@link OutputNode} from this stack.

nodeRequired

mutate_remove_parameter
def mutate_remove_parameter(
  node: ParameterNode
) -> bool

Disassociate {@link ParameterNode} from this stack.

nodeRequired

Static Functions

Name Description
is_stack_node Indicates if node is a {@link StackNode}.
of Gets the {@link StackNode} containing a given resource.

is_stack_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.StackNode.is_stack_node(
  node: Node
)

Indicates if node is a {@link StackNode}.

nodeRequired

of
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.StackNode.of(
  node: Node
)

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

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.
exports typing.List[OutputNode] Get all exported {@link OutputNode}s defined by this stack.
outputs typing.List[OutputNode] Get all {@link OutputNode}s defined by this stack.
parameters typing.List[ParameterNode] Get all {@link ParameterNode}s defined by this stack.
stage StageNode Get {@link StageNode} containing this stack.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


exportsRequired
exports: typing.List[OutputNode]

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


outputsRequired
outputs: typing.List[OutputNode]

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


parametersRequired
parameters: typing.List[ParameterNode]

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


stageOptional
stage: StageNode

Get {@link StageNode} containing this stack.


StageNode

StageNode defines a cdk Stage.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.StageNode(
  props: ITypedNodeProps
)
Name Type Description
props ITypedNodeProps No description.

propsRequired

Methods

Name Description
add_attribute Add attribute.
add_flag Add flag.
add_metadata Add metadata entry.
add_tag Add tag.
apply_data Applies data (attributes, metadata, tags, flag) to entity.
find_metadata Retrieves all metadata entries of a given type.
get_attribute Get attribute by key.
get_tag Get tag by key.
has_attribute Indicates if entity has a given attribute defined, and optionally with a specific value.
has_flag Indicates if entity has a given flag.
has_metadata Indicates if entity has matching metadata entry.
has_tag Indicates if entity has tag, optionally verifying tag value.
mutate_destroy Destroys this node by removing all references and removing this node from the store.
set_attribute Set attribute.
set_tag Set tag.
add_child Add child node.
add_link Add link to another node.
add_reverse_link Add link from another node.
does_depend_on Indicates if this node depends on another node.
does_reference Indicates if this node references another node.
find Recursively find the nearest sub-node matching predicate.
find_all Return this construct and all of its sub-nodes in the given order.
find_all_links Return all direct links of this node and that of all sub-nodes.
find_ancestor Find nearest ancestor of this node matching given predicate.
find_child Find child with given id.
find_link Find link of this node based on predicate.
find_links Find all links of this node based on predicate.
get_cfn_prop Get specific CloudFormation property.
get_child Get child node with given id.
get_link_chains Resolve all link chains.
get_nearest_ancestor Gets the nearest common ancestor shared between this node and another node.
is_ancestor Indicates if a specific node is an ancestor of this node.
is_child Indicates if specific node is a child of this node.
mutate_collapse Collapses all sub-nodes of this node into this node.
mutate_collapse_to Collapses this node into an ancestor.
mutate_collapse_to_parent Collapses this node into it's parent node.
mutate_hoist Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.
mutate_move Move this node into a new parent node.
mutate_remove_child Remove a child node from this node.
mutate_remove_link Remove a link from this node.
mutate_remove_reverse_link Remove a link to this node.
mutate_uncluster Hoist all children to parent and collapse node to parent.
to_string Get string representation of this node.
add_stack Associate a {@link StackNode} with this stage.
mutate_remove_stack Disassociate {@link StackNode} from this stage.

add_attribute
def add_attribute(
  key: str,
  value: typing.Any
) -> None

Add attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

add_flag
def add_flag(
  flag: FlagEnum
) -> None

Add flag.

flagRequired

add_metadata
def add_metadata(
  metadata_type: str,
  data: typing.Any
) -> None

Add metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

add_tag
def add_tag(
  key: str,
  value: str
) -> None

Add tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

apply_data
def apply_data(
  data: IBaseEntityDataProps,
  overwrite: bool = None,
  apply_flags: bool = None
) -> None

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: bool

apply_flagsOptional
  • Type: bool

Indicates if data is overwritten - Indicates if flags should be applied.


find_metadata
def find_metadata(
  metadata_type: str
) -> typing.List[MetadataEntry]

Retrieves all metadata entries of a given type.

metadata_typeRequired
  • Type: str

get_attribute
def get_attribute(
  key: str
) -> typing.Any

Get attribute by key.

keyRequired
  • Type: str

get_tag
def get_tag(
  key: str
) -> str

Get tag by key.

keyRequired
  • Type: str

has_attribute
def has_attribute(
  key: str,
  value: typing.Any = None
) -> bool

Indicates if entity has a given attribute defined, and optionally with a specific value.

keyRequired
  • Type: str

valueOptional
  • Type: typing.Any

has_flag
def has_flag(
  flag: FlagEnum
) -> bool

Indicates if entity has a given flag.

flagRequired

has_metadata
def has_metadata(
  metadata_type: str,
  data: typing.Any
) -> bool

Indicates if entity has matching metadata entry.

metadata_typeRequired
  • Type: str

dataRequired
  • Type: typing.Any

has_tag
def has_tag(
  key: str,
  value: str = None
) -> bool

Indicates if entity has tag, optionally verifying tag value.

keyRequired
  • Type: str

valueOptional
  • Type: str

mutate_destroy
def mutate_destroy(
  strict: bool = None
) -> None

Destroys this node by removing all references and removing this node from the store.

strictOptional
  • Type: bool

Indicates that this node must not have references.


set_attribute
def set_attribute(
  key: str,
  value: typing.Any
) -> None

Set attribute.

This will overwrite existing attribute.

keyRequired
  • Type: str

valueRequired
  • Type: typing.Any

set_tag
def set_tag(
  key: str,
  value: str
) -> None

Set tag.

Will overwrite existing tag.

keyRequired
  • Type: str

valueRequired
  • Type: str

add_child
def add_child(
  node: Node
) -> None

Add child node.

nodeRequired

def add_link(
  edge: Edge
) -> None

Add link to another node.

edgeRequired

def add_reverse_link(
  edge: Edge
) -> None

Add link from another node.

edgeRequired

does_depend_on
def does_depend_on(
  node: Node
) -> bool

Indicates if this node depends on another node.

nodeRequired

does_reference
def does_reference(
  node: Node
) -> bool

Indicates if this node references another node.

nodeRequired

find
def find(
  predicate: INodePredicate
) -> Node

Recursively find the nearest sub-node matching predicate.

predicateRequired

find_all
def find_all(
  options: IFindNodeOptions = None
) -> typing.List[Node]

Return this construct and all of its sub-nodes in the given order.

Optionally filter nodes based on predicate.

optionsOptional

def find_all_links(
  options: IFindEdgeOptions = None
) -> typing.List[Edge]

Return all direct links of this node and that of all sub-nodes.

Optionally filter links based on predicate.

optionsOptional

find_ancestor
def find_ancestor(
  predicate: INodePredicate,
  max: typing.Union[int, float] = None
) -> Node

Find nearest ancestor of this node matching given predicate.

predicateRequired

Predicate to match ancestor.


maxOptional
  • Type: typing.Union[int, float]

find_child
def find_child(
  id: str
) -> Node

Find child with given id.

Similar to find but does not throw error if no child found.

idRequired
  • Type: str

def find_link(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> Edge

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


def find_links(
  predicate: IEdgePredicate,
  reverse: bool = None,
  follow: bool = None,
  direct: bool = None
) -> typing.List[Edge]

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: bool

Indicates if links are search in reverse order.


followOptional
  • Type: bool

Indicates if link chain is followed.


directOptional
  • Type: bool

Indicates that only direct links should be searched.


get_cfn_prop
def get_cfn_prop(
  key: str
) -> typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Get specific CloudFormation property.

keyRequired
  • Type: str

get_child
def get_child(
  id: str
) -> Node

Get child node with given id.

idRequired
  • Type: str

def get_link_chains(
  reverse: bool = None
) -> typing.List[typing.List[typing.Any]]

Resolve all link chains.

{@link EdgeChain }

reverseOptional
  • Type: bool

get_nearest_ancestor
def get_nearest_ancestor(
  node: Node
) -> Node

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

nodeRequired

is_ancestor
def is_ancestor(
  ancestor: Node
) -> bool

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

ancestorRequired

is_child
def is_child(
  node: Node
) -> bool

Indicates if specific node is a child of this node.

nodeRequired

mutate_collapse
def mutate_collapse() -> None

Collapses all sub-nodes of this node into this node.

mutate_collapse_to
def mutate_collapse_to(
  ancestor: Node
) -> Node

Collapses this node into an ancestor.

ancestorRequired

mutate_collapse_to_parent
def mutate_collapse_to_parent() -> Node

Collapses this node into it's parent node.

mutate_hoist
def mutate_hoist(
  new_parent: Node
) -> None

Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

new_parentRequired

mutate_move
def mutate_move(
  new_parent: Node
) -> None

Move this node into a new parent node.

new_parentRequired

The parent to move this node to.


mutate_remove_child
def mutate_remove_child(
  node: Node
) -> bool

Remove a child node from this node.

nodeRequired

def mutate_remove_link(
  link: Edge
) -> bool

Remove a link from this node.

linkRequired

def mutate_remove_reverse_link(
  link: Edge
) -> bool

Remove a link to this node.

linkRequired

mutate_uncluster
def mutate_uncluster() -> None

Hoist all children to parent and collapse node to parent.

to_string
def to_string() -> str

Get string representation of this node.

add_stack
def add_stack(
  stack: StackNode
) -> None

Associate a {@link StackNode} with this stage.

stackRequired

mutate_remove_stack
def mutate_remove_stack(
  stack: StackNode
) -> bool

Disassociate {@link StackNode} from this stage.

stackRequired

Static Functions

Name Description
is_stage_node Indicates if node is a {@link StageNode}.
of Gets the {@link StageNode} containing a given resource.

is_stage_node
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.StageNode.is_stage_node(
  node: Node
)

Indicates if node is a {@link StageNode}.

nodeRequired

of
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.StageNode.of(
  node: Node
)

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

nodeRequired

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Get readonly record of all attributes.
flags typing.List[FlagEnum] Get readonly list of all flags.
is_destroyed bool Indicates if the entity has been destroyed (eg: removed from store).
is_mutated bool Indicates if the entity has had destructive mutations applied.
metadata typing.List[constructs.MetadataEntry] Get readonly list of all metadata entries.
store Store Reference to the store.
tags typing.Mapping[str] Get readonly record of all tags.
uuid str Universally unique identifier.
allow_destructive_mutations bool Indicates if this node allows destructive mutations.
children typing.List[Node] Get all direct child nodes.
depended_on_by typing.List[Node] Get list of Nodes that depend on this node.
dependencies typing.List[Node] Get list of Nodes that this node depends on.
dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the source.
depth typing.Union[int, float] Indicates the depth of the node relative to root (0).
id str Node id, which is only unique within parent scope.
is_asset bool Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn bool Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
is_cluster bool Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource bool Indicates if node is a Custom Resource.
is_extraneous bool Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.
is_graph_container bool Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf bool Indicates if this node is a leaf node, which means it does not have children.
is_top_level bool Indicates if node is direct child of the graph root node.
links typing.List[Edge] Gets all links (edges) in which this node is the source.
node_type NodeTypeEnum Type of node.
path str Path of the node.
referenced_by typing.List[Node] Get list of Nodes that reference this node.
reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the source.
references typing.List[Node] Get list of Nodes that this node references.
reverse_dependency_links typing.List[Dependency] Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links typing.List[Edge] Gets all links (edges) in which this node is the target.
reverse_reference_links typing.List[Reference] Gets list of {@link Reference} links (edges) where this node is the target.
scopes typing.List[Node] Gets descending ordered list of ancestors from the root.
siblings typing.List[Node] Get list of siblings of this node.
cfn_props PlainObject Gets CloudFormation properties for this node.
cfn_type str Get the CloudFormation resource type for this node.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
construct_info_fqn str Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
root_stack StackNode Get root stack.
stack StackNode Stack the node is contained in.
stacks typing.List[StackNode] Gets all stacks contained by this stage.

attributesRequired
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Get readonly record of all attributes.


flagsRequired
flags: typing.List[FlagEnum]

Get readonly list of all flags.


is_destroyedRequired
is_destroyed: bool
  • Type: bool

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


is_mutatedRequired
is_mutated: bool
  • Type: bool

Indicates if the entity has had destructive mutations applied.


metadataRequired
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Get readonly list of all metadata entries.


storeRequired
store: Store

Reference to the store.


tagsRequired
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Get readonly record of all tags.


uuidRequired
uuid: str
  • Type: str

Universally unique identifier.


allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if this node allows destructive mutations.

{@link Store.allowDestructiveMutations }


childrenRequired
children: typing.List[Node]
  • Type: typing.List[Node]

Get all direct child nodes.


depended_on_byRequired
depended_on_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that depend on this node.

{@link Node.reverseDependencyLinks }


dependenciesRequired
dependencies: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node depends on.

{@link Node.dependencyLinks }


dependency_linksRequired
dependency_links: typing.List[Dependency]

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


depthRequired
depth: typing.Union[int, float]
  • Type: typing.Union[int, float]

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


idRequired
id: str
  • Type: str

Node id, which is only unique within parent scope.


is_assetRequired
is_asset: bool
  • Type: bool

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


is_cfn_fqnRequired
is_cfn_fqn: bool
  • Type: bool

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

{@link FlagEnum.CFN_FQN }


is_clusterRequired
is_cluster: bool
  • Type: bool

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


is_custom_resourceRequired
is_custom_resource: bool
  • Type: bool

Indicates if node is a Custom Resource.


is_extraneousRequired
is_extraneous: bool
  • Type: bool

Indicates if this node is considered a {@link FlagEnum.EXTRANEOUS} node or determined to be extraneous: - Clusters that contain no children.


is_graph_containerRequired
is_graph_container: bool
  • Type: bool

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


is_leafRequired
is_leaf: bool
  • Type: bool

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


is_top_levelRequired
is_top_level: bool
  • Type: bool

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


linksRequired
links: typing.List[Edge]
  • Type: typing.List[Edge]

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


node_typeRequired
node_type: NodeTypeEnum

Type of node.


pathRequired
path: str
  • Type: str

Path of the node.


referenced_byRequired
referenced_by: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that reference this node.

{@link Node.reverseReferenceLinks }


reference_linksRequired
reference_links: typing.List[Reference]

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


referencesRequired
references: typing.List[Node]
  • Type: typing.List[Node]

Get list of Nodes that this node references.

{@link Node.referenceLinks }


reverse_dependency_linksRequired
reverse_dependency_links: typing.List[Dependency]

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


reverse_linksRequired
reverse_links: typing.List[Edge]
  • Type: typing.List[Edge]

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


reverse_reference_linksRequired
reverse_reference_links: typing.List[Reference]

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


scopesRequired
scopes: typing.List[Node]
  • Type: typing.List[Node]

Gets descending ordered list of ancestors from the root.


siblingsRequired
siblings: typing.List[Node]
  • Type: typing.List[Node]

Get list of siblings of this node.


cfn_propsOptional
cfn_props: PlainObject

Gets CloudFormation properties for this node.


cfn_typeOptional
cfn_type: str
  • Type: str

Get the CloudFormation resource type for this node.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


construct_info_fqnOptional
construct_info_fqn: str
  • Type: str

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.

Only the root node should not have parent.


root_stackOptional
root_stack: StackNode

Get root stack.


stackOptional
stack: StackNode

Stack the node is contained in.


stacksRequired
stacks: typing.List[StackNode]

Gets all stacks contained by this stage.


Store

Store class provides the in-memory database-like interface for managing all entities in the graph.

Initializers

import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Store(
  allow_destructive_mutations: bool = None
)
Name Type Description
allow_destructive_mutations bool No description.

allow_destructive_mutationsOptional
  • Type: bool

Methods

Name Description
add_edge Add edge to the store.
add_node Add node to the store.
add_stack Add stack node to the store.
add_stage Add stage to the store.
clone Clone the store to allow destructive mutations.
compute_logical_universal_id Compute universal logicalId based on parent stack and construct logicalId (<stack>:<logicalId>).
find_node_by_import_arn Attempts to lookup the {@link Node} associated with a given import arn token.
find_node_by_logical_id Find node within given stack with given logicalId.
find_node_by_logical_universal_id Find node by universal logicalId (<stack>:<logicalId>).
get_edge Get stored edge by UUID.
get_node Get stored node by UUID.
get_stack Get stored stack node by UUID.
get_stage Get stored stage node by UUID.
mutate_remove_edge Remove edge from the store.
mutate_remove_node Remove node from the store.
record_import_arn Records arn tokens from imported resources (eg: s3.Bucket.fromBucketArn()) that are used for resolving references.
record_logical_id Record a universal logicalId to node mapping in the store.
serialize Serialize the store.
verify_destructive_mutation_allowed Verifies that the store allows destructive mutations.

add_edge
def add_edge(
  edge: Edge
) -> None

Add edge to the store.

edgeRequired

add_node
def add_node(
  node: Node
) -> None

Add node to the store.

nodeRequired

add_stack
def add_stack(
  stack: StackNode
) -> None

Add stack node to the store.

stackRequired

add_stage
def add_stage(
  stage: StageNode
) -> None

Add stage to the store.

stageRequired

clone
def clone(
  allow_destructive_mutations: bool = None
) -> Store

Clone the store to allow destructive mutations.

allow_destructive_mutationsOptional
  • Type: bool

Indicates if destructive mutations are allowed;

defaults to true


compute_logical_universal_id
def compute_logical_universal_id(
  stack: StackNode,
  logical_id: str
) -> str

Compute universal logicalId based on parent stack and construct logicalId (<stack>:<logicalId>).

Construct logicalIds are only unique within their containing stack, so to use logicalId* lookups universally (like resolving references) we need a universal key.

stackRequired

logical_idRequired
  • Type: str

find_node_by_import_arn
def find_node_by_import_arn(
  value: typing.Any
) -> Node

Attempts to lookup the {@link Node} associated with a given import arn token.

valueRequired
  • Type: typing.Any

Import arn value, which is either object to tokenize or already tokenized string.


find_node_by_logical_id
def find_node_by_logical_id(
  stack: StackNode,
  logical_id: str
) -> Node

Find node within given stack with given logicalId.

stackRequired

logical_idRequired
  • Type: str

find_node_by_logical_universal_id
def find_node_by_logical_universal_id(
  uid: str
) -> Node

Find node by universal logicalId (<stack>:<logicalId>).

uidRequired
  • Type: str

get_edge
def get_edge(
  uuid: str
) -> Edge

Get stored edge by UUID.

uuidRequired
  • Type: str

get_node
def get_node(
  uuid: str
) -> Node

Get stored node by UUID.

uuidRequired
  • Type: str

get_stack
def get_stack(
  uuid: str
) -> StackNode

Get stored stack node by UUID.

uuidRequired
  • Type: str

get_stage
def get_stage(
  uuid: str
) -> StageNode

Get stored stage node by UUID.

uuidRequired
  • Type: str

mutate_remove_edge
def mutate_remove_edge(
  edge: Edge
) -> bool

Remove edge from the store.

edgeRequired

mutate_remove_node
def mutate_remove_node(
  node: Node
) -> bool

Remove node from the store.

nodeRequired

record_import_arn
def record_import_arn(
  arn_token: str,
  resource: Node
) -> None

Records arn tokens from imported resources (eg: s3.Bucket.fromBucketArn()) that are used for resolving references.

arn_tokenRequired
  • Type: str

resourceRequired

record_logical_id
def record_logical_id(
  stack: StackNode,
  logical_id: str,
  resource: Node
) -> None

Record a universal logicalId to node mapping in the store.

stackRequired

logical_idRequired
  • Type: str

resourceRequired

serialize
def serialize() -> SGGraphStore

Serialize the store.

verify_destructive_mutation_allowed
def verify_destructive_mutation_allowed() -> None

Verifies that the store allows destructive mutations.

Static Functions

Name Description
from_serialized_store Builds store from serialized store data.

from_serialized_store
import aws.pdk.cdk_graph

aws.pdk.cdk_graph.Store.from_serialized_store(
  edges: typing.List[SGEdge],
  tree: SGNode,
  version: str
)

Builds store from serialized store data.

edgesRequired

List of edges.


treeRequired

Node tree.


versionRequired
  • Type: str

Store version.


Properties

Name Type Description
allow_destructive_mutations bool Indicates if the store allows destructive mutations.
counts IStoreCounts Get record of all store counters.
edges typing.List[Edge] Gets all stored edges.
nodes typing.List[Node] Gets all stored nodes.
root RootNode Root node in the store.
root_stacks typing.List[StackNode] Gets all stored root stack nodes.
stacks typing.List[StackNode] Gets all stored stack nodes.
stages typing.List[StageNode] Gets all stored stage nodes.
version str Current SemVer version of the store.

allow_destructive_mutationsRequired
allow_destructive_mutations: bool
  • Type: bool

Indicates if the store allows destructive mutations.

Destructive mutations are only allowed on clones of the store to prevent plugins and filters from mutating the store for downstream plugins.

All mutate* methods are only allowed on stores that allow destructive mutations.

This behavior may change in the future if the need arises for plugins to pass mutated stores to downstream plugins. But it will be done cautiously with ensuring the intent of downstream plugin is to receive the mutated store.


countsRequired
counts: IStoreCounts

Get record of all store counters.


edgesRequired
edges: typing.List[Edge]
  • Type: typing.List[Edge]

Gets all stored edges.


nodesRequired
nodes: typing.List[Node]
  • Type: typing.List[Node]

Gets all stored nodes.


rootRequired
root: RootNode

Root node in the store.

The root node is not the computed root, but the graph root which is auto-generated and can not be mutated.


root_stacksRequired
root_stacks: typing.List[StackNode]

Gets all stored root stack nodes.


stacksRequired
stacks: typing.List[StackNode]

Gets all stored stack nodes.


stagesRequired
stages: typing.List[StageNode]

Gets all stored stage nodes.


versionRequired
version: str
  • Type: str

Current SemVer version of the store.


Protocols

IAppNodeProps

{@link AppNode} props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


IAttributeReferenceProps

Attribute type reference props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
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).
value typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]] Resolved attribute value.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


sourceRequired
source: Node

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


targetRequired
target: Node

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


valueRequired
value: typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]
  • Type: typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]

Resolved attribute value.


IBaseEntityDataProps

Base interface for all store entities data props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


IBaseEntityProps

Base interface for all store entities props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


ICdkGraphPlugin

CdkGraph Plugin interface.

Properties

Name Type Description
id str Unique identifier for this plugin.
version str Plugin version.
dependencies typing.List[str] List of plugins this plugin depends on, including optional semver version (eg: ["foo", "bar@1.2"]).
bind IGraphPluginBindCallback Binds the plugin to the CdkGraph instance.
inspect IGraphVisitorCallback Node visitor callback for construct tree traversal.
report IGraphReportCallback Generate asynchronous reports based on the graph.
synthesize IGraphSynthesizeCallback Called during CDK synthesize to generate synchronous artifacts based on the in-memory graph passed to the plugin.

idRequired
id: str
  • Type: str

Unique identifier for this plugin.


versionRequired
version: str
  • Type: str

Plugin version.


dependenciesOptional
dependencies: typing.List[str]
  • Type: typing.List[str]

List of plugins this plugin depends on, including optional semver version (eg: ["foo", "bar@1.2"]).


bindRequired
bind: IGraphPluginBindCallback

Binds the plugin to the CdkGraph instance.

Enables plugins to receive base configs.


inspectOptional
inspect: IGraphVisitorCallback

Node visitor callback for construct tree traversal.

This follows IAspect.visit pattern, but the order of visitor traversal in managed by the CdkGraph.


reportOptional
report: IGraphReportCallback

Generate asynchronous reports based on the graph.

This is not automatically called when synthesizing CDK. Developer must explicitly add await graphInstance.report() to the CDK bin or invoke this outside of the CDK synth. In either case, the plugin receives the in-memory graph interface when invoked, as the CdkGraph will deserialize the graph prior to invoking the plugin report.


synthesizeOptional
synthesize: IGraphSynthesizeCallback

Called during CDK synthesize to generate synchronous artifacts based on the in-memory graph passed to the plugin.

This is called in fifo order of plugins.


ICfnResourceNodeProps

CfnResourceNode props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
id str Node id, which is unique within parent scope.
path str Path of the node.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
stack StackNode Stack the node is contained.
import_arn_token str No description.
node_type NodeTypeEnum No description.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


idRequired
id: str
  • Type: str

Node id, which is unique within parent scope.


pathRequired
path: str
  • Type: str

Path of the node.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


stackOptional
stack: StackNode

Stack the node is contained.


import_arn_tokenOptional
import_arn_token: str
  • Type: str

node_typeOptional
node_type: NodeTypeEnum

IEdgePredicate

Predicate to match edge.

Methods

Name Description
filter No description.

filter
def filter(
  edge: Edge
) -> bool
edgeRequired

IEdgeProps

Edge props interface.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
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).
direction EdgeDirectionEnum Indicates the direction in which the edge is directed.
edge_type EdgeTypeEnum Type of edge.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


sourceRequired
source: Node

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


targetRequired
target: Node

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


directionRequired
direction: EdgeDirectionEnum

Indicates the direction in which the edge is directed.


edge_typeRequired
edge_type: EdgeTypeEnum

Type of edge.


IFilterFocusCallback

Determines focus node of filter plan.

Methods

Name Description
filter No description.

filter
def filter(
  store: Store
) -> Node
storeRequired

IFindEdgeOptions

Options for edge based search operations.

Properties

Name Type Description
order constructs.ConstructOrder The order of traversal during search path.
predicate IEdgePredicate The predicate to match edges(s).
reverse bool Indicates reverse order.

orderOptional
order: ConstructOrder
  • Type: constructs.ConstructOrder

The order of traversal during search path.


predicateOptional
predicate: IEdgePredicate

The predicate to match edges(s).


reverseOptional
reverse: bool
  • Type: bool

Indicates reverse order.


IFindNodeOptions

Options for node based search operations.

Properties

Name Type Description
order constructs.ConstructOrder The order of traversal during search path.
predicate INodePredicate The predicate to match node(s).

orderOptional
order: ConstructOrder
  • Type: constructs.ConstructOrder

The order of traversal during search path.


predicateOptional
predicate: INodePredicate

The predicate to match node(s).


IGraphPluginBindCallback

Callback signature for graph Plugin.bind operation.

IGraphReportCallback

Callback signature for graph Plugin.report operation.

IGraphStoreFilter

Store filter callback interface used to perform filtering operations directly against the store, as opposed to using {@link IGraphFilter} definitions.

Methods

Name Description
filter No description.

filter
def filter(
  store: Store
) -> None
storeRequired

IGraphSynthesizeCallback

Callback signature for graph Plugin.synthesize operation.

IGraphVisitorCallback

Callback signature for graph Plugin.inspect operation.

INestedStackNodeProps

{@link NestedStackNode} props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
id str Node id, which is unique within parent scope.
path str Path of the node.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
stack StackNode Stack the node is contained.
node_type NodeTypeEnum Type of node.
parent_stack StackNode Parent stack.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


idRequired
id: str
  • Type: str

Node id, which is unique within parent scope.


pathRequired
path: str
  • Type: str

Path of the node.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


stackOptional
stack: StackNode

Stack the node is contained.


node_typeOptional
node_type: NodeTypeEnum

Type of node.


parent_stackRequired
parent_stack: StackNode

Parent stack.


INodePredicate

Predicate to match node.

Methods

Name Description
filter No description.

filter
def filter(
  node: Node
) -> bool
nodeRequired

INodeProps

Node props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
id str Node id, which is unique within parent scope.
path str Path of the node.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
stack StackNode Stack the node is contained.
node_type NodeTypeEnum Type of node.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


idRequired
id: str
  • Type: str

Node id, which is unique within parent scope.


pathRequired
path: str
  • Type: str

Path of the node.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


stackOptional
stack: StackNode

Stack the node is contained.


node_typeRequired
node_type: NodeTypeEnum

Type of node.


IOutputNodeProps

OutputNode props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
id str Node id, which is unique within parent scope.
path str Path of the node.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
stack StackNode Stack the node is contained.
value typing.Any Resolved output value.
description str Description.
export_name str Export name.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


idRequired
id: str
  • Type: str

Node id, which is unique within parent scope.


pathRequired
path: str
  • Type: str

Path of the node.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


stackOptional
stack: StackNode

Stack the node is contained.


valueRequired
value: typing.Any
  • Type: typing.Any

Resolved output value.


descriptionOptional
description: str
  • Type: str

Description.


export_nameOptional
export_name: str
  • Type: str

Export name.


IParameterNodeProps

{@link ParameterNode} props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
id str Node id, which is unique within parent scope.
path str Path of the node.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
stack StackNode Stack the node is contained.
parameter_type str Parameter type.
value typing.Any Resolved value.
description str Description.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


idRequired
id: str
  • Type: str

Node id, which is unique within parent scope.


pathRequired
path: str
  • Type: str

Path of the node.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


stackOptional
stack: StackNode

Stack the node is contained.


parameter_typeRequired
parameter_type: str
  • Type: str

Parameter type.


valueRequired
value: typing.Any
  • Type: typing.Any

Resolved value.


descriptionOptional
description: str
  • Type: str

Description.


IReferenceProps

Reference edge props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
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).
reference_type ReferenceTypeEnum Type of reference.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


sourceRequired
source: Node

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


targetRequired
target: Node

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


reference_typeOptional
reference_type: ReferenceTypeEnum

Type of reference.


IResourceNodeProps

ResourceNode props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
id str Node id, which is unique within parent scope.
path str Path of the node.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
stack StackNode Stack the node is contained.
cdk_owned bool Indicates if this resource is owned by cdk (defined in cdk library).
node_type NodeTypeEnum Type of node.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


idRequired
id: str
  • Type: str

Node id, which is unique within parent scope.


pathRequired
path: str
  • Type: str

Path of the node.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


stackOptional
stack: StackNode

Stack the node is contained.


cdk_ownedRequired
cdk_owned: bool
  • Type: bool

Indicates if this resource is owned by cdk (defined in cdk library).


node_typeOptional
node_type: NodeTypeEnum

Type of node.


ISerializableEdge

Interface for serializable graph edge entity.

ISerializableEntity

Interface for serializable graph entities.

ISerializableGraphStore

Interface for serializable graph store.

Methods

Name Description
serialize No description.

serialize
def serialize() -> SGGraphStore

ISerializableNode

Interface for serializable graph node entity.

IStackNodeProps

{@link StackNode} props.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
id str Node id, which is unique within parent scope.
path str Path of the node.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
stack StackNode Stack the node is contained.
node_type NodeTypeEnum Type of node.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


idRequired
id: str
  • Type: str

Node id, which is unique within parent scope.


pathRequired
path: str
  • Type: str

Path of the node.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


stackOptional
stack: StackNode

Stack the node is contained.


node_typeOptional
node_type: NodeTypeEnum

Type of node.


IStoreCounts

Interface for store counts.

Properties

Name Type Description
cfn_resources typing.Mapping[typing.Union[int, float]] Returns {@link ICounterRecord} containing total number of each cfnResourceType.
edges typing.Union[int, float] Counts total number of edges in the store.
edge_types typing.Mapping[typing.Union[int, float]] Returns {@link ICounterRecord} containing total number of each edge type ({@link EdgeTypeEnum}).
nodes typing.Union[int, float] Counts total number of nodes in the store.
node_types typing.Mapping[typing.Union[int, float]] Returns {@link ICounterRecord} containing total number of each node type ({@link NodeTypeEnum}).
stacks typing.Union[int, float] Counts total number of stacks in the store.
stages typing.Union[int, float] Counts total number of stages in the store.

cfn_resourcesRequired
cfn_resources: typing.Mapping[typing.Union[int, float]]
  • Type: typing.Mapping[typing.Union[int, float]]

Returns {@link ICounterRecord} containing total number of each cfnResourceType.


edgesRequired
edges: typing.Union[int, float]
  • Type: typing.Union[int, float]

Counts total number of edges in the store.


edge_typesRequired
edge_types: typing.Mapping[typing.Union[int, float]]
  • Type: typing.Mapping[typing.Union[int, float]]

Returns {@link ICounterRecord} containing total number of each edge type ({@link EdgeTypeEnum}).


nodesRequired
nodes: typing.Union[int, float]
  • Type: typing.Union[int, float]

Counts total number of nodes in the store.


node_typesRequired
node_types: typing.Mapping[typing.Union[int, float]]
  • Type: typing.Mapping[typing.Union[int, float]]

Returns {@link ICounterRecord} containing total number of each node type ({@link NodeTypeEnum}).


stacksRequired
stacks: typing.Union[int, float]
  • Type: typing.Union[int, float]

Counts total number of stacks in the store.


stagesRequired
stages: typing.Union[int, float]
  • Type: typing.Union[int, float]

Counts total number of stages in the store.


ITypedEdgeProps

Base edge props agnostic to edge type.

Used for extending per edge class with type specifics.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
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).

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


sourceRequired
source: Node

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


targetRequired
target: Node

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


ITypedNodeProps

Base node props agnostic to node type.

Used for extending per node class with type specifics.

Properties

Name Type Description
attributes typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]] Attributes.
flags typing.List[FlagEnum] Flags.
metadata typing.List[constructs.MetadataEntry] Metadata entries.
tags typing.Mapping[str] Tags.
store Store Store.
uuid str UUID.
id str Node id, which is unique within parent scope.
path str Path of the node.
cfn_type str Type of CloudFormation resource.
construct_info ConstructInfo Synthesized construct information defining jii resolution data.
logical_id str Logical id of the node, which is only unique within containing stack.
parent Node Parent node.
stack StackNode Stack the node is contained.

attributesOptional
attributes: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]
  • Type: typing.Mapping[typing.Union[str, typing.Union[int, float], bool, PlainObject, typing.List[typing.Union[str, typing.Union[int, float], bool, PlainObject]]]]

Attributes.


flagsOptional
flags: typing.List[FlagEnum]

Flags.


metadataOptional
metadata: typing.List[MetadataEntry]
  • Type: typing.List[constructs.MetadataEntry]

Metadata entries.


tagsOptional
tags: typing.Mapping[str]
  • Type: typing.Mapping[str]

Tags.


storeRequired
store: Store

Store.


uuidRequired
uuid: str
  • Type: str

UUID.


idRequired
id: str
  • Type: str

Node id, which is unique within parent scope.


pathRequired
path: str
  • Type: str

Path of the node.


cfn_typeOptional
cfn_type: str
  • Type: str

Type of CloudFormation resource.


construct_infoOptional
construct_info: ConstructInfo

Synthesized construct information defining jii resolution data.


logical_idOptional
logical_id: str
  • Type: str

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


parentOptional
parent: Node

Parent node.


stackOptional
stack: StackNode

Stack the node is contained.


Enums

CdkConstructIds

Common cdk construct ids.

Members

Name Description
DEFAULT No description.
RESOURCE No description.
EXPORTS No description.

DEFAULT

RESOURCE

EXPORTS

CdkGraphArtifacts

CdkGraph core artifacts.

Members

Name Description
GRAPH_METADATA No description.
GRAPH No description.

GRAPH_METADATA

GRAPH

CfnAttributesEnum

Common cfn attribute keys.

Members

Name Description
TYPE No description.
PROPS No description.

TYPE

PROPS

ConstructInfoFqnEnum

Commonly used cdk construct info fqn (jsii fully-qualified ids).

Members

Name Description
APP No description.
PDKAPP_MONO No description.
PDKAPP No description.
STAGE No description.
STACK No description.
NESTED_STACK No description.
CFN_STACK No description.
CFN_OUTPUT No description.
CFN_PARAMETER No description.
CUSTOM_RESOURCE No description.
AWS_CUSTOM_RESOURCE No description.
CUSTOM_RESOURCE_PROVIDER No description.
CUSTOM_RESOURCE_PROVIDER_2 No description.
LAMBDA No description.
CFN_LAMBDA No description.
LAMBDA_LAYER_VERSION No description.
CFN_LAMBDA_LAYER_VERSION No description.
LAMBDA_ALIAS No description.
CFN_LAMBDA_ALIAS No description.
LAMBDA_BASE No description.
LAMBDA_SINGLETON No description.
LAMBDA_LAYER_AWSCLI No description.
CFN_LAMBDA_PERMISSIONS No description.
ASSET_STAGING No description.
S3_ASSET No description.
ECR_TARBALL_ASSET No description.
EC2_INSTANCE No description.
CFN_EC2_INSTANCE No description.
SECURITY_GROUP No description.
CFN_SECURITY_GROUP No description.
VPC No description.
CFN_VPC No description.
PRIVATE_SUBNET No description.
CFN_PRIVATE_SUBNET No description.
PUBLIC_SUBNET No description.
CFN_PUBLIC_SUBNET No description.
IAM_ROLE No description.

APP

PDKAPP_MONO

PDKAPP

STAGE

STACK

NESTED_STACK

CFN_STACK

CFN_OUTPUT

CFN_PARAMETER

CUSTOM_RESOURCE

AWS_CUSTOM_RESOURCE

CUSTOM_RESOURCE_PROVIDER

CUSTOM_RESOURCE_PROVIDER_2

LAMBDA

CFN_LAMBDA

LAMBDA_LAYER_VERSION

CFN_LAMBDA_LAYER_VERSION

LAMBDA_ALIAS

CFN_LAMBDA_ALIAS

LAMBDA_BASE

LAMBDA_SINGLETON

LAMBDA_LAYER_AWSCLI

CFN_LAMBDA_PERMISSIONS

ASSET_STAGING

S3_ASSET

ECR_TARBALL_ASSET

EC2_INSTANCE

CFN_EC2_INSTANCE

SECURITY_GROUP

CFN_SECURITY_GROUP

VPC

CFN_VPC

PRIVATE_SUBNET

CFN_PRIVATE_SUBNET

PUBLIC_SUBNET

CFN_PUBLIC_SUBNET

IAM_ROLE

EdgeDirectionEnum

EdgeDirection specifies in which direction the edge is directed or if it is undirected.

Members

Name Description
NONE Indicates that edge is undirected;
FORWARD Indicates the edge is directed from the source to the target.
BACK Indicates the edge is directed from the target to the source.
BOTH Indicates the edge is bi-directional.

NONE

Indicates that edge is undirected;

meaning there is no directional relationship between the source and target.


FORWARD

Indicates the edge is directed from the source to the target.


BACK

Indicates the edge is directed from the target to the source.


BOTH

Indicates the edge is bi-directional.


EdgeTypeEnum

Edge types handles by the graph.

Members

Name Description
CUSTOM Custom edge.
REFERENCE Reference edge (Ref, Fn::GetAtt, Fn::ImportValue).
DEPENDENCY CloudFormation dependency edge.

CUSTOM

Custom edge.


REFERENCE

Reference edge (Ref, Fn::GetAtt, Fn::ImportValue).


DEPENDENCY

CloudFormation dependency edge.


FilterPreset

Filter presets.

Members

Name Description
COMPACT Collapses extraneous nodes to parent and cdk created nodes on themselves, and prunes extraneous edges.
NON_EXTRANEOUS Collapses extraneous nodes to parent and prunes extraneous edges.
NONE No filtering is performed which will output verbose graph.

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.


NON_EXTRANEOUS

Collapses extraneous nodes to parent and prunes extraneous edges.


NONE

No filtering is performed which will output verbose graph.


FilterStrategy

Filter strategy to apply to filter matches.

Members

Name Description
PRUNE Remove filtered entity and all its edges.
COLLAPSE Collapse all child entities of filtered entity into filtered entity;
COLLAPSE_TO_PARENT Collapse all filtered entities into their parent entity;

PRUNE

Remove filtered entity and all its edges.


COLLAPSE

Collapse all child entities of filtered entity into filtered entity;

and hoist all edges.


COLLAPSE_TO_PARENT

Collapse all filtered entities into their parent entity;

and hoist its edges to parent.


FlagEnum

Graph flags.

Members

Name Description
CLUSTER Indicates that node is a cluster (container) and treated like an emphasized subgraph.
GRAPH_CONTAINER Indicates that node is non-resource container (Root, App) and used for structural purpose in the graph only.
EXTRANEOUS Indicates that the entity is extraneous and considered collapsible to parent without impact of intent.
ASSET Indicates node is considered a CDK Asset (Lambda Code, Docker Image, etc).
CDK_OWNED Indicates that node was created by CDK.
CFN_FQN Indicates node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.
CLOSED_EDGE Indicates that edge is closed;
MUTATED Indicates that entity was mutated;
IMPORT Indicates that resource is imported into CDK (eg: lambda.Function.fromFunctionName(), s3.Bucket.fromBucketArn()).
CUSTOM_RESOURCE Indicates if node is a CustomResource.
AWS_CUSTOM_RESOURCE Indicates if node is an AwsCustomResource, which is a custom resource that simply calls the AWS SDK API via singleton provider.
AWS_API_CALL_LAMBDA Indicates if lambda function resource is a singleton AWS API call lambda for AwsCustomResources.

CLUSTER

Indicates that node is a cluster (container) and treated like an emphasized subgraph.


GRAPH_CONTAINER

Indicates that node is non-resource container (Root, App) and used for structural purpose in the graph only.


EXTRANEOUS

Indicates that the entity is extraneous and considered collapsible to parent without impact of intent.


ASSET

Indicates node is considered a CDK Asset (Lambda Code, Docker Image, etc).


CDK_OWNED

Indicates that node was created by CDK.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Resource.html#static-iswbrownedwbrresourceconstruct


CFN_FQN

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


CLOSED_EDGE

Indicates that edge is closed;

meaning source === target. This flag only gets applied on creation of edge, not during mutations to maintain initial intent.


MUTATED

Indicates that entity was mutated;

meaning a mutation was performed to change originally computed graph value.


IMPORT

Indicates that resource is imported into CDK (eg: lambda.Function.fromFunctionName(), s3.Bucket.fromBucketArn()).


CUSTOM_RESOURCE

Indicates if node is a CustomResource.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html


AWS_CUSTOM_RESOURCE

Indicates if node is an AwsCustomResource, which is a custom resource that simply calls the AWS SDK API via singleton provider.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources.AwsCustomResource.html


AWS_API_CALL_LAMBDA

Indicates if lambda function resource is a singleton AWS API call lambda for AwsCustomResources.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources.AwsCustomResource.html


MetadataTypeEnum

Common cdk metadata types.

Members

Name Description
LOGICAL_ID No description.

LOGICAL_ID

NodeTypeEnum

Node types handled by the graph.

Members

Name Description
DEFAULT Default node type - used for all nodes that don't have explicit type defined.
CFN_RESOURCE L1 cfn resource node.
RESOURCE L2 cdk resource node.
CUSTOM_RESOURCE Cdk customer resource node.
ROOT Graph root node.
APP Cdk App node.
STAGE Cdk Stage node.
STACK Cdk Stack node.
NESTED_STACK Cdk NestedStack node.
OUTPUT CfnOutput node.
PARAMETER CfnParameter node.
ASSET Cdk asset node.

DEFAULT

Default node type - used for all nodes that don't have explicit type defined.


CFN_RESOURCE

L1 cfn resource node.


RESOURCE

L2 cdk resource node.


CUSTOM_RESOURCE

Cdk customer resource node.


ROOT

Graph root node.


APP

Cdk App node.


STAGE

Cdk Stage node.


STACK

Cdk Stack node.


NESTED_STACK

Cdk NestedStack node.


OUTPUT

CfnOutput node.


PARAMETER

CfnParameter node.


ASSET

Cdk asset node.


ReferenceTypeEnum

Reference edge types.

Members

Name Description
REF CloudFormation Ref reference.
ATTRIBUTE CloudFormation Fn::GetAtt reference.
IMPORT CloudFormation Fn::ImportValue reference.
IMPORT_ARN CloudFormation Fn::Join reference of imported resourced (eg: s3.Bucket.fromBucketArn()).

REF

CloudFormation Ref reference.


ATTRIBUTE

CloudFormation Fn::GetAtt reference.


IMPORT

CloudFormation Fn::ImportValue reference.


IMPORT_ARN

CloudFormation Fn::Join reference of imported resourced (eg: s3.Bucket.fromBucketArn()).



Last update: 2024-12-20