# GrpcGatewayListenerOptions

Represents the properties needed to define GRPC Listeners for a VirtualGateway.

- Source: [`aws-appmesh/lib/virtual-gateway-listener.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-appmesh/lib/virtual-gateway-listener.ts#L69)

## Example

```ts
// A Virtual Node with listener TLS from an ACM provided certificate
declare const cert: certificatemanager.Certificate;
declare const mesh: appmesh.Mesh;

const node = new appmesh.VirtualNode(this, 'node', {
  mesh,
  serviceDiscovery: appmesh.ServiceDiscovery.dns('node'),
  listeners: [appmesh.VirtualNodeListener.grpc({
    port: 80,
    tls: {
      mode: appmesh.TlsMode.STRICT,
      certificate: appmesh.TlsCertificate.acm(cert),
    },
  })],
});

// A Virtual Gateway with listener TLS from a customer provided file certificate
const gateway = new appmesh.VirtualGateway(this, 'gateway', {
  mesh,
  listeners: [appmesh.VirtualGatewayListener.grpc({
    port: 8080,
    tls: {
      mode: appmesh.TlsMode.STRICT,
      certificate: appmesh.TlsCertificate.file('path/to/certChain', 'path/to/privateKey'),
    },
  })],
  virtualGatewayName: 'gateway',
});

// A Virtual Gateway with listener TLS from a SDS provided certificate
const gateway2 = new appmesh.VirtualGateway(this, 'gateway2', {
  mesh,
  listeners: [appmesh.VirtualGatewayListener.http2({
    port: 8080,
    tls: {
      mode: appmesh.TlsMode.STRICT,
      certificate: appmesh.TlsCertificate.sds('secrete_certificate'),
    },
  })],
  virtualGatewayName: 'gateway2',
});
```

## Properties

- `connectionPool`: [GrpcConnectionPool](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.GrpcConnectionPool.html) = None — Connection pool for http listeners.

- `healthCheck`: [HealthCheck](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.HealthCheck.html) — The health check information for the listener.

  **Default:** no healthcheck

- `port`: number = 8080 — Port to listen for connections on.

- `tls`: [ListenerTlsOptions](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.ListenerTlsOptions.html) = none — Represents the configuration for enabling TLS on a listener.
