VirtualGatewayListener

class aws_cdk.aws_appmesh.VirtualGatewayListener

Bases: object

Represents the properties needed to define listeners for a VirtualGateway.

Example:

# mesh is of type Mesh

certificate_authority_arn = "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012"

gateway = appmesh.VirtualGateway(self, "gateway",
    mesh=mesh,
    listeners=[appmesh.VirtualGatewayListener.http(
        port=443,
        health_check=appmesh.HealthCheck.http(
            interval=cdk.Duration.seconds(10)
        )
    )],
    backend_defaults=appmesh.BackendDefaults(
        tls_client_policy=appmesh.TlsClientPolicy(
            ports=[8080, 8081],
            validation=appmesh.TlsValidation(
                trust=appmesh.TlsValidationTrust.acm([
                    acmpca.CertificateAuthority.from_certificate_authority_arn(self, "certificate", certificate_authority_arn)
                ])
            )
        )
    ),
    access_log=appmesh.AccessLog.from_file_path("/dev/stdout"),
    virtual_gateway_name="virtualGateway"
)

Methods

abstract bind(scope)

Called when the GatewayListener type is initialized.

Can be used to enforce mutual exclusivity

Parameters

scope (Construct) –

Return type

VirtualGatewayListenerConfig

Static Methods

classmethod grpc(*, connection_pool=None, health_check=None, port=None, tls=None)

Returns a GRPC Listener for a VirtualGateway.

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

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

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

Return type

VirtualGatewayListener

classmethod http(*, connection_pool=None, health_check=None, port=None, tls=None)

Returns an HTTP Listener for a VirtualGateway.

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

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

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

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

Return type

VirtualGatewayListener

classmethod http2(*, connection_pool=None, health_check=None, port=None, tls=None)

Returns an HTTP2 Listener for a VirtualGateway.

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

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

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

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

Return type

VirtualGatewayListener