GrpcVirtualNodeListenerOptions

class aws_cdk.aws_appmesh.GrpcVirtualNodeListenerOptions(*, connection_pool=None, health_check=None, outlier_detection=None, port=None, timeout=None, tls=None)

Bases: object

Represent the GRPC Node Listener prorperty.

Parameters
  • connection_pool (Optional[GrpcConnectionPool]) – Connection pool for http listeners. Default: - None

  • health_check (Optional[HealthCheck]) – The health check information for the listener. Default: - no healthcheck

  • outlier_detection (Optional[OutlierDetection]) – Represents the configuration for enabling outlier detection. Default: - none

  • port (Union[int, float, None]) – Port to listen for connections on. Default: - 8080

  • timeout (Optional[GrpcTimeout]) – Timeout for GRPC protocol. Default: - None

  • tls (Optional[ListenerTlsOptions]) – Represents the configuration for enabling TLS on a listener. Default: - none

Example:

# A Virtual Node with listener TLS from an ACM provided certificate
# cert is of type Certificate
# mesh is of type Mesh


node = appmesh.VirtualNode(self, "node",
    mesh=mesh,
    service_discovery=appmesh.ServiceDiscovery.dns("node"),
    listeners=[appmesh.VirtualNodeListener.grpc(
        port=80,
        tls=appmesh.ListenerTlsOptions(
            mode=appmesh.TlsMode.STRICT,
            certificate=appmesh.TlsCertificate.acm(cert)
        )
    )]
)

# A Virtual Gateway with listener TLS from a customer provided file certificate
gateway = appmesh.VirtualGateway(self, "gateway",
    mesh=mesh,
    listeners=[appmesh.VirtualGatewayListener.grpc(
        port=8080,
        tls=appmesh.ListenerTlsOptions(
            mode=appmesh.TlsMode.STRICT,
            certificate=appmesh.TlsCertificate.file("path/to/certChain", "path/to/privateKey")
        )
    )],
    virtual_gateway_name="gateway"
)

# A Virtual Gateway with listener TLS from a SDS provided certificate
gateway2 = appmesh.VirtualGateway(self, "gateway2",
    mesh=mesh,
    listeners=[appmesh.VirtualGatewayListener.http2(
        port=8080,
        tls=appmesh.ListenerTlsOptions(
            mode=appmesh.TlsMode.STRICT,
            certificate=appmesh.TlsCertificate.sds("secrete_certificate")
        )
    )],
    virtual_gateway_name="gateway2"
)

Attributes

connection_pool

Connection pool for http listeners.

Default
  • None

Return type

Optional[GrpcConnectionPool]

health_check

The health check information for the listener.

Default
  • no healthcheck

Return type

Optional[HealthCheck]

outlier_detection

Represents the configuration for enabling outlier detection.

Default
  • none

Return type

Optional[OutlierDetection]

port

Port to listen for connections on.

Default
  • 8080

Return type

Union[int, float, None]

timeout

Timeout for GRPC protocol.

Default
  • None

Return type

Optional[GrpcTimeout]

tls

Represents the configuration for enabling TLS on a listener.

Default
  • none

Return type

Optional[ListenerTlsOptions]