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. |
root
Required
- Type: constructs.Construct
plugins
Optional
- Type: typing.List[ICdkGraphPlugin]
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.
x
Required
- 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. |
node
Required
node: Node
- Type: constructs.Node
The tree node.
config
Required
config: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Config.
plugins
Required
plugins: typing.List[ICdkGraphPlugin]
- Type: typing.List[ICdkGraphPlugin]
List of plugins registered with this instance.
root
Required
root: Construct
- Type: constructs.Construct
graph_context
Optional
graph_context: CdkGraphContext
- Type: 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. |
ID
Required
ID: str
- Type: str
Fixed CdkGraph construct id.
VERSION
Required
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. |
filename
Required
filename: str
- Type: str
Filename of the artifact.
filepath
Required
filepath: str
- Type: str
Full path where artifact is stored.
id
Required
id: str
- Type: str
The unique type of the artifact.
source
Required
source: str
- Type: str
The source of the artifact (such as plugin, or core system, etc).
description
Optional
description: str
- Type: str
Description of artifact.
ConstructInfo
Source information on a construct (class fqn and version).
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. |
fqn
Required
fqn: str
- Type: str
version
Required
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. |
regex
Optional
regex: str
- Type: str
String representation of a regex.
value
Optional
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. |
plugins
Optional
plugins: typing.List[ICdkGraphPlugin]
- Type: 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. |
graph
Optional
graph: IGraphFilter
- Type: IGraphFilter
Graph Filter.
store
Optional
store: IGraphStoreFilter
- Type: 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_nodes
Optional
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}
edge
Optional
edge: IEdgePredicate
- Type: IEdgePredicate
Predicate to match edges.
Edges are evaluated after nodes are filtered.
inverse
Optional
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.
node
Optional
node: INodePredicate
- Type: INodePredicate
Predicate to match nodes.
strategy
Optional
strategy: FilterStrategy
- Type: FilterStrategy
- Default: {FilterStrategy.PRUNE}
Filter strategy to apply to matching nodes.
Edges do not have a strategy, they are always pruned.
IGraphFilterPlan
Graph filter plan.
Initializer
import 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_nodes
Optional
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.
filters
Optional
filters: typing.List[IFilter]
- Type: 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.
focus
Optional
focus: IGraphFilterPlanFocusConfig
Config to focus the graph on specific node.
order
Optional
order: ConstructOrder
- Type: constructs.ConstructOrder
- Default: {ConstructOrder.PREORDER}
The order to visit nodes and edges during filtering.
preset
Optional
preset: FilterPreset
- Type: 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). |
filter
Required
filter: IFilterFocusCallback
- Type: IFilterFocusCallback
The node or resolver to determine the node to focus on.
no_hoist
Optional
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. |
uuid
Required
uuid: str
- Type: str
Universally unique identity.
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Serializable entity flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Serializable entity metadata.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Serializable entity tags.
dependencies
Required
dependencies: typing.List[str]
- Type: typing.List[str]
unresolved_references
Required
unresolved_references: typing.List[SGUnresolvedReference]
- Type: typing.List[SGUnresolvedReference]
cfn_type
Optional
cfn_type: str
- Type: str
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
logical_id
Optional
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). |
uuid
Required
uuid: str
- Type: str
Universally unique identity.
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Serializable entity flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Serializable entity metadata.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Serializable entity tags.
direction
Required
direction: EdgeDirectionEnum
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edge_type
Required
edge_type: EdgeTypeEnum
- Type: EdgeTypeEnum
Type of edge.
source
Required
source: str
- Type: str
UUID of edge source node (tail).
target
Required
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. |
uuid
Required
uuid: str
- Type: str
Universally unique identity.
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Serializable entity flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Serializable entity metadata.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Serializable entity 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. |
edges
Required
edges: typing.List[SGEdge]
- Type: typing.List[SGEdge]
List of edges.
tree
Required
tree: SGNode
- Type: SGNode
Node tree.
version
Required
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. |
uuid
Required
uuid: str
- Type: str
Universally unique identity.
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Serializable entity flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Serializable entity metadata.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Serializable entity tags.
id
Required
id: str
- Type: str
Node id within parent (unique only between parent child nodes).
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Node type.
path
Required
path: str
- Type: str
Node path.
cfn_type
Optional
cfn_type: str
- Type: str
CloudFormation resource type for this node.
children
Optional
children: typing.Mapping[SGNode]
- Type: typing.Mapping[SGNode]
Child node record.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
edges
Optional
edges: typing.List[str]
- Type: typing.List[str]
List of edge UUIDs where this node is the source.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: str
- Type: str
UUID of node parent.
stack
Optional
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_type
Required
reference_type: ReferenceTypeEnum
- Type: ReferenceTypeEnum
source
Required
source: str
- Type: str
target
Required
target: str
- Type: str
value
Optional
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. |
props
Required
- Type: IAppNodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- 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.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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}.
node
Required
- Type: 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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: 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. |
PATH
Required
PATH: str
- Type: str
Fixed path of the App.
UUID
Required
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. |
props
Required
- Type: IAttributeReferenceProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- Type: str
mutate_destroy
def mutate_destroy(
_strict: bool = None
) -> None
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- 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.
edge
Required
- Type: Edge
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.
edge
Required
- Type: Edge
The edge to consume.
mutate_direction
def mutate_direction(
direction: EdgeDirectionEnum
) -> None
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutate_source
def mutate_source(
node: Node
) -> None
Change the edge source.
node
Required
- Type: Node
mutate_target
def mutate_target(
node: Node
) -> None
Change the edge target.
node
Required
- Type: Node
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.
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
edge
Required
- Type: Edge
is_reference
import aws.pdk.cdk_graph
aws.pdk.cdk_graph.AttributeReference.is_reference(
edge: Edge
)
Indicates if edge is a {@link Reference}.
edge
Required
- Type: Edge
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}.
edge
Required
- Type: Edge
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if edge allows destructive mutations.
direction
Required
direction: EdgeDirectionEnum
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edge_type
Required
edge_type: EdgeTypeEnum
- Type: EdgeTypeEnum
Type of edge.
is_closed
Required
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_stack
Required
is_cross_stack: bool
- Type: bool
Indicates if source and target nodes reside in different root stacks.
is_extraneous
Required
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).
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: Node
Edge target is the node being referenced by the source (head).
reference_type
Required
reference_type: ReferenceTypeEnum
- Type: ReferenceTypeEnum
Get type of reference.
value
Required
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_TYPE
Required
ATT_TYPE: str
- Type: str
Attribute defining the type of reference.
PREFIX
Required
PREFIX: str
- Type: str
Edge prefix to denote Fn::GetAtt type reference edge.
ATT_VALUE
Required
ATT_VALUE: str
- Type: str
Attribute key for resolved value of attribute reference.
BaseEntity
- Implements: ISerializableEntity
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. |
props
Required
- Type: IBaseEntityProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- Type: str
mutate_destroy
def mutate_destroy(
strict: bool = None
) -> None
Destroy the entity be removing all references and removing from store.
strict
Optional
- 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.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- 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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
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. |
store
Required
- Type: Store
outdir
Required
- 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.
id
Required
- Type: str
has_artifact_file
def has_artifact_file(
filename: str
) -> bool
Indicates if context has an artifact with filename defined.
filename
Required
- 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.
source
Required
- Type: typing.Union[CdkGraph, ICdkGraphPlugin]
The source of the artifact, such as the name of plugin.
id
Required
- Type: str
Unique id of the artifact.
filepath
Required
- Type: str
Full path where the artifact is stored.
description
Optional
- 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.
source
Required
- Type: typing.Union[CdkGraph, ICdkGraphPlugin]
The source of the artifact, such as the name of plugin.
id
Required
- Type: str
Unique id of the artifact.
filename
Required
- Type: str
Relative name of the file.
data
Required
- Type: str
description
Optional
- 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. |
artifacts
Required
artifacts: typing.Mapping[CdkGraphArtifact]
- Type: typing.Mapping[CdkGraphArtifact]
Get record of all graph artifacts keyed by artifact id.
graph_json
Required
graph_json: CdkGraphArtifact
- Type: CdkGraphArtifact
Get CdkGraph core graph.json
artifact.
outdir
Required
outdir: str
- Type: str
store
Required
store: Store
- Type: 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. |
props
Required
- Type: ICfnResourceNodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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"
resource
Required
- Type: ResourceNode
{@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}.
node
Required
- Type: 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. |
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained in.
is_import
Required
is_import: bool
- Type: bool
Indicates if this CfnResource is imported (eg: s3.Bucket.fromBucketArn
).
resource
Optional
resource: ResourceNode
- Type: 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_TOKEN
Required
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. |
props
Required
- Type: ITypedEdgeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- Type: str
mutate_destroy
def mutate_destroy(
_strict: bool = None
) -> None
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- 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.
edge
Required
- Type: Edge
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.
edge
Required
- Type: Edge
The edge to consume.
mutate_direction
def mutate_direction(
direction: EdgeDirectionEnum
) -> None
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutate_source
def mutate_source(
node: Node
) -> None
Change the edge source.
node
Required
- Type: Node
mutate_target
def mutate_target(
node: Node
) -> None
Change the edge target.
node
Required
- Type: Node
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
edge
Required
- Type: Edge
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). |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if edge allows destructive mutations.
direction
Required
direction: EdgeDirectionEnum
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edge_type
Required
edge_type: EdgeTypeEnum
- Type: EdgeTypeEnum
Type of edge.
is_closed
Required
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_stack
Required
is_cross_stack: bool
- Type: bool
Indicates if source and target nodes reside in different root stacks.
is_extraneous
Required
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).
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: Node
Edge target is the node being referenced by the source (head).
Constants
Name | Type | Description |
---|---|---|
PREFIX |
str |
Edge prefix to denote dependency edge. |
PREFIX
Required
PREFIX: str
- Type: str
Edge prefix to denote dependency edge.
Edge
- Implements: ISerializableEdge
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. |
props
Required
- Type: IEdgeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- Type: str
mutate_destroy
def mutate_destroy(
_strict: bool = None
) -> None
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- 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.
edge
Required
- Type: Edge
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.
edge
Required
- Type: Edge
The edge to consume.
mutate_direction
def mutate_direction(
direction: EdgeDirectionEnum
) -> None
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutate_source
def mutate_source(
node: Node
) -> None
Change the edge source.
node
Required
- Type: Node
mutate_target
def mutate_target(
node: Node
) -> None
Change the edge target.
node
Required
- Type: Node
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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). |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if edge allows destructive mutations.
direction
Required
direction: EdgeDirectionEnum
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edge_type
Required
edge_type: EdgeTypeEnum
- Type: EdgeTypeEnum
Type of edge.
is_closed
Required
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_stack
Required
is_cross_stack: bool
- Type: bool
Indicates if source and target nodes reside in different root stacks.
is_extraneous
Required
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).
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: 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.
- pruneExtraneous()(store);
- collapseCdkOwnedResources()(store);
- collapseCdkWrappers()(store);
- collapseCustomResources()(store);
- ~pruneCustomResources()(store);~
- 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_types
Required
- Type: typing.List[FilterValue]
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_types
Required
- Type: typing.List[FilterValue]
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_types
Required
- Type: typing.List[FilterValue]
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_types
Required
- Type: typing.List[FilterValue]
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.
cluster_types
Optional
- Type: typing.List[NodeTypeEnum]
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.
store
Required
- Type: Store
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. |
props
Required
- Type: ITypedEdgeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- Type: str
mutate_destroy
def mutate_destroy(
_strict: bool = None
) -> None
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- 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.
edge
Required
- Type: Edge
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.
edge
Required
- Type: Edge
The edge to consume.
mutate_direction
def mutate_direction(
direction: EdgeDirectionEnum
) -> None
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutate_source
def mutate_source(
node: Node
) -> None
Change the edge source.
node
Required
- Type: Node
mutate_target
def mutate_target(
node: Node
) -> None
Change the edge target.
node
Required
- Type: Node
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.
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
edge
Required
- Type: Edge
is_reference
import aws.pdk.cdk_graph
aws.pdk.cdk_graph.ImportReference.is_reference(
edge: Edge
)
Indicates if edge is a {@link Reference}.
edge
Required
- Type: Edge
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}.
edge
Required
- Type: Edge
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if edge allows destructive mutations.
direction
Required
direction: EdgeDirectionEnum
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edge_type
Required
edge_type: EdgeTypeEnum
- Type: EdgeTypeEnum
Type of edge.
is_closed
Required
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_stack
Required
is_cross_stack: bool
- Type: bool
Indicates if source and target nodes reside in different root stacks.
is_extraneous
Required
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).
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: Node
Edge target is the node being referenced by the source (head).
reference_type
Required
reference_type: ReferenceTypeEnum
- 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_TYPE
Required
ATT_TYPE: str
- Type: str
Attribute defining the type of reference.
PREFIX
Required
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. |
props
Required
- Type: INestedStackNodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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.
node
Required
- Type: OutputNode
add_parameter
def add_parameter(
node: ParameterNode
) -> None
Associate {@link ParameterNode} with this stack.
node
Required
- Type: ParameterNode
find_output
def find_output(
logical_id: str
) -> OutputNode
Find {@link OutputNode} with logicalId defined by this stack.
logical_id
Required
- Type: str
find_parameter
def find_parameter(
parameter_id: str
) -> ParameterNode
Find {@link ParameterNode} with parameterId defined by this stack.
parameter_id
Required
- Type: str
mutate_remove_output
def mutate_remove_output(
node: OutputNode
) -> bool
Disassociate {@link OutputNode} from this stack.
node
Required
- Type: OutputNode
mutate_remove_parameter
def mutate_remove_parameter(
node: ParameterNode
) -> bool
Disassociate {@link ParameterNode} from this stack.
node
Required
- Type: ParameterNode
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}.
node
Required
- Type: Node
of
import aws.pdk.cdk_graph
aws.pdk.cdk_graph.NestedStackNode.of(
node: Node
)
Gets the {@link StackNode} containing a given resource.
node
Required
- Type: Node
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}.
node
Required
- Type: 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. |
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained in.
exports
Required
exports: typing.List[OutputNode]
- Type: typing.List[OutputNode]
Get all exported {@link OutputNode}s defined by this stack.
outputs
Required
outputs: typing.List[OutputNode]
- Type: typing.List[OutputNode]
Get all {@link OutputNode}s defined by this stack.
parameters
Required
parameters: typing.List[ParameterNode]
- Type: typing.List[ParameterNode]
Get all {@link ParameterNode}s defined by this stack.
stage
Optional
stage: StageNode
- Type: StageNode
Get {@link StageNode} containing this stack.
parent_stack
Optional
parent_stack: StackNode
- Type: StackNode
Get parent stack of this nested stack.
Node
- Implements: ISerializableNode
Node class is the base definition of node entities in the graph, as in standard graph theory.
Initializers
import aws.pdk.cdk_graph
aws.pdk.cdk_graph.Node(
props: INodeProps
)
Name | Type | Description |
---|---|---|
props |
INodeProps |
No description. |
props
Required
- Type: INodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- 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.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: 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. |
props
Required
- Type: IOutputNodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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}.
node
Required
- Type: 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. |
is_export |
bool |
Indicates if {@link OutputNode} is exported. |
value |
typing.Any |
Get the value* attribute. |
export_name |
str |
Get the export name attribute. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained in.
is_export
Required
is_export: bool
- Type: bool
Indicates if {@link OutputNode} is exported.
value
Required
value: typing.Any
- Type: typing.Any
Get the value* attribute.
export_name
Optional
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_NAME
Required
ATTR_EXPORT_NAME: str
- Type: str
Attribute key where output export name is stored.
ATTR_VALUE
Required
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. |
props
Required
- Type: IParameterNodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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}.
node
Required
- Type: 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. |
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained in.
is_stack_reference
Required
is_stack_reference: bool
- Type: bool
Indicates if parameter is a reference to a stack.
parameter_type
Required
parameter_type: typing.Any
- Type: typing.Any
Get the parameter type attribute.
value
Required
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_TYPE
Required
ATTR_TYPE: str
- Type: str
Attribute key where parameter type is stored.
ATTR_VALUE
Required
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. |
props
Required
- Type: IReferenceProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- Type: str
mutate_destroy
def mutate_destroy(
_strict: bool = None
) -> None
Destroy the edge.
Remove all references and remove from store.
_strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- 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.
edge
Required
- Type: Edge
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.
edge
Required
- Type: Edge
The edge to consume.
mutate_direction
def mutate_direction(
direction: EdgeDirectionEnum
) -> None
Change the edge direction.
direction
Required
- Type: EdgeDirectionEnum
mutate_source
def mutate_source(
node: Node
) -> None
Change the edge source.
node
Required
- Type: Node
mutate_target
def mutate_target(
node: Node
) -> None
Change the edge target.
node
Required
- Type: Node
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.
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
chain
Required
- Type: typing.List[typing.Any]
predicate
Required
- Type: IEdgePredicate
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.
edge
Required
- Type: Edge
is_reference
import aws.pdk.cdk_graph
aws.pdk.cdk_graph.Reference.is_reference(
edge: Edge
)
Indicates if edge is a {@link Reference}.
edge
Required
- Type: Edge
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if edge allows destructive mutations.
direction
Required
direction: EdgeDirectionEnum
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edge_type
Required
edge_type: EdgeTypeEnum
- Type: EdgeTypeEnum
Type of edge.
is_closed
Required
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_stack
Required
is_cross_stack: bool
- Type: bool
Indicates if source and target nodes reside in different root stacks.
is_extraneous
Required
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).
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: Node
Edge target is the node being referenced by the source (head).
reference_type
Required
reference_type: ReferenceTypeEnum
- 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_TYPE
Required
ATT_TYPE: str
- Type: str
Attribute defining the type of reference.
PREFIX
Required
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. |
props
Required
- Type: IResourceNodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- 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.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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_resource
Optional
- Type: CfnResourceNode
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}.
node
Required
- Type: 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 |
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Get the cfn properties from the L1 resource that this L2 resource wraps.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this L2 resource or for the L1 resource is wraps.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained in.
is_cdk_owned
Required
is_cdk_owned: bool
- Type: bool
Indicates if this resource is owned by cdk (defined in cdk library).
is_wrapper
Required
is_wrapper: bool
- Type: bool
Indicates if Resource wraps a single CfnResource.
cfn_resource
Optional
cfn_resource: CfnResourceNode
- Type: 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_PROPS
Required
ATT_WRAPPED_CFN_PROPS: str
- Type: str
Attribute key for cfn properties.
ATT_WRAPPED_CFN_TYPE
Required
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. |
store
Required
- Type: Store
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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
_strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
_ancestor
Required
- Type: Node
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
_newparent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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}.
node
Required
- Type: 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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained in.
Constants
Name | Type | Description |
---|---|---|
PATH |
str |
Fixed path of root. |
UUID |
str |
Fixed UUID of root. |
PATH
Required
PATH: str
- Type: str
Fixed path of root.
UUID
Required
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. |
props
Required
- Type: IStackNodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- Type: bool
set_attribute
def set_attribute(
key: str,
value: typing.Any
) -> None
Set attribute.
This will overwrite existing attribute.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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.
node
Required
- Type: OutputNode
add_parameter
def add_parameter(
node: ParameterNode
) -> None
Associate {@link ParameterNode} with this stack.
node
Required
- Type: ParameterNode
find_output
def find_output(
logical_id: str
) -> OutputNode
Find {@link OutputNode} with logicalId defined by this stack.
logical_id
Required
- Type: str
find_parameter
def find_parameter(
parameter_id: str
) -> ParameterNode
Find {@link ParameterNode} with parameterId defined by this stack.
parameter_id
Required
- Type: str
mutate_remove_output
def mutate_remove_output(
node: OutputNode
) -> bool
Disassociate {@link OutputNode} from this stack.
node
Required
- Type: OutputNode
mutate_remove_parameter
def mutate_remove_parameter(
node: ParameterNode
) -> bool
Disassociate {@link ParameterNode} from this stack.
node
Required
- Type: ParameterNode
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}.
node
Required
- Type: Node
of
import aws.pdk.cdk_graph
aws.pdk.cdk_graph.StackNode.of(
node: Node
)
Gets the {@link StackNode} containing a given resource.
node
Required
- Type: 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. |
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. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained in.
exports
Required
exports: typing.List[OutputNode]
- Type: typing.List[OutputNode]
Get all exported {@link OutputNode}s defined by this stack.
outputs
Required
outputs: typing.List[OutputNode]
- Type: typing.List[OutputNode]
Get all {@link OutputNode}s defined by this stack.
parameters
Required
parameters: typing.List[ParameterNode]
- Type: typing.List[ParameterNode]
Get all {@link ParameterNode}s defined by this stack.
stage
Optional
stage: StageNode
- Type: 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. |
props
Required
- Type: ITypedNodeProps
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.
key
Required
- Type: str
value
Required
- Type: typing.Any
add_flag
def add_flag(
flag: FlagEnum
) -> None
Add flag.
flag
Required
- Type: FlagEnum
add_metadata
def add_metadata(
metadata_type: str,
data: typing.Any
) -> None
Add metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
add_tag
def add_tag(
key: str,
value: str
) -> None
Add tag.
key
Required
- Type: str
value
Required
- 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.
data
Required
- Type: IBaseEntityDataProps
The data to apply.
overwrite
Optional
- Type: bool
apply_flags
Optional
- 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_type
Required
- Type: str
get_attribute
def get_attribute(
key: str
) -> typing.Any
Get attribute by key.
key
Required
- Type: str
get_tag
def get_tag(
key: str
) -> str
Get tag by key.
key
Required
- 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.
key
Required
- Type: str
value
Optional
- Type: typing.Any
has_flag
def has_flag(
flag: FlagEnum
) -> bool
Indicates if entity has a given flag.
flag
Required
- Type: FlagEnum
has_metadata
def has_metadata(
metadata_type: str,
data: typing.Any
) -> bool
Indicates if entity has matching metadata entry.
metadata_type
Required
- Type: str
data
Required
- Type: typing.Any
has_tag
def has_tag(
key: str,
value: str = None
) -> bool
Indicates if entity has tag, optionally verifying tag value.
key
Required
- Type: str
value
Optional
- 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.
strict
Optional
- 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.
key
Required
- Type: str
value
Required
- Type: typing.Any
set_tag
def set_tag(
key: str,
value: str
) -> None
Set tag.
Will overwrite existing tag.
key
Required
- Type: str
value
Required
- Type: str
add_child
def add_child(
node: Node
) -> None
Add child node.
node
Required
- Type: Node
add_link
def add_link(
edge: Edge
) -> None
Add link to another node.
edge
Required
- Type: Edge
add_reverse_link
def add_reverse_link(
edge: Edge
) -> None
Add link from another node.
edge
Required
- Type: Edge
does_depend_on
def does_depend_on(
node: Node
) -> bool
Indicates if this node depends on another node.
node
Required
- Type: Node
does_reference
def does_reference(
node: Node
) -> bool
Indicates if this node references another node.
node
Required
- Type: Node
find
def find(
predicate: INodePredicate
) -> Node
Recursively find the nearest sub-node matching predicate.
predicate
Required
- Type: INodePredicate
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.
options
Optional
- Type: IFindNodeOptions
find_all_links
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.
options
Optional
- Type: IFindEdgeOptions
find_ancestor
def find_ancestor(
predicate: INodePredicate,
max: typing.Union[int, float] = None
) -> Node
Find nearest ancestor of this node matching given predicate.
predicate
Required
- Type: INodePredicate
Predicate to match ancestor.
max
Optional
- 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.
id
Required
- Type: str
find_link
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- Type: bool
Indicates that only direct links should be searched.
find_links
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.
predicate
Required
- Type: IEdgePredicate
Edge predicate function to match edge.
reverse
Optional
- Type: bool
Indicates if links are search in reverse order.
follow
Optional
- Type: bool
Indicates if link chain is followed.
direct
Optional
- 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.
key
Required
- Type: str
get_child
def get_child(
id: str
) -> Node
Get child node with given id.
id
Required
- Type: str
get_link_chains
def get_link_chains(
reverse: bool = None
) -> typing.List[typing.List[typing.Any]]
Resolve all link chains.
reverse
Optional
- Type: bool
get_nearest_ancestor
def get_nearest_ancestor(
node: Node
) -> Node
Gets the nearest common ancestor shared between this node and another node.
node
Required
- Type: Node
is_ancestor
def is_ancestor(
ancestor: Node
) -> bool
Indicates if a specific node is an ancestor of this node.
ancestor
Required
- Type: Node
is_child
def is_child(
node: Node
) -> bool
Indicates if specific node is a child of this node.
node
Required
- Type: Node
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.
ancestor
Required
- Type: Node
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_parent
Required
- Type: Node
mutate_move
def mutate_move(
new_parent: Node
) -> None
Move this node into a new parent node.
new_parent
Required
- Type: Node
The parent to move this node to.
mutate_remove_child
def mutate_remove_child(
node: Node
) -> bool
Remove a child node from this node.
node
Required
- Type: Node
mutate_remove_link
def mutate_remove_link(
link: Edge
) -> bool
Remove a link from this node.
link
Required
- Type: Edge
mutate_remove_reverse_link
def mutate_remove_reverse_link(
link: Edge
) -> bool
Remove a link to this node.
link
Required
- Type: Edge
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.
stack
Required
- Type: StackNode
mutate_remove_stack
def mutate_remove_stack(
stack: StackNode
) -> bool
Disassociate {@link StackNode} from this stage.
stack
Required
- Type: StackNode
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}.
node
Required
- Type: Node
of
import aws.pdk.cdk_graph
aws.pdk.cdk_graph.StageNode.of(
node: Node
)
Gets the {@link StageNode} containing a given resource.
node
Required
- Type: 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. |
stacks |
typing.List[StackNode] |
Gets all stacks contained by this stage. |
attributes
Required
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.
flags
Required
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Get readonly list of all flags.
is_destroyed
Required
is_destroyed: bool
- Type: bool
Indicates if the entity has been destroyed (eg: removed from store).
is_mutated
Required
is_mutated: bool
- Type: bool
Indicates if the entity has had destructive mutations applied.
metadata
Required
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Get readonly list of all metadata entries.
store
Required
store: Store
- Type: Store
Reference to the store.
tags
Required
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Get readonly record of all tags.
uuid
Required
uuid: str
- Type: str
Universally unique identifier.
allow_destructive_mutations
Required
allow_destructive_mutations: bool
- Type: bool
Indicates if this node allows destructive mutations.
children
Required
children: typing.List[Node]
- Type: typing.List[Node]
Get all direct child nodes.
depended_on_by
Required
depended_on_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that depend on this node.
dependencies
Required
dependencies: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node depends on.
dependency_links
Required
dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the source.
depth
Required
depth: typing.Union[int, float]
- Type: typing.Union[int, float]
Indicates the depth of the node relative to root (0).
id
Required
id: str
- Type: str
Node id, which is only unique within parent scope.
is_asset
Required
is_asset: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.ASSET}.
is_cfn_fqn
Required
is_cfn_fqn: bool
- Type: bool
Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn*
construct.
is_cluster
Required
is_cluster: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.CLUSTER}.
is_custom_resource
Required
is_custom_resource: bool
- Type: bool
Indicates if node is a Custom Resource.
is_extraneous
Required
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_container
Required
is_graph_container: bool
- Type: bool
Indicates if this node is considered a {@link FlagEnum.GRAPH_CONTAINER}.
is_leaf
Required
is_leaf: bool
- Type: bool
Indicates if this node is a leaf node, which means it does not have children.
is_top_level
Required
is_top_level: bool
- Type: bool
Indicates if node is direct child of the graph root node.
links
Required
links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the source.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
path
Required
path: str
- Type: str
Path of the node.
referenced_by
Required
referenced_by: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that reference this node.
reference_links
Required
reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the source.
references
Required
references: typing.List[Node]
- Type: typing.List[Node]
Get list of Nodes that this node references.
reverse_dependency_links
Required
reverse_dependency_links: typing.List[Dependency]
- Type: typing.List[Dependency]
Gets list of {@link Dependency} links (edges) where this node is the target.
reverse_links
Required
reverse_links: typing.List[Edge]
- Type: typing.List[Edge]
Gets all links (edges) in which this node is the target.
reverse_reference_links
Required
reverse_reference_links: typing.List[Reference]
- Type: typing.List[Reference]
Gets list of {@link Reference} links (edges) where this node is the target.
scopes
Required
scopes: typing.List[Node]
- Type: typing.List[Node]
Gets descending ordered list of ancestors from the root.
siblings
Required
siblings: typing.List[Node]
- Type: typing.List[Node]
Get list of siblings of this node.
cfn_props
Optional
cfn_props: PlainObject
- Type: PlainObject
Gets CloudFormation properties for this node.
cfn_type
Optional
cfn_type: str
- Type: str
Get the CloudFormation resource type for this node.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
construct_info_fqn
Optional
construct_info_fqn: str
- Type: str
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
Only the root node should not have parent.
root_stack
Optional
root_stack: StackNode
- Type: StackNode
Get root stack.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained in.
stacks
Required
stacks: typing.List[StackNode]
- Type: typing.List[StackNode]
Gets all stacks contained by this stage.
Store
- Implements: ISerializableGraphStore
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_mutations
Optional
- 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.
edge
Required
- Type: Edge
add_node
def add_node(
node: Node
) -> None
Add node to the store.
node
Required
- Type: Node
add_stack
def add_stack(
stack: StackNode
) -> None
Add stack node to the store.
stack
Required
- Type: StackNode
add_stage
def add_stage(
stage: StageNode
) -> None
Add stage to the store.
stage
Required
- Type: StageNode
clone
def clone(
allow_destructive_mutations: bool = None
) -> Store
Clone the store to allow destructive mutations.
allow_destructive_mutations
Optional
- 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.
stack
Required
- Type: StackNode
logical_id
Required
- 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.
value
Required
- 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.
stack
Required
- Type: StackNode
logical_id
Required
- 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>
).
uid
Required
- Type: str
get_edge
def get_edge(
uuid: str
) -> Edge
Get stored edge by UUID.
uuid
Required
- Type: str
get_node
def get_node(
uuid: str
) -> Node
Get stored node by UUID.
uuid
Required
- Type: str
get_stack
def get_stack(
uuid: str
) -> StackNode
Get stored stack node by UUID.
uuid
Required
- Type: str
get_stage
def get_stage(
uuid: str
) -> StageNode
Get stored stage node by UUID.
uuid
Required
- Type: str
mutate_remove_edge
def mutate_remove_edge(
edge: Edge
) -> bool
Remove edge from the store.
edge
Required
- Type: Edge
mutate_remove_node
def mutate_remove_node(
node: Node
) -> bool
Remove node from the store.
node
Required
- Type: Node
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_token
Required
- Type: str
resource
Required
- Type: Node
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.
stack
Required
- Type: StackNode
logical_id
Required
- Type: str
resource
Required
- Type: Node
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.
edges
Required
- Type: typing.List[SGEdge]
List of edges.
tree
Required
- Type: SGNode
Node tree.
version
Required
- 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_mutations
Required
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.
counts
Required
counts: IStoreCounts
- Type: IStoreCounts
Get record of all store counters.
edges
Required
edges: typing.List[Edge]
- Type: typing.List[Edge]
Gets all stored edges.
nodes
Required
nodes: typing.List[Node]
- Type: typing.List[Node]
Gets all stored nodes.
root
Required
root: RootNode
- Type: 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_stacks
Required
root_stacks: typing.List[StackNode]
- Type: typing.List[StackNode]
Gets all stored root stack nodes.
stacks
Required
stacks: typing.List[StackNode]
- Type: typing.List[StackNode]
Gets all stored stack nodes.
stages
Required
stages: typing.List[StageNode]
- Type: typing.List[StageNode]
Gets all stored stage nodes.
version
Required
version: str
- Type: str
Current SemVer version of the store.
Protocols
IAppNodeProps
-
Extends: IBaseEntityDataProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
IAttributeReferenceProps
-
Extends: ITypedEdgeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: Node
Edge target is the node being referenced by the source (head).
value
Required
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
- Implemented By: IAppNodeProps, IAttributeReferenceProps, IBaseEntityDataProps, IBaseEntityProps, ICfnResourceNodeProps, IEdgeProps, INestedStackNodeProps, INodeProps, IOutputNodeProps, IParameterNodeProps, IReferenceProps, IResourceNodeProps, IStackNodeProps, ITypedEdgeProps, ITypedNodeProps
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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
IBaseEntityProps
-
Extends: IBaseEntityDataProps
-
Implemented By: IAttributeReferenceProps, IBaseEntityProps, ICfnResourceNodeProps, IEdgeProps, INestedStackNodeProps, INodeProps, IOutputNodeProps, IParameterNodeProps, IReferenceProps, IResourceNodeProps, IStackNodeProps, ITypedEdgeProps, ITypedNodeProps
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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
ICdkGraphPlugin
- Implemented By: 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. |
id
Required
id: str
- Type: str
Unique identifier for this plugin.
version
Required
version: str
- Type: str
Plugin version.
dependencies
Optional
dependencies: typing.List[str]
- Type: typing.List[str]
List of plugins this plugin depends on, including optional semver version (eg: ["foo", "bar@1.2"]).
bind
Required
bind: IGraphPluginBindCallback
- Type: IGraphPluginBindCallback
Binds the plugin to the CdkGraph instance.
Enables plugins to receive base configs.
inspect
Optional
inspect: IGraphVisitorCallback
- Type: IGraphVisitorCallback
Node visitor callback for construct tree traversal.
This follows IAspect.visit pattern, but the order of visitor traversal in managed by the CdkGraph.
report
Optional
report: IGraphReportCallback
- Type: 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.
synthesize
Optional
synthesize: IGraphSynthesizeCallback
- Type: 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
-
Extends: ITypedNodeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
id
Required
id: str
- Type: str
Node id, which is unique within parent scope.
path
Required
path: str
- Type: str
Path of the node.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained.
import_arn_token
Optional
import_arn_token: str
- Type: str
node_type
Optional
node_type: NodeTypeEnum
- Type: NodeTypeEnum
IEdgePredicate
- Implemented By: IEdgePredicate
Predicate to match edge.
Methods
Name | Description |
---|---|
filter |
No description. |
filter
def filter(
edge: Edge
) -> bool
edge
Required
- Type: Edge
IEdgeProps
-
Extends: ITypedEdgeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: Node
Edge target is the node being referenced by the source (head).
direction
Required
direction: EdgeDirectionEnum
- Type: EdgeDirectionEnum
Indicates the direction in which the edge is directed.
edge_type
Required
edge_type: EdgeTypeEnum
- Type: EdgeTypeEnum
Type of edge.
IFilterFocusCallback
- Implemented By: IFilterFocusCallback
Determines focus node of filter plan.
Methods
Name | Description |
---|---|
filter |
No description. |
filter
def filter(
store: Store
) -> Node
store
Required
- Type: Store
IFindEdgeOptions
- Implemented By: 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. |
order
Optional
order: ConstructOrder
- Type: constructs.ConstructOrder
The order of traversal during search path.
predicate
Optional
predicate: IEdgePredicate
- Type: IEdgePredicate
The predicate to match edges(s).
reverse
Optional
reverse: bool
- Type: bool
Indicates reverse order.
IFindNodeOptions
- Implemented By: 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). |
order
Optional
order: ConstructOrder
- Type: constructs.ConstructOrder
The order of traversal during search path.
predicate
Optional
predicate: INodePredicate
- Type: INodePredicate
The predicate to match node(s).
IGraphPluginBindCallback
- Implemented By: IGraphPluginBindCallback
Callback signature for graph Plugin.bind
operation.
IGraphReportCallback
- Implemented By: IGraphReportCallback
Callback signature for graph Plugin.report
operation.
IGraphStoreFilter
- Implemented By: 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
store
Required
- Type: Store
IGraphSynthesizeCallback
- Implemented By: IGraphSynthesizeCallback
Callback signature for graph Plugin.synthesize
operation.
IGraphVisitorCallback
- Implemented By: IGraphVisitorCallback
Callback signature for graph Plugin.inspect
operation.
INestedStackNodeProps
-
Extends: IStackNodeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
id
Required
id: str
- Type: str
Node id, which is unique within parent scope.
path
Required
path: str
- Type: str
Path of the node.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained.
node_type
Optional
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
parent_stack
Required
parent_stack: StackNode
- Type: StackNode
Parent stack.
INodePredicate
- Implemented By: INodePredicate
Predicate to match node.
Methods
Name | Description |
---|---|
filter |
No description. |
filter
def filter(
node: Node
) -> bool
node
Required
- Type: Node
INodeProps
-
Extends: ITypedNodeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
id
Required
id: str
- Type: str
Node id, which is unique within parent scope.
path
Required
path: str
- Type: str
Path of the node.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained.
node_type
Required
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
IOutputNodeProps
-
Extends: ITypedNodeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
id
Required
id: str
- Type: str
Node id, which is unique within parent scope.
path
Required
path: str
- Type: str
Path of the node.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained.
value
Required
value: typing.Any
- Type: typing.Any
Resolved output value.
description
Optional
description: str
- Type: str
Description.
export_name
Optional
export_name: str
- Type: str
Export name.
IParameterNodeProps
-
Extends: ITypedNodeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
id
Required
id: str
- Type: str
Node id, which is unique within parent scope.
path
Required
path: str
- Type: str
Path of the node.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained.
parameter_type
Required
parameter_type: str
- Type: str
Parameter type.
value
Required
value: typing.Any
- Type: typing.Any
Resolved value.
description
Optional
description: str
- Type: str
Description.
IReferenceProps
-
Extends: ITypedEdgeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: Node
Edge target is the node being referenced by the source (head).
reference_type
Optional
reference_type: ReferenceTypeEnum
- Type: ReferenceTypeEnum
Type of reference.
IResourceNodeProps
-
Extends: ITypedNodeProps
-
Implemented By: 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
id
Required
id: str
- Type: str
Node id, which is unique within parent scope.
path
Required
path: str
- Type: str
Path of the node.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained.
cdk_owned
Required
cdk_owned: bool
- Type: bool
Indicates if this resource is owned by cdk (defined in cdk library).
node_type
Optional
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
ISerializableEdge
- Implemented By: AttributeReference, Dependency, Edge, ImportReference, Reference, ISerializableEdge
Interface for serializable graph edge entity.
ISerializableEntity
- Implemented By: AppNode, AttributeReference, BaseEntity, CfnResourceNode, Dependency, Edge, ImportReference, NestedStackNode, Node, OutputNode, ParameterNode, Reference, ResourceNode, RootNode, StackNode, StageNode, ISerializableEntity
Interface for serializable graph entities.
ISerializableGraphStore
- Implemented By: Store, ISerializableGraphStore
Interface for serializable graph store.
Methods
Name | Description |
---|---|
serialize |
No description. |
serialize
def serialize() -> SGGraphStore
ISerializableNode
- Implemented By: AppNode, CfnResourceNode, NestedStackNode, Node, OutputNode, ParameterNode, ResourceNode, RootNode, StackNode, StageNode, ISerializableNode
Interface for serializable graph node entity.
IStackNodeProps
-
Extends: ITypedNodeProps
-
Implemented By: INestedStackNodeProps, 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
id
Required
id: str
- Type: str
Node id, which is unique within parent scope.
path
Required
path: str
- Type: str
Path of the node.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
stack
Optional
stack: StackNode
- Type: StackNode
Stack the node is contained.
node_type
Optional
node_type: NodeTypeEnum
- Type: NodeTypeEnum
Type of node.
IStoreCounts
- Implemented By: 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_resources
Required
cfn_resources: typing.Mapping[typing.Union[int, float]]
- Type: typing.Mapping[typing.Union[int, float]]
Returns {@link ICounterRecord} containing total number of each cfnResourceType.
edges
Required
edges: typing.Union[int, float]
- Type: typing.Union[int, float]
Counts total number of edges in the store.
edge_types
Required
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}).
nodes
Required
nodes: typing.Union[int, float]
- Type: typing.Union[int, float]
Counts total number of nodes in the store.
node_types
Required
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}).
stacks
Required
stacks: typing.Union[int, float]
- Type: typing.Union[int, float]
Counts total number of stacks in the store.
stages
Required
stages: typing.Union[int, float]
- Type: typing.Union[int, float]
Counts total number of stages in the store.
ITypedEdgeProps
-
Extends: IBaseEntityProps
-
Implemented By: IAttributeReferenceProps, IEdgeProps, IReferenceProps, 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). |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
source
Required
source: Node
- Type: Node
Edge source is the node that defines the edge (tail).
target
Required
target: Node
- Type: Node
Edge target is the node being referenced by the source (head).
ITypedNodeProps
-
Extends: IBaseEntityProps
-
Implemented By: ICfnResourceNodeProps, INestedStackNodeProps, INodeProps, IOutputNodeProps, IParameterNodeProps, IResourceNodeProps, IStackNodeProps, 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. |
attributes
Optional
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.
flags
Optional
flags: typing.List[FlagEnum]
- Type: typing.List[FlagEnum]
Flags.
metadata
Optional
metadata: typing.List[MetadataEntry]
- Type: typing.List[constructs.MetadataEntry]
Metadata entries.
tags
Optional
tags: typing.Mapping[str]
- Type: typing.Mapping[str]
Tags.
store
Required
store: Store
- Type: Store
Store.
uuid
Required
uuid: str
- Type: str
UUID.
id
Required
id: str
- Type: str
Node id, which is unique within parent scope.
path
Required
path: str
- Type: str
Path of the node.
cfn_type
Optional
cfn_type: str
- Type: str
Type of CloudFormation resource.
construct_info
Optional
construct_info: ConstructInfo
- Type: ConstructInfo
Synthesized construct information defining jii resolution data.
logical_id
Optional
logical_id: str
- Type: str
Logical id of the node, which is only unique within containing stack.
parent
Optional
parent: Node
- Type: Node
Parent node.
stack
Optional
stack: StackNode
- Type: 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.
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()
).