# BackendProperty

An object that represents the backends that a virtual node is expected to send outbound traffic to.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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 backendProperty: appmesh.CfnVirtualNode.BackendProperty = {
  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:

```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_property = 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:

```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.*;

BackendProperty backendProperty = 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();
```

C# / .NET:

```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 backendProperty = 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 }
            }
        }
    }
};
```

Golang:

```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"

backendProperty := &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

- `virtualService`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.VirtualServiceBackendProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.VirtualServiceBackendProperty.html) — Specifies a virtual service to use as a backend.
