Skip to content
v2.278.0

ListenerProperty Struct ​

An object that represents a listener for a virtual node.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const listenerProperty: appmesh.CfnVirtualNode.ListenerProperty = {
  portMapping: {
    port: 123,
    protocol: 'protocol',
  },

  // the properties below are optional
  connectionPool: {
    grpc: {
      maxRequests: 123,
    },
    http: {
      maxConnections: 123,

      // the properties below are optional
      maxPendingRequests: 123,
    },
    http2: {
      maxRequests: 123,
    },
    tcp: {
      maxConnections: 123,
    },
  },
  healthCheck: {
    healthyThreshold: 123,
    intervalMillis: 123,
    protocol: 'protocol',
    timeoutMillis: 123,
    unhealthyThreshold: 123,

    // the properties below are optional
    path: 'path',
    port: 123,
  },
  outlierDetection: {
    baseEjectionDuration: {
      unit: 'unit',
      value: 123,
    },
    interval: {
      unit: 'unit',
      value: 123,
    },
    maxEjectionPercent: 123,
    maxServerErrors: 123,
  },
  timeout: {
    grpc: {
      idle: {
        unit: 'unit',
        value: 123,
      },
      perRequest: {
        unit: 'unit',
        value: 123,
      },
    },
    http: {
      idle: {
        unit: 'unit',
        value: 123,
      },
      perRequest: {
        unit: 'unit',
        value: 123,
      },
    },
    http2: {
      idle: {
        unit: 'unit',
        value: 123,
      },
      perRequest: {
        unit: 'unit',
        value: 123,
      },
    },
    tcp: {
      idle: {
        unit: 'unit',
        value: 123,
      },
    },
  },
  tls: {
    certificate: {
      acm: {
        certificateArn: 'certificateArn',
      },
      file: {
        certificateChain: 'certificateChain',
        privateKey: 'privateKey',
      },
      sds: {
        secretName: 'secretName',
      },
    },
    mode: 'mode',

    // the properties below are optional
    validation: {
      trust: {
        file: {
          certificateChain: 'certificateChain',
        },
        sds: {
          secretName: 'secretName',
        },
      },

      // the properties below are optional
      subjectAlternativeNames: {
        match: {
          exact: ['exact'],
        },
      },
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appmesh as appmesh

listener_property = appmesh.CfnVirtualNode.ListenerProperty(
    port_mapping=appmesh.CfnVirtualNode.PortMappingProperty(
        port=123,
        protocol="protocol"
    ),

    # the properties below are optional
    connection_pool=appmesh.CfnVirtualNode.VirtualNodeConnectionPoolProperty(
        grpc=appmesh.CfnVirtualNode.VirtualNodeGrpcConnectionPoolProperty(
            max_requests=123
        ),
        http=appmesh.CfnVirtualNode.VirtualNodeHttpConnectionPoolProperty(
            max_connections=123,

            # the properties below are optional
            max_pending_requests=123
        ),
        http2=appmesh.CfnVirtualNode.VirtualNodeHttp2ConnectionPoolProperty(
            max_requests=123
        ),
        tcp=appmesh.CfnVirtualNode.VirtualNodeTcpConnectionPoolProperty(
            max_connections=123
        )
    ),
    health_check=appmesh.CfnVirtualNode.HealthCheckProperty(
        healthy_threshold=123,
        interval_millis=123,
        protocol="protocol",
        timeout_millis=123,
        unhealthy_threshold=123,

        # the properties below are optional
        path="path",
        port=123
    ),
    outlier_detection=appmesh.CfnVirtualNode.OutlierDetectionProperty(
        base_ejection_duration=appmesh.CfnVirtualNode.DurationProperty(
            unit="unit",
            value=123
        ),
        interval=appmesh.CfnVirtualNode.DurationProperty(
            unit="unit",
            value=123
        ),
        max_ejection_percent=123,
        max_server_errors=123
    ),
    timeout=appmesh.CfnVirtualNode.ListenerTimeoutProperty(
        grpc=appmesh.CfnVirtualNode.GrpcTimeoutProperty(
            idle=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            ),
            per_request=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            )
        ),
        http=appmesh.CfnVirtualNode.HttpTimeoutProperty(
            idle=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            ),
            per_request=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            )
        ),
        http2=appmesh.CfnVirtualNode.HttpTimeoutProperty(
            idle=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            ),
            per_request=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            )
        ),
        tcp=appmesh.CfnVirtualNode.TcpTimeoutProperty(
            idle=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            )
        )
    ),
    tls=appmesh.CfnVirtualNode.ListenerTlsProperty(
        certificate=appmesh.CfnVirtualNode.ListenerTlsCertificateProperty(
            acm=appmesh.CfnVirtualNode.ListenerTlsAcmCertificateProperty(
                certificate_arn="certificateArn"
            ),
            file=appmesh.CfnVirtualNode.ListenerTlsFileCertificateProperty(
                certificate_chain="certificateChain",
                private_key="privateKey"
            ),
            sds=appmesh.CfnVirtualNode.ListenerTlsSdsCertificateProperty(
                secret_name="secretName"
            )
        ),
        mode="mode",

        # the properties below are optional
        validation=appmesh.CfnVirtualNode.ListenerTlsValidationContextProperty(
            trust=appmesh.CfnVirtualNode.ListenerTlsValidationContextTrustProperty(
                file=appmesh.CfnVirtualNode.TlsValidationContextFileTrustProperty(
                    certificate_chain="certificateChain"
                ),
                sds=appmesh.CfnVirtualNode.TlsValidationContextSdsTrustProperty(
                    secret_name="secretName"
                )
            ),

            # the properties below are optional
            subject_alternative_names=appmesh.CfnVirtualNode.SubjectAlternativeNamesProperty(
                match=appmesh.CfnVirtualNode.SubjectAlternativeNameMatchersProperty(
                    exact=["exact"]
                )
            )
        )
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appmesh.*;

ListenerProperty listenerProperty = ListenerProperty.builder()
        .portMapping(PortMappingProperty.builder()
                .port(123)
                .protocol("protocol")
                .build())

        // the properties below are optional
        .connectionPool(VirtualNodeConnectionPoolProperty.builder()
                .grpc(VirtualNodeGrpcConnectionPoolProperty.builder()
                        .maxRequests(123)
                        .build())
                .http(VirtualNodeHttpConnectionPoolProperty.builder()
                        .maxConnections(123)

                        // the properties below are optional
                        .maxPendingRequests(123)
                        .build())
                .http2(VirtualNodeHttp2ConnectionPoolProperty.builder()
                        .maxRequests(123)
                        .build())
                .tcp(VirtualNodeTcpConnectionPoolProperty.builder()
                        .maxConnections(123)
                        .build())
                .build())
        .healthCheck(HealthCheckProperty.builder()
                .healthyThreshold(123)
                .intervalMillis(123)
                .protocol("protocol")
                .timeoutMillis(123)
                .unhealthyThreshold(123)

                // the properties below are optional
                .path("path")
                .port(123)
                .build())
        .outlierDetection(OutlierDetectionProperty.builder()
                .baseEjectionDuration(DurationProperty.builder()
                        .unit("unit")
                        .value(123)
                        .build())
                .interval(DurationProperty.builder()
                        .unit("unit")
                        .value(123)
                        .build())
                .maxEjectionPercent(123)
                .maxServerErrors(123)
                .build())
        .timeout(ListenerTimeoutProperty.builder()
                .grpc(GrpcTimeoutProperty.builder()
                        .idle(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .perRequest(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .build())
                .http(HttpTimeoutProperty.builder()
                        .idle(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .perRequest(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .build())
                .http2(HttpTimeoutProperty.builder()
                        .idle(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .perRequest(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .build())
                .tcp(TcpTimeoutProperty.builder()
                        .idle(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .build())
                .build())
        .tls(ListenerTlsProperty.builder()
                .certificate(ListenerTlsCertificateProperty.builder()
                        .acm(ListenerTlsAcmCertificateProperty.builder()
                                .certificateArn("certificateArn")
                                .build())
                        .file(ListenerTlsFileCertificateProperty.builder()
                                .certificateChain("certificateChain")
                                .privateKey("privateKey")
                                .build())
                        .sds(ListenerTlsSdsCertificateProperty.builder()
                                .secretName("secretName")
                                .build())
                        .build())
                .mode("mode")

                // the properties below are optional
                .validation(ListenerTlsValidationContextProperty.builder()
                        .trust(ListenerTlsValidationContextTrustProperty.builder()
                                .file(TlsValidationContextFileTrustProperty.builder()
                                        .certificateChain("certificateChain")
                                        .build())
                                .sds(TlsValidationContextSdsTrustProperty.builder()
                                        .secretName("secretName")
                                        .build())
                                .build())

                        // the properties below are optional
                        .subjectAlternativeNames(SubjectAlternativeNamesProperty.builder()
                                .match(SubjectAlternativeNameMatchersProperty.builder()
                                        .exact(List.of("exact"))
                                        .build())
                                .build())
                        .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.AWS.AppMesh;

var listenerProperty = new ListenerProperty {
    PortMapping = new PortMappingProperty {
        Port = 123,
        Protocol = "protocol"
    },

    // the properties below are optional
    ConnectionPool = new VirtualNodeConnectionPoolProperty {
        Grpc = new VirtualNodeGrpcConnectionPoolProperty {
            MaxRequests = 123
        },
        Http = new VirtualNodeHttpConnectionPoolProperty {
            MaxConnections = 123,

            // the properties below are optional
            MaxPendingRequests = 123
        },
        Http2 = new VirtualNodeHttp2ConnectionPoolProperty {
            MaxRequests = 123
        },
        Tcp = new VirtualNodeTcpConnectionPoolProperty {
            MaxConnections = 123
        }
    },
    HealthCheck = new HealthCheckProperty {
        HealthyThreshold = 123,
        IntervalMillis = 123,
        Protocol = "protocol",
        TimeoutMillis = 123,
        UnhealthyThreshold = 123,

        // the properties below are optional
        Path = "path",
        Port = 123
    },
    OutlierDetection = new OutlierDetectionProperty {
        BaseEjectionDuration = new DurationProperty {
            Unit = "unit",
            Value = 123
        },
        Interval = new DurationProperty {
            Unit = "unit",
            Value = 123
        },
        MaxEjectionPercent = 123,
        MaxServerErrors = 123
    },
    Timeout = new ListenerTimeoutProperty {
        Grpc = new GrpcTimeoutProperty {
            Idle = new DurationProperty {
                Unit = "unit",
                Value = 123
            },
            PerRequest = new DurationProperty {
                Unit = "unit",
                Value = 123
            }
        },
        Http = new HttpTimeoutProperty {
            Idle = new DurationProperty {
                Unit = "unit",
                Value = 123
            },
            PerRequest = new DurationProperty {
                Unit = "unit",
                Value = 123
            }
        },
        Http2 = new HttpTimeoutProperty {
            Idle = new DurationProperty {
                Unit = "unit",
                Value = 123
            },
            PerRequest = new DurationProperty {
                Unit = "unit",
                Value = 123
            }
        },
        Tcp = new TcpTimeoutProperty {
            Idle = new DurationProperty {
                Unit = "unit",
                Value = 123
            }
        }
    },
    Tls = new ListenerTlsProperty {
        Certificate = new ListenerTlsCertificateProperty {
            Acm = new ListenerTlsAcmCertificateProperty {
                CertificateArn = "certificateArn"
            },
            File = new ListenerTlsFileCertificateProperty {
                CertificateChain = "certificateChain",
                PrivateKey = "privateKey"
            },
            Sds = new ListenerTlsSdsCertificateProperty {
                SecretName = "secretName"
            }
        },
        Mode = "mode",

        // the properties below are optional
        Validation = new ListenerTlsValidationContextProperty {
            Trust = new ListenerTlsValidationContextTrustProperty {
                File = new TlsValidationContextFileTrustProperty {
                    CertificateChain = "certificateChain"
                },
                Sds = new TlsValidationContextSdsTrustProperty {
                    SecretName = "secretName"
                }
            },

            // the properties below are optional
            SubjectAlternativeNames = new SubjectAlternativeNamesProperty {
                Match = new SubjectAlternativeNameMatchersProperty {
                    Exact = new [] { "exact" }
                }
            }
        }
    }
};
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"

listenerProperty := &ListenerProperty{
	PortMapping: &PortMappingProperty{
		Port: jsii.Number(123),
		Protocol: jsii.String("protocol"),
	},

	// the properties below are optional
	ConnectionPool: &VirtualNodeConnectionPoolProperty{
		Grpc: &VirtualNodeGrpcConnectionPoolProperty{
			MaxRequests: jsii.Number(123),
		},
		Http: &VirtualNodeHttpConnectionPoolProperty{
			MaxConnections: jsii.Number(123),

			// the properties below are optional
			MaxPendingRequests: jsii.Number(123),
		},
		Http2: &VirtualNodeHttp2ConnectionPoolProperty{
			MaxRequests: jsii.Number(123),
		},
		Tcp: &VirtualNodeTcpConnectionPoolProperty{
			MaxConnections: jsii.Number(123),
		},
	},
	HealthCheck: &HealthCheckProperty{
		HealthyThreshold: jsii.Number(123),
		IntervalMillis: jsii.Number(123),
		Protocol: jsii.String("protocol"),
		TimeoutMillis: jsii.Number(123),
		UnhealthyThreshold: jsii.Number(123),

		// the properties below are optional
		Path: jsii.String("path"),
		Port: jsii.Number(123),
	},
	OutlierDetection: &OutlierDetectionProperty{
		BaseEjectionDuration: &DurationProperty{
			Unit: jsii.String("unit"),
			Value: jsii.Number(123),
		},
		Interval: &DurationProperty{
			Unit: jsii.String("unit"),
			Value: jsii.Number(123),
		},
		MaxEjectionPercent: jsii.Number(123),
		MaxServerErrors: jsii.Number(123),
	},
	Timeout: &ListenerTimeoutProperty{
		Grpc: &GrpcTimeoutProperty{
			Idle: &DurationProperty{
				Unit: jsii.String("unit"),
				Value: jsii.Number(123),
			},
			PerRequest: &DurationProperty{
				Unit: jsii.String("unit"),
				Value: jsii.Number(123),
			},
		},
		Http: &HttpTimeoutProperty{
			Idle: &DurationProperty{
				Unit: jsii.String("unit"),
				Value: jsii.Number(123),
			},
			PerRequest: &DurationProperty{
				Unit: jsii.String("unit"),
				Value: jsii.Number(123),
			},
		},
		Http2: &HttpTimeoutProperty{
			Idle: &DurationProperty{
				Unit: jsii.String("unit"),
				Value: jsii.Number(123),
			},
			PerRequest: &DurationProperty{
				Unit: jsii.String("unit"),
				Value: jsii.Number(123),
			},
		},
		Tcp: &TcpTimeoutProperty{
			Idle: &DurationProperty{
				Unit: jsii.String("unit"),
				Value: jsii.Number(123),
			},
		},
	},
	Tls: &ListenerTlsProperty{
		Certificate: &ListenerTlsCertificateProperty{
			Acm: &ListenerTlsAcmCertificateProperty{
				CertificateArn: jsii.String("certificateArn"),
			},
			File: &ListenerTlsFileCertificateProperty{
				CertificateChain: jsii.String("certificateChain"),
				PrivateKey: jsii.String("privateKey"),
			},
			Sds: &ListenerTlsSdsCertificateProperty{
				SecretName: jsii.String("secretName"),
			},
		},
		Mode: jsii.String("mode"),

		// the properties below are optional
		Validation: &ListenerTlsValidationContextProperty{
			Trust: &ListenerTlsValidationContextTrustProperty{
				File: &TlsValidationContextFileTrustProperty{
					CertificateChain: jsii.String("certificateChain"),
				},
				Sds: &TlsValidationContextSdsTrustProperty{
					SecretName: jsii.String("secretName"),
				},
			},

			// the properties below are optional
			SubjectAlternativeNames: &SubjectAlternativeNamesProperty{
				Match: &SubjectAlternativeNameMatchersProperty{
					Exact: []*string{
						jsii.String("exact"),
					},
				},
			},
		},
	},
}

Properties ​

connectionPooloptionalIResolvable | CfnVirtualNode.VirtualNodeConnectionPoolPropertyconnection_pooloptionaltyping.Union[IResolvable, VirtualNodeConnectionPoolProperty]connectionPooloptionalIResolvableConnectionPooloptionalIResolvableConnectionPooloptionalinterface{} #
The connection pool information for the listener.
healthCheckoptionalIResolvable | CfnVirtualNode.HealthCheckPropertyhealth_checkoptionaltyping.Union[IResolvable, HealthCheckProperty]healthCheckoptionalIResolvableHealthCheckoptionalIResolvableHealthCheckoptionalinterface{} #
The health check information for the listener.
outlierDetectionoptionalIResolvable | CfnVirtualNode.OutlierDetectionPropertyoutlier_detectionoptionaltyping.Union[IResolvable, OutlierDetectionProperty]outlierDetectionoptionalIResolvableOutlierDetectionoptionalIResolvableOutlierDetectionoptionalinterface{} #
The outlier detection information for the listener.
portMappingIResolvable | CfnVirtualNode.PortMappingPropertyport_mappingtyping.Union[IResolvable, PortMappingProperty]portMappingIResolvablePortMappingIResolvablePortMappinginterface{} required #
The port mapping information for the listener.
timeoutoptionalIResolvable | CfnVirtualNode.ListenerTimeoutPropertytimeoutoptionaltyping.Union[IResolvable, ListenerTimeoutProperty]timeoutoptionalIResolvableTimeoutoptionalIResolvableTimeoutoptionalinterface{} #
An object that represents timeouts for different protocols.
tlsoptionalIResolvable | CfnVirtualNode.ListenerTlsPropertytlsoptionaltyping.Union[IResolvable, ListenerTlsProperty]tlsoptionalIResolvableTlsoptionalIResolvableTlsoptionalinterface{} #
A reference to an object that represents the Transport Layer Security (TLS) properties for a listener.