Skip to content
v2.277.0

ClientPolicyProperty Struct ​

An object that represents a 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 clientPolicyProperty: appmesh.CfnVirtualNode.ClientPolicyProperty = {
  tls: {
    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_property = appmesh.CfnVirtualNode.ClientPolicyProperty(
    tls=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.*;

ClientPolicyProperty clientPolicyProperty = ClientPolicyProperty.builder()
        .tls(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())
        .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 clientPolicyProperty = new ClientPolicyProperty {
    Tls = 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"

clientPolicyProperty := &ClientPolicyProperty{
	Tls: &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 ​

tlsoptionalIResolvable | CfnVirtualNode.ClientPolicyTlsPropertytlsoptionaltyping.Union[IResolvable, ClientPolicyTlsProperty]tlsoptionalIResolvableTlsoptionalIResolvableTlsoptionalinterface{}#
A reference to an object that represents a Transport Layer Security (TLS) client policy.