TcpVirtualNodeListenerOptions Struct
Represent the TCP Node Listener property.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
declare const healthCheck: appmesh.HealthCheck;
declare const mutualTlsValidationTrust: appmesh.MutualTlsValidationTrust;
declare const subjectAlternativeNames: appmesh.SubjectAlternativeNames;
declare const tlsCertificate: appmesh.TlsCertificate;
const tcpVirtualNodeListenerOptions: appmesh.TcpVirtualNodeListenerOptions = {
connectionPool: {
maxConnections: 123,
},
healthCheck: healthCheck,
outlierDetection: {
baseEjectionDuration: cdk.Duration.minutes(30),
interval: cdk.Duration.minutes(30),
maxEjectionPercent: 123,
maxServerErrors: 123,
},
port: 123,
timeout: {
idle: cdk.Duration.minutes(30),
},
tls: {
certificate: tlsCertificate,
mode: appmesh.TlsMode.STRICT,
// the properties below are optional
mutualTlsValidation: {
trust: mutualTlsValidationTrust,
// the properties below are optional
subjectAlternativeNames: subjectAlternativeNames,
},
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_appmesh as appmesh
# health_check: appmesh.HealthCheck
# mutual_tls_validation_trust: appmesh.MutualTlsValidationTrust
# subject_alternative_names: appmesh.SubjectAlternativeNames
# tls_certificate: appmesh.TlsCertificate
tcp_virtual_node_listener_options = appmesh.TcpVirtualNodeListenerOptions(
connection_pool=appmesh.TcpConnectionPool(
max_connections=123
),
health_check=health_check,
outlier_detection=appmesh.OutlierDetection(
base_ejection_duration=cdk.Duration.minutes(30),
interval=cdk.Duration.minutes(30),
max_ejection_percent=123,
max_server_errors=123
),
port=123,
timeout=appmesh.TcpTimeout(
idle=cdk.Duration.minutes(30)
),
tls=appmesh.ListenerTlsOptions(
certificate=tls_certificate,
mode=appmesh.TlsMode.STRICT,
# the properties below are optional
mutual_tls_validation=appmesh.MutualTlsValidation(
trust=mutual_tls_validation_trust,
# the properties below are optional
subject_alternative_names=subject_alternative_names
)
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.appmesh.*;
HealthCheck healthCheck;
MutualTlsValidationTrust mutualTlsValidationTrust;
SubjectAlternativeNames subjectAlternativeNames;
TlsCertificate tlsCertificate;
TcpVirtualNodeListenerOptions tcpVirtualNodeListenerOptions = TcpVirtualNodeListenerOptions.builder()
.connectionPool(TcpConnectionPool.builder()
.maxConnections(123)
.build())
.healthCheck(healthCheck)
.outlierDetection(OutlierDetection.builder()
.baseEjectionDuration(Duration.minutes(30))
.interval(Duration.minutes(30))
.maxEjectionPercent(123)
.maxServerErrors(123)
.build())
.port(123)
.timeout(TcpTimeout.builder()
.idle(Duration.minutes(30))
.build())
.tls(ListenerTlsOptions.builder()
.certificate(tlsCertificate)
.mode(TlsMode.STRICT)
// the properties below are optional
.mutualTlsValidation(MutualTlsValidation.builder()
.trust(mutualTlsValidationTrust)
// the properties below are optional
.subjectAlternativeNames(subjectAlternativeNames)
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.AppMesh;
HealthCheck healthCheck;
MutualTlsValidationTrust mutualTlsValidationTrust;
SubjectAlternativeNames subjectAlternativeNames;
TlsCertificate tlsCertificate;
var tcpVirtualNodeListenerOptions = new TcpVirtualNodeListenerOptions {
ConnectionPool = new TcpConnectionPool {
MaxConnections = 123
},
HealthCheck = healthCheck,
OutlierDetection = new OutlierDetection {
BaseEjectionDuration = Duration.Minutes(30),
Interval = Duration.Minutes(30),
MaxEjectionPercent = 123,
MaxServerErrors = 123
},
Port = 123,
Timeout = new TcpTimeout {
Idle = Duration.Minutes(30)
},
Tls = new ListenerTlsOptions {
Certificate = tlsCertificate,
Mode = TlsMode.STRICT,
// the properties below are optional
MutualTlsValidation = new MutualTlsValidation {
Trust = mutualTlsValidationTrust,
// the properties below are optional
SubjectAlternativeNames = subjectAlternativeNames
}
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var healthCheck HealthCheck
var mutualTlsValidationTrust MutualTlsValidationTrust
var subjectAlternativeNames SubjectAlternativeNames
var tlsCertificate TlsCertificate
tcpVirtualNodeListenerOptions := &TcpVirtualNodeListenerOptions{
ConnectionPool: &TcpConnectionPool{
MaxConnections: jsii.Number(123),
},
HealthCheck: healthCheck,
OutlierDetection: &OutlierDetection{
BaseEjectionDuration: cdk.Duration_Minutes(jsii.Number(30)),
Interval: cdk.Duration_*Minutes(jsii.Number(30)),
MaxEjectionPercent: jsii.Number(123),
MaxServerErrors: jsii.Number(123),
},
Port: jsii.Number(123),
Timeout: &TcpTimeout{
Idle: cdk.Duration_*Minutes(jsii.Number(30)),
},
Tls: &ListenerTlsOptions{
Certificate: tlsCertificate,
Mode: awscdk.Aws_appmesh.TlsMode_STRICT,
// the properties below are optional
MutualTlsValidation: &MutualTlsValidation{
Trust: mutualTlsValidationTrust,
// the properties below are optional
SubjectAlternativeNames: subjectAlternativeNames,
},
},
}
Properties
connectionPooloptionalTcpConnectionPoolconnection_pooloptionalTcpConnectionPoolconnectionPooloptionalTcpConnectionPoolConnectionPooloptionalTcpConnectionPoolConnectionPooloptionalTcpConnectionPool= None#Connection pool for http listeners.
healthCheckoptionalHealthCheckhealth_checkoptionalHealthCheckhealthCheckoptionalHealthCheckHealthCheckoptionalHealthCheckHealthCheckoptionalHealthCheck#The health check information for the listener.
Default: no healthcheck
outlierDetectionoptionalOutlierDetectionoutlier_detectionoptionalOutlierDetectionoutlierDetectionoptionalOutlierDetectionOutlierDetectionoptionalOutlierDetectionOutlierDetectionoptionalOutlierDetection= none#Represents the configuration for enabling outlier detection.
portoptionalnumberportoptionalint | floatportoptionalNumberPortoptionaldoublePortoptional*float64= 8080#Port to listen for connections on.
timeoutoptionalTcpTimeouttimeoutoptionalTcpTimeouttimeoutoptionalTcpTimeoutTimeoutoptionalTcpTimeoutTimeoutoptionalTcpTimeout= None#Timeout for TCP protocol.
tlsoptionalListenerTlsOptionstlsoptionalListenerTlsOptionstlsoptionalListenerTlsOptionsTlsoptionalListenerTlsOptionsTlsoptionalListenerTlsOptions= none#Represents the configuration for enabling TLS on a listener.