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 property.

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

  • outlier_detection (Union[OutlierDetection, Dict[str, Any], None]) – Represents the configuration for enabling outlier detection. Default: - none

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

  • timeout (Union[HttpTimeout, Dict[str, Any], None]) – Timeout for HTTP protocol. Default: - None

  • tls (Union[ListenerTlsOptions, Dict[str, Any], None]) – Represents the configuration for enabling TLS on a listener. Default: - none

ExampleMetadata:

infused

Example:

# mesh: appmesh.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=Duration.seconds(5),  # minimum
            path="/health-check-path",
            timeout=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

health_check

The health check information for the listener.

Default:
  • no healthcheck

outlier_detection

Represents the configuration for enabling outlier detection.

Default:
  • none

port

Port to listen for connections on.

Default:
  • 8080

timeout

Timeout for HTTP protocol.

Default:
  • None

tls

Represents the configuration for enabling TLS on a listener.

Default:
  • none