Class VirtualGateway
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.appmesh.VirtualGateway
- All Implemented Interfaces:
IResource
,IVirtualGateway
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.102.0 (build e354887)",
date="2024-09-10T01:10:04.877Z")
@Stability(Stable)
public class VirtualGateway
extends Resource
implements IVirtualGateway
VirtualGateway represents a newly defined App Mesh Virtual Gateway.
A virtual gateway allows resources that are outside of your mesh to communicate to resources that are inside of your mesh.
Example:
// A Virtual Node with a gRPC listener with a connection pool set Mesh mesh; VirtualNode node = VirtualNode.Builder.create(this, "node") .mesh(mesh) // DNS service discovery can optionally specify the DNS response type as either LOAD_BALANCER or ENDPOINTS. // LOAD_BALANCER means that the DNS resolver returns a loadbalanced set of endpoints, // whereas ENDPOINTS means that the DNS resolver is returning all the endpoints. // By default, the response type is assumed to be LOAD_BALANCER .serviceDiscovery(ServiceDiscovery.dns("node", DnsResponseType.ENDPOINTS)) .listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder() .port(80) .connectionPool(HttpConnectionPool.builder() .maxConnections(100) .maxPendingRequests(10) .build()) .build()))) .build(); // A Virtual Gateway with a gRPC listener with a connection pool set VirtualGateway gateway = VirtualGateway.Builder.create(this, "gateway") .mesh(mesh) .listeners(List.of(VirtualGatewayListener.grpc(GrpcGatewayListenerOptions.builder() .port(8080) .connectionPool(GrpcConnectionPool.builder() .maxRequests(10) .build()) .build()))) .virtualGatewayName("gateway") .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.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.appmesh.IVirtualGateway
IVirtualGateway.Jsii$Default, IVirtualGateway.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
VirtualGateway
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
VirtualGateway
(software.amazon.jsii.JsiiObjectRef objRef) VirtualGateway
(software.constructs.Construct scope, String id, VirtualGatewayProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddGatewayRoute
(String id, GatewayRouteBaseProps props) Utility method to add a new GatewayRoute to the VirtualGateway.static IVirtualGateway
fromVirtualGatewayArn
(software.constructs.Construct scope, String id, String virtualGatewayArn) Import an existing VirtualGateway given an ARN.static IVirtualGateway
fromVirtualGatewayAttributes
(software.constructs.Construct scope, String id, VirtualGatewayAttributes attrs) Import an existing VirtualGateway given its attributes.protected List<VirtualGatewayListenerConfig>
getMesh()
The Mesh that the VirtualGateway belongs to.The Amazon Resource Name (ARN) for the VirtualGateway.The name of the VirtualGateway.grantStreamAggregatedResources
(IGrantable identity) Grants the given entityappmesh:StreamAggregatedResources
.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, 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.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
VirtualGateway
protected VirtualGateway(software.amazon.jsii.JsiiObjectRef objRef) -
VirtualGateway
protected VirtualGateway(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
VirtualGateway
@Stability(Stable) public VirtualGateway(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VirtualGatewayProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromVirtualGatewayArn
@Stability(Stable) @NotNull public static IVirtualGateway fromVirtualGatewayArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String virtualGatewayArn) Import an existing VirtualGateway given an ARN.- Parameters:
scope
- This parameter is required.id
- This parameter is required.virtualGatewayArn
- This parameter is required.
-
fromVirtualGatewayAttributes
@Stability(Stable) @NotNull public static IVirtualGateway fromVirtualGatewayAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VirtualGatewayAttributes attrs) Import an existing VirtualGateway given its attributes.- Parameters:
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.
-
addGatewayRoute
@Stability(Stable) @NotNull public GatewayRoute addGatewayRoute(@NotNull String id, @NotNull GatewayRouteBaseProps props) Utility method to add a new GatewayRoute to the VirtualGateway.- Specified by:
addGatewayRoute
in interfaceIVirtualGateway
- Parameters:
id
- This parameter is required.props
- This parameter is required.
-
grantStreamAggregatedResources
@Stability(Stable) @NotNull public Grant grantStreamAggregatedResources(@NotNull IGrantable identity) Grants the given entityappmesh:StreamAggregatedResources
.- Specified by:
grantStreamAggregatedResources
in interfaceIVirtualGateway
- Parameters:
identity
- This parameter is required.
-
getListeners
-
getMesh
The Mesh that the VirtualGateway belongs to.- Specified by:
getMesh
in interfaceIVirtualGateway
-
getVirtualGatewayArn
The Amazon Resource Name (ARN) for the VirtualGateway.- Specified by:
getVirtualGatewayArn
in interfaceIVirtualGateway
-
getVirtualGatewayName
The name of the VirtualGateway.- Specified by:
getVirtualGatewayName
in interfaceIVirtualGateway
-