VirtualNodeListener
- class aws_cdk.aws_appmesh.VirtualNodeListener
Bases:
object
Defines listener for a VirtualNode.
- ExampleMetadata:
infused
Example:
# mesh: appmesh.Mesh # service: cloudmap.Service node = appmesh.VirtualNode(self, "node", mesh=mesh, service_discovery=appmesh.ServiceDiscovery.cloud_map(service), listeners=[appmesh.VirtualNodeListener.http( port=8080, health_check=appmesh.HealthCheck.http( healthy_threshold=3, interval=Duration.seconds(5), path="/ping", timeout=Duration.seconds(2), unhealthy_threshold=2 ), timeout=appmesh.HttpTimeout( idle=Duration.seconds(5) ) )], backend_defaults=appmesh.BackendDefaults( tls_client_policy=appmesh.TlsClientPolicy( validation=appmesh.TlsValidation( trust=appmesh.TlsValidationTrust.file("/keys/local_cert_chain.pem") ) ) ), access_log=appmesh.AccessLog.from_file_path("/dev/stdout") ) cdk.Tags.of(node).add("Environment", "Dev")
Methods
- abstract bind(scope)
Binds the current object when adding Listener to a VirtualNode.
- Parameters:
scope (
Construct
) –- Return type:
Static Methods
- classmethod grpc(*, connection_pool=None, health_check=None, outlier_detection=None, port=None, timeout=None, tls=None)
Returns an GRPC Listener for a VirtualNode.
- Parameters:
connection_pool (
Union
[GrpcConnectionPool
,Dict
[str
,Any
],None
]) – Connection pool for http listeners. Default: - Nonehealth_check (
Optional
[HealthCheck
]) – The health check information for the listener. Default: - no healthcheckoutlier_detection (
Union
[OutlierDetection
,Dict
[str
,Any
],None
]) – Represents the configuration for enabling outlier detection. Default: - noneport (
Union
[int
,float
,None
]) – Port to listen for connections on. Default: - 8080timeout (
Union
[GrpcTimeout
,Dict
[str
,Any
],None
]) – Timeout for GRPC protocol. Default: - Nonetls (
Union
[ListenerTlsOptions
,Dict
[str
,Any
],None
]) – Represents the configuration for enabling TLS on a listener. Default: - none
- Return type:
- classmethod http(*, connection_pool=None, health_check=None, outlier_detection=None, port=None, timeout=None, tls=None)
Returns an HTTP Listener for a VirtualNode.
- Parameters:
connection_pool (
Union
[HttpConnectionPool
,Dict
[str
,Any
],None
]) – Connection pool for http listeners. Default: - Nonehealth_check (
Optional
[HealthCheck
]) – The health check information for the listener. Default: - no healthcheckoutlier_detection (
Union
[OutlierDetection
,Dict
[str
,Any
],None
]) – Represents the configuration for enabling outlier detection. Default: - noneport (
Union
[int
,float
,None
]) – Port to listen for connections on. Default: - 8080timeout (
Union
[HttpTimeout
,Dict
[str
,Any
],None
]) – Timeout for HTTP protocol. Default: - Nonetls (
Union
[ListenerTlsOptions
,Dict
[str
,Any
],None
]) – Represents the configuration for enabling TLS on a listener. Default: - none
- Return type:
- classmethod http2(*, connection_pool=None, health_check=None, outlier_detection=None, port=None, timeout=None, tls=None)
Returns an HTTP2 Listener for a VirtualNode.
- Parameters:
connection_pool (
Union
[Http2ConnectionPool
,Dict
[str
,Any
],None
]) – Connection pool for http2 listeners. Default: - Nonehealth_check (
Optional
[HealthCheck
]) – The health check information for the listener. Default: - no healthcheckoutlier_detection (
Union
[OutlierDetection
,Dict
[str
,Any
],None
]) – Represents the configuration for enabling outlier detection. Default: - noneport (
Union
[int
,float
,None
]) – Port to listen for connections on. Default: - 8080timeout (
Union
[HttpTimeout
,Dict
[str
,Any
],None
]) – Timeout for HTTP protocol. Default: - Nonetls (
Union
[ListenerTlsOptions
,Dict
[str
,Any
],None
]) – Represents the configuration for enabling TLS on a listener. Default: - none
- Return type:
- classmethod tcp(*, connection_pool=None, health_check=None, outlier_detection=None, port=None, timeout=None, tls=None)
Returns an TCP Listener for a VirtualNode.
- Parameters:
connection_pool (
Union
[TcpConnectionPool
,Dict
[str
,Any
],None
]) – Connection pool for http listeners. Default: - Nonehealth_check (
Optional
[HealthCheck
]) – The health check information for the listener. Default: - no healthcheckoutlier_detection (
Union
[OutlierDetection
,Dict
[str
,Any
],None
]) – Represents the configuration for enabling outlier detection. Default: - noneport (
Union
[int
,float
,None
]) – Port to listen for connections on. Default: - 8080timeout (
Union
[TcpTimeout
,Dict
[str
,Any
],None
]) – Timeout for TCP protocol. Default: - Nonetls (
Union
[ListenerTlsOptions
,Dict
[str
,Any
],None
]) – Represents the configuration for enabling TLS on a listener. Default: - none
- Return type: