VirtualGatewayListener

class aws_cdk.aws_appmesh.VirtualGatewayListener

Bases: object

Represents the properties needed to define listeners for a VirtualGateway.

ExampleMetadata:

infused

Example:

# mesh: appmesh.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 (Union[GrpcConnectionPool, Dict[str, Any], None]) – 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 (Union[ListenerTlsOptions, Dict[str, Any], None]) – 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 (Union[HttpConnectionPool, Dict[str, Any], None]) – 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 (Union[ListenerTlsOptions, Dict[str, Any], None]) – 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 (Union[Http2ConnectionPool, Dict[str, Any], None]) – 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 (Union[ListenerTlsOptions, Dict[str, Any], None]) – Represents the configuration for enabling TLS on a listener. Default: - none

Return type:

VirtualGatewayListener