Class VirtualNode
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.appmesh.VirtualNode
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IVirtualNode
,software.amazon.jsii.JsiiSerializable
,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.
Example:
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") .vpc(vpc) .name("domain.local") .build(); Service service = namespace.createService("Svc"); VirtualNode node = mesh.addVirtualNode("virtual-node", VirtualNodeBaseProps.builder() .serviceDiscovery(ServiceDiscovery.cloudMap(service)) .listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder() .outlierDetection(OutlierDetection.builder() .baseEjectionDuration(Duration.seconds(10)) .interval(Duration.seconds(30)) .maxEjectionPercent(50) .maxServerErrors(5) .build()) .build()))) .build());
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.appmesh.IVirtualNode
IVirtualNode.Jsii$Default, IVirtualNode.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
VirtualNode
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
VirtualNode
(software.amazon.jsii.JsiiObjectRef objRef) VirtualNode
(software.constructs.Construct scope, String id, VirtualNodeProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBackend
(Backend backend) Add a Virtual Services that this node is expected to send outbound traffic to.void
addListener
(VirtualNodeListener listener) Utility method to add an inbound listener for this VirtualNode.static IVirtualNode
fromVirtualNodeArn
(software.constructs.Construct scope, String id, String virtualNodeArn) Import an existing VirtualNode given an ARN.static IVirtualNode
fromVirtualNodeAttributes
(software.constructs.Construct scope, String id, VirtualNodeAttributes attrs) Import an existing VirtualNode given its name.getMesh()
The Mesh which the VirtualNode belongs to.The Amazon Resource Name belonging to the VirtualNode.The name of the VirtualNode.grantStreamAggregatedResources
(IGrantable identity) Grants the given entityappmesh:StreamAggregatedResources
.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
VirtualNode
protected VirtualNode(software.amazon.jsii.JsiiObjectRef objRef) -
VirtualNode
protected VirtualNode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
VirtualNode
@Stability(Stable) public VirtualNode(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VirtualNodeProps props) - Parameters:
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.- Parameters:
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.- Parameters:
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.
-
addBackend
Add a Virtual Services that this node is expected to send outbound traffic to.- Parameters:
backend
- This parameter is required.
-
addListener
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.
- Parameters:
listener
- This parameter is required.- See Also:
-
grantStreamAggregatedResources
@Stability(Stable) @NotNull public Grant grantStreamAggregatedResources(@NotNull IGrantable identity) Grants the given entityappmesh:StreamAggregatedResources
.- Specified by:
grantStreamAggregatedResources
in interfaceIVirtualNode
- Parameters:
identity
- This parameter is required.
-
getMesh
The Mesh which the VirtualNode belongs to.- Specified by:
getMesh
in interfaceIVirtualNode
-
getVirtualNodeArn
The Amazon Resource Name belonging to the VirtualNode.- Specified by:
getVirtualNodeArn
in interfaceIVirtualNode
-
getVirtualNodeName
The name of the VirtualNode.- Specified by:
getVirtualNodeName
in interfaceIVirtualNode
-