Class Node

    • Constructor Detail

      • Node

        protected Node​(software.amazon.jsii.JsiiObjectRef objRef)
      • Node

        protected Node​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • Node

        @Stability(Experimental)
        public Node​(@NotNull
                    INodeProps props)
        Parameters:
        props - This parameter is required.
    • Method Detail

      • addChild

        @Stability(Experimental)
        public void addChild​(@NotNull
                             Node node)
        (experimental) Add child node.

        Parameters:
        node - This parameter is required.
      • addLink

        @Stability(Experimental)
        public void addLink​(@NotNull
                            Edge edge)
        (experimental) Add link to another node.

        Parameters:
        edge - This parameter is required.
      • addReverseLink

        @Stability(Experimental)
        public void addReverseLink​(@NotNull
                                   Edge edge)
        (experimental) Add link from another node.

        Parameters:
        edge - This parameter is required.
      • doesDependOn

        @Stability(Experimental)
        @NotNull
        public Boolean doesDependOn​(@NotNull
                                    Node node)
        (experimental) Indicates if this node depends on another node.

        Parameters:
        node - This parameter is required.
      • doesReference

        @Stability(Experimental)
        @NotNull
        public Boolean doesReference​(@NotNull
                                     Node node)
        (experimental) Indicates if this node references another node.

        Parameters:
        node - This parameter is required.
      • find

        @Stability(Experimental)
        @Nullable
        public Node find​(@NotNull
                         INodePredicate predicate)
        (experimental) Recursively find the nearest sub-node matching predicate.

        Parameters:
        predicate - This parameter is required.
      • findAll

        @Stability(Experimental)
        @NotNull
        public List<Node> findAll​(@Nullable
                                  IFindNodeOptions options)
        (experimental) Return this construct and all of its sub-nodes in the given order.

        Optionally filter nodes based on predicate.

        Parameters:
        options -
      • findAll

        @Stability(Experimental)
        @NotNull
        public List<Node> findAll()
        (experimental) Return this construct and all of its sub-nodes in the given order.

        Optionally filter nodes based on predicate.

      • findAllLinks

        @Stability(Experimental)
        @NotNull
        public List<Edge> findAllLinks​(@Nullable
                                       IFindEdgeOptions options)
        (experimental) Return all direct links of this node and that of all sub-nodes.

        Optionally filter links based on predicate.

        Parameters:
        options -
      • findAllLinks

        @Stability(Experimental)
        @NotNull
        public List<Edge> findAllLinks()
        (experimental) Return all direct links of this node and that of all sub-nodes.

        Optionally filter links based on predicate.

      • findAncestor

        @Stability(Experimental)
        @Nullable
        public Node findAncestor​(@NotNull
                                 INodePredicate predicate,
                                 @Nullable
                                 Number max)
        (experimental) Find nearest ancestor of this node matching given predicate.

        Parameters:
        predicate -
        • Predicate to match ancestor.
        This parameter is required.
        max -
      • findAncestor

        @Stability(Experimental)
        @Nullable
        public Node findAncestor​(@NotNull
                                 INodePredicate predicate)
        (experimental) Find nearest ancestor of this node matching given predicate.

        Parameters:
        predicate -
        • Predicate to match ancestor.
        This parameter is required.
      • findChild

        @Stability(Experimental)
        @Nullable
        public Node findChild​(@NotNull
                              String id)
        (experimental) Find child with given id.

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

        Parameters:
        id - This parameter is required.
      • findLink

        @Stability(Experimental)
        @Nullable
        public Edge findLink​(@NotNull
                             IEdgePredicate predicate,
                             @Nullable
                             Boolean reverse,
                             @Nullable
                             Boolean follow,
                             @Nullable
                             Boolean direct)
        (experimental) 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.

        Parameters:
        predicate - Edge predicate function to match edge. This parameter is required.
        reverse - Indicates if links are search in reverse order.
        follow - Indicates if link chain is followed.
        direct - Indicates that only direct links should be searched.
      • findLink

        @Stability(Experimental)
        @Nullable
        public Edge findLink​(@NotNull
                             IEdgePredicate predicate,
                             @Nullable
                             Boolean reverse,
                             @Nullable
                             Boolean follow)
        (experimental) 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.

        Parameters:
        predicate - Edge predicate function to match edge. This parameter is required.
        reverse - Indicates if links are search in reverse order.
        follow - Indicates if link chain is followed.
      • findLink

        @Stability(Experimental)
        @Nullable
        public Edge findLink​(@NotNull
                             IEdgePredicate predicate,
                             @Nullable
                             Boolean reverse)
        (experimental) 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.

        Parameters:
        predicate - Edge predicate function to match edge. This parameter is required.
        reverse - Indicates if links are search in reverse order.
      • findLink

        @Stability(Experimental)
        @Nullable
        public Edge findLink​(@NotNull
                             IEdgePredicate predicate)
        (experimental) 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.

        Parameters:
        predicate - Edge predicate function to match edge. This parameter is required.
      • findLinks

        @Stability(Experimental)
        @NotNull
        public List<Edge> findLinks​(@NotNull
                                    IEdgePredicate predicate,
                                    @Nullable
                                    Boolean reverse,
                                    @Nullable
                                    Boolean follow,
                                    @Nullable
                                    Boolean direct)
        (experimental) 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.

        Parameters:
        predicate - Edge predicate function to match edge. This parameter is required.
        reverse - Indicates if links are search in reverse order.
        follow - Indicates if link chain is followed.
        direct - Indicates that only direct links should be searched.
      • findLinks

        @Stability(Experimental)
        @NotNull
        public List<Edge> findLinks​(@NotNull
                                    IEdgePredicate predicate,
                                    @Nullable
                                    Boolean reverse,
                                    @Nullable
                                    Boolean follow)
        (experimental) 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.

        Parameters:
        predicate - Edge predicate function to match edge. This parameter is required.
        reverse - Indicates if links are search in reverse order.
        follow - Indicates if link chain is followed.
      • findLinks

        @Stability(Experimental)
        @NotNull
        public List<Edge> findLinks​(@NotNull
                                    IEdgePredicate predicate,
                                    @Nullable
                                    Boolean reverse)
        (experimental) 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.

        Parameters:
        predicate - Edge predicate function to match edge. This parameter is required.
        reverse - Indicates if links are search in reverse order.
      • findLinks

        @Stability(Experimental)
        @NotNull
        public List<Edge> findLinks​(@NotNull
                                    IEdgePredicate predicate)
        (experimental) 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.

        Parameters:
        predicate - Edge predicate function to match edge. This parameter is required.
      • getCfnProp

        @Stability(Experimental)
        @Nullable
        public Object getCfnProp​(@NotNull
                                 String key)
        (experimental) Get specific CloudFormation property.

        Parameters:
        key - This parameter is required.
      • getChild

        @Stability(Experimental)
        @NotNull
        public Node getChild​(@NotNull
                             String id)
        (experimental) Get child node with given id.

        Parameters:
        id - This parameter is required.
      • getLinkChains

        @Stability(Experimental)
        @NotNull
        public List<List<Object>> getLinkChains​(@Nullable
                                                Boolean reverse)
        (experimental) Resolve all link chains.

        Parameters:
        reverse -
        See Also:
        EdgeChain
      • getLinkChains

        @Stability(Experimental)
        @NotNull
        public List<List<Object>> getLinkChains()
        (experimental) Resolve all link chains.

        See Also:
        EdgeChain
      • getNearestAncestor

        @Stability(Experimental)
        @NotNull
        public Node getNearestAncestor​(@NotNull
                                       Node node)
        (experimental) Gets the nearest common ancestor shared between this node and another node.

        Parameters:
        node - This parameter is required.
      • isAncestor

        @Stability(Experimental)
        @NotNull
        public Boolean isAncestor​(@NotNull
                                  Node ancestor)
        (experimental) Indicates if a specific node is an ancestor of this node.

        Parameters:
        ancestor - This parameter is required.
      • isChild

        @Stability(Experimental)
        @NotNull
        public Boolean isChild​(@NotNull
                               Node node)
        (experimental) Indicates if specific node is a child of this node.

        Parameters:
        node - This parameter is required.
      • mutateCollapse

        @Stability(Experimental)
        public void mutateCollapse()
        (experimental) Collapses all sub-nodes of this node into this node.
      • mutateCollapseTo

        @Stability(Experimental)
        @NotNull
        public Node mutateCollapseTo​(@NotNull
                                     Node ancestor)
        (experimental) Collapses this node into an ancestor.

        Parameters:
        ancestor - This parameter is required.
      • mutateCollapseToParent

        @Stability(Experimental)
        @NotNull
        public Node mutateCollapseToParent()
        (experimental) Collapses this node into it's parent node.
      • mutateDestroy

        @Stability(Experimental)
        public void mutateDestroy​(@Nullable
                                  Boolean strict)
        (experimental) Destroys this node by removing all references and removing this node from the store.

        Specified by:
        mutateDestroy in class BaseEntity
        Parameters:
        strict -
        • Indicates that this node must not have references.
      • mutateDestroy

        @Stability(Experimental)
        public void mutateDestroy()
        (experimental) Destroys this node by removing all references and removing this node from the store.
        Specified by:
        mutateDestroy in class BaseEntity
      • mutateHoist

        @Stability(Experimental)
        public void mutateHoist​(@NotNull
                                Node newParent)
        (experimental) Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.

        Parameters:
        newParent - This parameter is required.
      • mutateMove

        @Stability(Experimental)
        public void mutateMove​(@NotNull
                               Node newParent)
        (experimental) Move this node into a new parent node.

        Parameters:
        newParent -
        • The parent to move this node to.
        This parameter is required.
      • mutateRemoveChild

        @Stability(Experimental)
        @NotNull
        public Boolean mutateRemoveChild​(@NotNull
                                         Node node)
        (experimental) Remove a child node from this node.

        Parameters:
        node - This parameter is required.
      • mutateRemoveLink

        @Stability(Experimental)
        @NotNull
        public Boolean mutateRemoveLink​(@NotNull
                                        Edge link)
        (experimental) Remove a link from this node.

        Parameters:
        link - This parameter is required.
      • mutateRemoveReverseLink

        @Stability(Experimental)
        @NotNull
        public Boolean mutateRemoveReverseLink​(@NotNull
                                               Edge link)
        (experimental) Remove a link to this node.

        Parameters:
        link - This parameter is required.
      • mutateUncluster

        @Stability(Experimental)
        public void mutateUncluster()
        (experimental) Hoist all children to parent and collapse node to parent.
      • toString

        @Stability(Experimental)
        @NotNull
        public String toString()
        (experimental) Get string representation of this node.
        Overrides:
        toString in class Object
      • getAllowDestructiveMutations

        @Stability(Experimental)
        @NotNull
        public Boolean getAllowDestructiveMutations()
        (experimental) Indicates if this node allows destructive mutations.

        See Also:
        Store.allowDestructiveMutations
      • getChildren

        @Stability(Experimental)
        @NotNull
        public List<Node> getChildren()
        (experimental) Get all direct child nodes.
      • getDependedOnBy

        @Stability(Experimental)
        @NotNull
        public List<Node> getDependedOnBy()
        (experimental) Get list of Nodes that depend on this node.

        See Also:
        Node.reverseDependencyLinks
      • getDependencies

        @Stability(Experimental)
        @NotNull
        public List<Node> getDependencies()
        (experimental) Get list of Nodes that this node depends on.

        See Also:
        Node.dependencyLinks
      • getDependencyLinks

        @Stability(Experimental)
        @NotNull
        public List<Dependency> getDependencyLinks()
        (experimental) Gets list of Dependency links (edges) where this node is the **source**.
      • getDepth

        @Stability(Experimental)
        @NotNull
        public Number getDepth()
        (experimental) Indicates the depth of the node relative to root (0).
      • getId

        @Stability(Experimental)
        @NotNull
        public String getId()
        (experimental) Node id, which is only unique within parent scope.
      • getIsAsset

        @Stability(Experimental)
        @NotNull
        public Boolean getIsAsset()
        (experimental) Indicates if this node is considered a FlagEnum.ASSET.
      • getIsCfnFqn

        @Stability(Experimental)
        @NotNull
        public Boolean getIsCfnFqn()
        (experimental) Indicates if node ConstructInfoFqn denotes a aws-cdk-lib.*.Cfn* construct.

        See Also:
        FlagEnum.CFN_FQN
      • getIsCluster

        @Stability(Experimental)
        @NotNull
        public Boolean getIsCluster()
        (experimental) Indicates if this node is considered a FlagEnum.CLUSTER.
      • getIsCustomResource

        @Stability(Experimental)
        @NotNull
        public Boolean getIsCustomResource()
        (experimental) Indicates if node is a Custom Resource.
      • getIsExtraneous

        @Stability(Experimental)
        @NotNull
        public Boolean getIsExtraneous()
        (experimental) Indicates if this node is considered a FlagEnum.EXTRANEOUS node or determined to be extraneous: - Clusters that contain no children.
      • getIsGraphContainer

        @Stability(Experimental)
        @NotNull
        public Boolean getIsGraphContainer()
        (experimental) Indicates if this node is considered a FlagEnum.GRAPH_CONTAINER.
      • getIsLeaf

        @Stability(Experimental)
        @NotNull
        public Boolean getIsLeaf()
        (experimental) Indicates if this node is a leaf node, which means it does not have children.
      • getIsTopLevel

        @Stability(Experimental)
        @NotNull
        public Boolean getIsTopLevel()
        (experimental) Indicates if node is direct child of the graph root node.
      • getLinks

        @Stability(Experimental)
        @NotNull
        public List<Edge> getLinks()
        (experimental) Gets all links (edges) in which this node is the source.
      • getNodeType

        @Stability(Experimental)
        @NotNull
        public NodeTypeEnum getNodeType()
        (experimental) Type of node.
      • getPath

        @Stability(Experimental)
        @NotNull
        public String getPath()
        (experimental) Path of the node.
      • getReferencedBy

        @Stability(Experimental)
        @NotNull
        public List<Node> getReferencedBy()
        (experimental) Get list of Nodes that reference this node.

        See Also:
        Node.reverseReferenceLinks
      • getReferenceLinks

        @Stability(Experimental)
        @NotNull
        public List<Reference> getReferenceLinks()
        (experimental) Gets list of Reference links (edges) where this node is the **source**.
      • getReferences

        @Stability(Experimental)
        @NotNull
        public List<Node> getReferences()
        (experimental) Get list of Nodes that this node references.

        See Also:
        Node.referenceLinks
      • getReverseDependencyLinks

        @Stability(Experimental)
        @NotNull
        public List<Dependency> getReverseDependencyLinks()
        (experimental) Gets list of Dependency links (edges) where this node is the **target**.
      • getReverseLinks

        @Stability(Experimental)
        @NotNull
        public List<Edge> getReverseLinks()
        (experimental) Gets all links (edges) in which this node is the target.
      • getReverseReferenceLinks

        @Stability(Experimental)
        @NotNull
        public List<Reference> getReverseReferenceLinks()
        (experimental) Gets list of Reference links (edges) where this node is the **target**.
      • getScopes

        @Stability(Experimental)
        @NotNull
        public List<Node> getScopes()
        (experimental) Gets descending ordered list of ancestors from the root.
      • getSiblings

        @Stability(Experimental)
        @NotNull
        public List<Node> getSiblings()
        (experimental) Get list of siblings of this node.
      • getCfnProps

        @Stability(Experimental)
        @Nullable
        public PlainObject getCfnProps()
        (experimental) Gets CloudFormation properties for this node.
      • getCfnType

        @Stability(Experimental)
        @Nullable
        public String getCfnType()
        (experimental) Get the CloudFormation resource type for this node.
      • getConstructInfo

        @Stability(Experimental)
        @Nullable
        public ConstructInfo getConstructInfo()
        (experimental) Synthesized construct information defining jii resolution data.
      • getConstructInfoFqn

        @Stability(Experimental)
        @Nullable
        public String getConstructInfoFqn()
        (experimental) Synthesized construct information defining jii resolution data.
      • getLogicalId

        @Stability(Experimental)
        @Nullable
        public String getLogicalId()
        (experimental) Logical id of the node, which is only unique within containing stack.
      • getParent

        @Stability(Experimental)
        @Nullable
        public Node getParent()
        (experimental) Parent node.

        Only the root node should not have parent.

      • getRootStack

        @Stability(Experimental)
        @Nullable
        public StackNode getRootStack()
        (experimental) Get root stack.
      • getStack

        @Stability(Experimental)
        @Nullable
        public StackNode getStack()
        (experimental) Stack the node is contained in.