Skip to content
v2.278.0

BackendConfig Struct ​

Properties for a backend.

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 backendConfig: appmesh.BackendConfig = {
  virtualServiceBackend: {
    virtualService: {
      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

backend_config = appmesh.BackendConfig(
    virtual_service_backend=appmesh.CfnVirtualNode.BackendProperty(
        virtual_service=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.*;

BackendConfig backendConfig = BackendConfig.builder()
        .virtualServiceBackend(BackendProperty.builder()
                .virtualService(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())
                .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 backendConfig = new BackendConfig {
    VirtualServiceBackend = new BackendProperty {
        VirtualService = 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"

backendConfig := &BackendConfig{
	VirtualServiceBackend: &BackendProperty{
		VirtualService: &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 ​

virtualServiceBackendCfnVirtualNode.BackendPropertyvirtual_service_backendBackendPropertyvirtualServiceBackendBackendPropertyVirtualServiceBackendBackendPropertyVirtualServiceBackendBackendProperty required #
Config for a Virtual Service backend.