Class VirtualNode

All Implemented Interfaces:
IConstruct, IDependable, IResource, IVirtualNode,, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.184Z") @Stability(Stable) public class VirtualNode extends Resource implements IVirtualNode
VirtualNode represents a newly defined AppMesh VirtualNode.

Any inbound traffic that your virtual node expects should be specified as a listener. Any outbound traffic that your virtual node expects to reach should be specified as a backend.


 Mesh mesh;
 // Cloud Map service discovery is currently required for host ejection by outlier detection
 Vpc vpc = new Vpc(this, "vpc");
 PrivateDnsNamespace namespace = PrivateDnsNamespace.Builder.create(this, "test-namespace")
 Service service = namespace.createService("Svc");
 VirtualNode node = mesh.addVirtualNode("virtual-node", VirtualNodeBaseProps.builder()

See Also:
  • Constructor Details

    • VirtualNode

      protected VirtualNode( objRef)
    • VirtualNode

      protected VirtualNode( initializationMode)
    • VirtualNode

      @Stability(Stable) public VirtualNode(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VirtualNodeProps props)
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromVirtualNodeArn

      @Stability(Stable) @NotNull public static IVirtualNode fromVirtualNodeArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String virtualNodeArn)
      Import an existing VirtualNode given an ARN.

      scope - This parameter is required.
      id - This parameter is required.
      virtualNodeArn - This parameter is required.
    • fromVirtualNodeAttributes

      @Stability(Stable) @NotNull public static IVirtualNode fromVirtualNodeAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VirtualNodeAttributes attrs)
      Import an existing VirtualNode given its name.

      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • addBackend

      @Stability(Stable) public void addBackend(@NotNull Backend backend)
      Add a Virtual Services that this node is expected to send outbound traffic to.

      backend - This parameter is required.
    • addListener

      @Stability(Stable) public void addListener(@NotNull VirtualNodeListener listener)
      Utility method to add an inbound listener for this VirtualNode.

      Note: At this time, Virtual Nodes support at most one listener. Adding more than one will result in a failure to deploy the CloudFormation stack. However, the App Mesh team has plans to add support for multiple listeners on Virtual Nodes and Virtual Routers.

      listener - This parameter is required.
      See Also:
    • grantStreamAggregatedResources

      @Stability(Stable) @NotNull public Grant grantStreamAggregatedResources(@NotNull IGrantable identity)
      Grants the given entity appmesh:StreamAggregatedResources.

      Specified by:
      grantStreamAggregatedResources in interface IVirtualNode
      identity - This parameter is required.
    • getMesh

      @Stability(Stable) @NotNull public IMesh getMesh()
      The Mesh which the VirtualNode belongs to.
      Specified by:
      getMesh in interface IVirtualNode
    • getVirtualNodeArn

      @Stability(Stable) @NotNull public String getVirtualNodeArn()
      The Amazon Resource Name belonging to the VirtualNode.
      Specified by:
      getVirtualNodeArn in interface IVirtualNode
    • getVirtualNodeName

      @Stability(Stable) @NotNull public String getVirtualNodeName()
      The name of the VirtualNode.
      Specified by:
      getVirtualNodeName in interface IVirtualNode