Class VirtualGateway
VirtualGateway represents a newly defined App Mesh Virtual Gateway.
Inherited Members
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class VirtualGateway : Resource, IVirtualGateway, IResource
Syntax (vb)
Public Class VirtualGateway
Inherits Resource
Implements IVirtualGateway, IResource
Remarks
A virtual gateway allows resources that are outside of your mesh to communicate to resources that are inside of your mesh.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_gateways.html
ExampleMetadata: infused
Examples
// A Virtual Node with a gRPC listener with a connection pool set
Mesh mesh;
var node = new VirtualNode(this, "node", new VirtualNodeProps {
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 = new [] { VirtualNodeListener.Http(new HttpVirtualNodeListenerOptions {
Port = 80,
ConnectionPool = new HttpConnectionPool {
MaxConnections = 100,
MaxPendingRequests = 10
}
}) }
});
// A Virtual Gateway with a gRPC listener with a connection pool set
var gateway = new VirtualGateway(this, "gateway", new VirtualGatewayProps {
Mesh = mesh,
Listeners = new [] { VirtualGatewayListener.Grpc(new GrpcGatewayListenerOptions {
Port = 8080,
ConnectionPool = new GrpcConnectionPool {
MaxRequests = 10
}
}) },
VirtualGatewayName = "gateway"
});
Synopsis
Constructors
VirtualGateway(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
VirtualGateway(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
VirtualGateway(Construct, String, IVirtualGatewayProps) |
Properties
Listeners | |
Mesh | The Mesh that the VirtualGateway belongs to. |
VirtualGatewayArn | The Amazon Resource Name (ARN) for the VirtualGateway. |
VirtualGatewayName | The name of the VirtualGateway. |
Methods
AddGatewayRoute(String, IGatewayRouteBaseProps) | Utility method to add a new GatewayRoute to the VirtualGateway. |
FromVirtualGatewayArn(Construct, String, String) | Import an existing VirtualGateway given an ARN. |
FromVirtualGatewayAttributes(Construct, String, IVirtualGatewayAttributes) | Import an existing VirtualGateway given its attributes. |
GrantStreamAggregatedResources(IGrantable) | Grants the given entity |
Constructors
VirtualGateway(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected VirtualGateway(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
VirtualGateway(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected VirtualGateway(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
VirtualGateway(Construct, String, IVirtualGatewayProps)
public VirtualGateway(Construct scope, string id, IVirtualGatewayProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IVirtualGatewayProps
Properties
Listeners
protected virtual IVirtualGatewayListenerConfig[] Listeners { get; }
Property Value
IVirtualGatewayListenerConfig[]
Mesh
The Mesh that the VirtualGateway belongs to.
public virtual IMesh Mesh { get; }
Property Value
VirtualGatewayArn
The Amazon Resource Name (ARN) for the VirtualGateway.
public virtual string VirtualGatewayArn { get; }
Property Value
System.String
VirtualGatewayName
The name of the VirtualGateway.
public virtual string VirtualGatewayName { get; }
Property Value
System.String
Methods
AddGatewayRoute(String, IGatewayRouteBaseProps)
Utility method to add a new GatewayRoute to the VirtualGateway.
public virtual GatewayRoute AddGatewayRoute(string id, IGatewayRouteBaseProps props)
Parameters
- id System.String
- props IGatewayRouteBaseProps
Returns
FromVirtualGatewayArn(Construct, String, String)
Import an existing VirtualGateway given an ARN.
public static IVirtualGateway FromVirtualGatewayArn(Construct scope, string id, string virtualGatewayArn)
Parameters
- scope Constructs.Construct
- id System.String
- virtualGatewayArn System.String
Returns
FromVirtualGatewayAttributes(Construct, String, IVirtualGatewayAttributes)
Import an existing VirtualGateway given its attributes.
public static IVirtualGateway FromVirtualGatewayAttributes(Construct scope, string id, IVirtualGatewayAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IVirtualGatewayAttributes
Returns
GrantStreamAggregatedResources(IGrantable)
Grants the given entity appmesh:StreamAggregatedResources
.
public virtual Grant GrantStreamAggregatedResources(IGrantable identity)
Parameters
- identity IGrantable
Returns