Skip to content
v2.277.0

ClientPolicyTlsProperty Struct ​

A reference to an object that represents a Transport Layer Security (TLS) client policy.

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 clientPolicyTlsProperty: appmesh.CfnVirtualNode.ClientPolicyTlsProperty = {
  validation: {
    trust: {
      acm: {
        certificateAuthorityArns: ['certificateAuthorityArns'],
      },
      file: {
        certificateChain: 'certificateChain',
      },
      sds: {
        secretName: 'secretName',
      },
    },

    // the properties below are optional
    subjectAlternativeNames: {
      match: {
        exact: ['exact'],
      },
    },
  },

  // the properties below are optional
  certificate: {
    file: {
      certificateChain: 'certificateChain',
      privateKey: 'privateKey',
    },
    sds: {
      secretName: 'secretName',
    },
  },
  enforce: false,
  ports: [123],
};
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

client_policy_tls_property = appmesh.CfnVirtualNode.ClientPolicyTlsProperty(
    validation=appmesh.CfnVirtualNode.TlsValidationContextProperty(
        trust=appmesh.CfnVirtualNode.TlsValidationContextTrustProperty(
            acm=appmesh.CfnVirtualNode.TlsValidationContextAcmTrustProperty(
                certificate_authority_arns=["certificateAuthorityArns"]
            ),
            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"]
            )
        )
    ),

    # the properties below are optional
    certificate=appmesh.CfnVirtualNode.ClientTlsCertificateProperty(
        file=appmesh.CfnVirtualNode.ListenerTlsFileCertificateProperty(
            certificate_chain="certificateChain",
            private_key="privateKey"
        ),
        sds=appmesh.CfnVirtualNode.ListenerTlsSdsCertificateProperty(
            secret_name="secretName"
        )
    ),
    enforce=False,
    ports=[123]
)
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.*;

ClientPolicyTlsProperty clientPolicyTlsProperty = ClientPolicyTlsProperty.builder()
        .validation(TlsValidationContextProperty.builder()
                .trust(TlsValidationContextTrustProperty.builder()
                        .acm(TlsValidationContextAcmTrustProperty.builder()
                                .certificateAuthorityArns(List.of("certificateAuthorityArns"))
                                .build())
                        .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())

        // the properties below are optional
        .certificate(ClientTlsCertificateProperty.builder()
                .file(ListenerTlsFileCertificateProperty.builder()
                        .certificateChain("certificateChain")
                        .privateKey("privateKey")
                        .build())
                .sds(ListenerTlsSdsCertificateProperty.builder()
                        .secretName("secretName")
                        .build())
                .build())
        .enforce(false)
        .ports(List.of(123))
        .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 clientPolicyTlsProperty = new ClientPolicyTlsProperty {
    Validation = new TlsValidationContextProperty {
        Trust = new TlsValidationContextTrustProperty {
            Acm = new TlsValidationContextAcmTrustProperty {
                CertificateAuthorityArns = new [] { "certificateAuthorityArns" }
            },
            File = new TlsValidationContextFileTrustProperty {
                CertificateChain = "certificateChain"
            },
            Sds = new TlsValidationContextSdsTrustProperty {
                SecretName = "secretName"
            }
        },

        // the properties below are optional
        SubjectAlternativeNames = new SubjectAlternativeNamesProperty {
            Match = new SubjectAlternativeNameMatchersProperty {
                Exact = new [] { "exact" }
            }
        }
    },

    // the properties below are optional
    Certificate = new ClientTlsCertificateProperty {
        File = new ListenerTlsFileCertificateProperty {
            CertificateChain = "certificateChain",
            PrivateKey = "privateKey"
        },
        Sds = new ListenerTlsSdsCertificateProperty {
            SecretName = "secretName"
        }
    },
    Enforce = false,
    Ports = new [] { 123 }
};
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"

clientPolicyTlsProperty := &ClientPolicyTlsProperty{
	Validation: &TlsValidationContextProperty{
		Trust: &TlsValidationContextTrustProperty{
			Acm: &TlsValidationContextAcmTrustProperty{
				CertificateAuthorityArns: []*string{
					jsii.String("certificateAuthorityArns"),
				},
			},
			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"),
				},
			},
		},
	},

	// the properties below are optional
	Certificate: &ClientTlsCertificateProperty{
		File: &ListenerTlsFileCertificateProperty{
			CertificateChain: jsii.String("certificateChain"),
			PrivateKey: jsii.String("privateKey"),
		},
		Sds: &ListenerTlsSdsCertificateProperty{
			SecretName: jsii.String("secretName"),
		},
	},
	Enforce: jsii.Boolean(false),
	Ports: []interface{}{
		jsii.Number(123),
	},
}

Properties ​

certificateoptionalIResolvable | CfnVirtualNode.ClientTlsCertificatePropertycertificateoptionaltyping.Union[IResolvable, ClientTlsCertificateProperty]certificateoptionalIResolvableCertificateoptionalIResolvableCertificateoptionalinterface{}#
A reference to an object that represents a client's TLS certificate.
enforceoptionalboolean | IResolvableenforceoptionaltyping.Union[bool, IResolvable]enforceoptionalBooleanEnforceoptionalboolEnforceoptionalinterface{}#
Whether the policy is enforced.

The default is True , if a value isn't specified.

portsoptionalnumber[] | IResolvableportsoptionaltyping.Union[typing.List[int | float], IResolvable]portsoptionalList<Number>Portsoptionaldouble[]Portsoptionalinterface{}#
One or more ports that the policy is enforced for.
validationIResolvable | CfnVirtualNode.TlsValidationContextPropertyvalidationtyping.Union[IResolvable, TlsValidationContextProperty]validationIResolvableValidationIResolvableValidationinterface{}required#
A reference to an object that represents a TLS validation context.