Skip to content
v2.278.0

ListenerTlsProperty Struct ​

An object that represents the Transport Layer Security (TLS) properties for a listener.

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 listenerTlsProperty: appmesh.CfnVirtualNode.ListenerTlsProperty = {
  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_tls_property = 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.*;

ListenerTlsProperty listenerTlsProperty = 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();
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 listenerTlsProperty = 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"

listenerTlsProperty := &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 ​

certificateIResolvable | CfnVirtualNode.ListenerTlsCertificatePropertycertificatetyping.Union[IResolvable, ListenerTlsCertificateProperty]certificateIResolvableCertificateIResolvableCertificateinterface{} required #
A reference to an object that represents a listener's Transport Layer Security (TLS) certificate.
modestringmodestrmodeStringModestringMode*string required #
Specify one of the following modes.
  • ** STRICT – Listener only accepts connections with TLS enabled.
  • ** PERMISSIVE – Listener accepts connections with or without TLS enabled.
  • ** DISABLED – Listener only accepts connections without TLS.
validationoptionalIResolvable | CfnVirtualNode.ListenerTlsValidationContextPropertyvalidationoptionaltyping.Union[IResolvable, ListenerTlsValidationContextProperty]validationoptionalIResolvableValidationoptionalIResolvableValidationoptionalinterface{} #
A reference to an object that represents a listener's Transport Layer Security (TLS) validation context.