Skip to content
v2.278.0

VirtualServiceBackendProperty Struct ​

An object that represents a virtual service backend 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 virtualServiceBackendProperty: appmesh.CfnVirtualNode.VirtualServiceBackendProperty = {
  virtualServiceName: 'virtualServiceName',

  // the properties below are optional
  clientPolicy: {
    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

virtual_service_backend_property = appmesh.CfnVirtualNode.VirtualServiceBackendProperty(
    virtual_service_name="virtualServiceName",

    # the properties below are optional
    client_policy=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.*;

VirtualServiceBackendProperty virtualServiceBackendProperty = VirtualServiceBackendProperty.builder()
        .virtualServiceName("virtualServiceName")

        // the properties below are optional
        .clientPolicy(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())
        .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 virtualServiceBackendProperty = new VirtualServiceBackendProperty {
    VirtualServiceName = "virtualServiceName",

    // the properties below are optional
    ClientPolicy = 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"

virtualServiceBackendProperty := &VirtualServiceBackendProperty{
	VirtualServiceName: jsii.String("virtualServiceName"),

	// the properties below are optional
	ClientPolicy: &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 ​

clientPolicyoptionalIResolvable | CfnVirtualNode.ClientPolicyPropertyclient_policyoptionaltyping.Union[IResolvable, ClientPolicyProperty]clientPolicyoptionalIResolvableClientPolicyoptionalIResolvableClientPolicyoptionalinterface{} #
A reference to an object that represents the client policy for a backend.
virtualServiceNamestringvirtual_service_namestrvirtualServiceNameStringVirtualServiceNamestringVirtualServiceName*string required #
The name of the virtual service that is acting as a virtual node backend.
notes

App Mesh doesn't validate the existence of those virtual services specified in backends. This is to prevent a cyclic dependency between virtual nodes and virtual services creation. Make sure the virtual service name is correct. The virtual service can be created afterwards if it doesn't already exist.