HttpVirtualNodeListenerOptions

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

Bases: object

Represent the HTTP Node Listener prorperty.

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

  • 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[HttpTimeout]) – Timeout for HTTP protocol. Default: - None

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

Example:

# mesh is of type Mesh
vpc = ec2.Vpc(self, "vpc")
namespace = cloudmap.PrivateDnsNamespace(self, "test-namespace",
    vpc=vpc,
    name="domain.local"
)
service = namespace.create_service("Svc")
node = mesh.add_virtual_node("virtual-node",
    service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
    listeners=[appmesh.VirtualNodeListener.http(
        port=8081,
        health_check=appmesh.HealthCheck.http(
            healthy_threshold=3,
            interval=cdk.Duration.seconds(5),  # minimum
            path="/health-check-path",
            timeout=cdk.Duration.seconds(2),  # minimum
            unhealthy_threshold=2
        )
    )],
    access_log=appmesh.AccessLog.from_file_path("/dev/stdout")
)

Attributes

connection_pool

Connection pool for http listeners.

Default
  • None

Return type

Optional[HttpConnectionPool]

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 HTTP protocol.

Default
  • None

Return type

Optional[HttpTimeout]

tls

Represents the configuration for enabling TLS on a listener.

Default
  • none

Return type

Optional[ListenerTlsOptions]