Skip to content
v2.278.0

VirtualNodeSpecProperty Struct ​

An object that represents the specification of 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 virtualNodeSpecProperty: appmesh.CfnVirtualNode.VirtualNodeSpecProperty = {
  backendDefaults: {
    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],
      },
    },
  },
  backends: [{
    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],
        },
      },
    },
  }],
  listeners: [{
    portMapping: {
      port: 123,
      protocol: 'protocol',
    },

    // the properties below are optional
    connectionPool: {
      grpc: {
        maxRequests: 123,
      },
      http: {
        maxConnections: 123,

        // the properties below are optional
        maxPendingRequests: 123,
      },
      http2: {
        maxRequests: 123,
      },
      tcp: {
        maxConnections: 123,
      },
    },
    healthCheck: {
      healthyThreshold: 123,
      intervalMillis: 123,
      protocol: 'protocol',
      timeoutMillis: 123,
      unhealthyThreshold: 123,

      // the properties below are optional
      path: 'path',
      port: 123,
    },
    outlierDetection: {
      baseEjectionDuration: {
        unit: 'unit',
        value: 123,
      },
      interval: {
        unit: 'unit',
        value: 123,
      },
      maxEjectionPercent: 123,
      maxServerErrors: 123,
    },
    timeout: {
      grpc: {
        idle: {
          unit: 'unit',
          value: 123,
        },
        perRequest: {
          unit: 'unit',
          value: 123,
        },
      },
      http: {
        idle: {
          unit: 'unit',
          value: 123,
        },
        perRequest: {
          unit: 'unit',
          value: 123,
        },
      },
      http2: {
        idle: {
          unit: 'unit',
          value: 123,
        },
        perRequest: {
          unit: 'unit',
          value: 123,
        },
      },
      tcp: {
        idle: {
          unit: 'unit',
          value: 123,
        },
      },
    },
    tls: {
      certificate: {
        acm: {
          certificateArn: 'certificateArn',
        },
        file: {
          certificateChain: 'certificateChain',
          privateKey: 'privateKey',
        },
        sds: {
          secretName: 'secretName',
        },
      },
      mode: 'mode',

      // the properties below are optional
      validation: {
        trust: {
          file: {
            certificateChain: 'certificateChain',
          },
          sds: {
            secretName: 'secretName',
          },
        },

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

        // the properties below are optional
        format: {
          json: [{
            key: 'key',
            value: 'value',
          }],
          text: 'text',
        },
      },
    },
  },
  serviceDiscovery: {
    awsCloudMap: {
      namespaceName: 'namespaceName',
      serviceName: 'serviceName',

      // the properties below are optional
      attributes: [{
        key: 'key',
        value: 'value',
      }],
      ipPreference: 'ipPreference',
    },
    dns: {
      hostname: 'hostname',

      // the properties below are optional
      ipPreference: 'ipPreference',
      responseType: 'responseType',
    },
  },
};
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_node_spec_property = appmesh.CfnVirtualNode.VirtualNodeSpecProperty(
    backend_defaults=appmesh.CfnVirtualNode.BackendDefaultsProperty(
        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]
            )
        )
    ),
    backends=[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]
                )
            )
        )
    )],
    listeners=[appmesh.CfnVirtualNode.ListenerProperty(
        port_mapping=appmesh.CfnVirtualNode.PortMappingProperty(
            port=123,
            protocol="protocol"
        ),

        # the properties below are optional
        connection_pool=appmesh.CfnVirtualNode.VirtualNodeConnectionPoolProperty(
            grpc=appmesh.CfnVirtualNode.VirtualNodeGrpcConnectionPoolProperty(
                max_requests=123
            ),
            http=appmesh.CfnVirtualNode.VirtualNodeHttpConnectionPoolProperty(
                max_connections=123,

                # the properties below are optional
                max_pending_requests=123
            ),
            http2=appmesh.CfnVirtualNode.VirtualNodeHttp2ConnectionPoolProperty(
                max_requests=123
            ),
            tcp=appmesh.CfnVirtualNode.VirtualNodeTcpConnectionPoolProperty(
                max_connections=123
            )
        ),
        health_check=appmesh.CfnVirtualNode.HealthCheckProperty(
            healthy_threshold=123,
            interval_millis=123,
            protocol="protocol",
            timeout_millis=123,
            unhealthy_threshold=123,

            # the properties below are optional
            path="path",
            port=123
        ),
        outlier_detection=appmesh.CfnVirtualNode.OutlierDetectionProperty(
            base_ejection_duration=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            ),
            interval=appmesh.CfnVirtualNode.DurationProperty(
                unit="unit",
                value=123
            ),
            max_ejection_percent=123,
            max_server_errors=123
        ),
        timeout=appmesh.CfnVirtualNode.ListenerTimeoutProperty(
            grpc=appmesh.CfnVirtualNode.GrpcTimeoutProperty(
                idle=appmesh.CfnVirtualNode.DurationProperty(
                    unit="unit",
                    value=123
                ),
                per_request=appmesh.CfnVirtualNode.DurationProperty(
                    unit="unit",
                    value=123
                )
            ),
            http=appmesh.CfnVirtualNode.HttpTimeoutProperty(
                idle=appmesh.CfnVirtualNode.DurationProperty(
                    unit="unit",
                    value=123
                ),
                per_request=appmesh.CfnVirtualNode.DurationProperty(
                    unit="unit",
                    value=123
                )
            ),
            http2=appmesh.CfnVirtualNode.HttpTimeoutProperty(
                idle=appmesh.CfnVirtualNode.DurationProperty(
                    unit="unit",
                    value=123
                ),
                per_request=appmesh.CfnVirtualNode.DurationProperty(
                    unit="unit",
                    value=123
                )
            ),
            tcp=appmesh.CfnVirtualNode.TcpTimeoutProperty(
                idle=appmesh.CfnVirtualNode.DurationProperty(
                    unit="unit",
                    value=123
                )
            )
        ),
        tls=appmesh.CfnVirtualNode.ListenerTlsProperty(
            certificate=appmesh.CfnVirtualNode.ListenerTlsCertificateProperty(
                acm=appmesh.CfnVirtualNode.ListenerTlsAcmCertificateProperty(
                    certificate_arn="certificateArn"
                ),
                file=appmesh.CfnVirtualNode.ListenerTlsFileCertificateProperty(
                    certificate_chain="certificateChain",
                    private_key="privateKey"
                ),
                sds=appmesh.CfnVirtualNode.ListenerTlsSdsCertificateProperty(
                    secret_name="secretName"
                )
            ),
            mode="mode",

            # the properties below are optional
            validation=appmesh.CfnVirtualNode.ListenerTlsValidationContextProperty(
                trust=appmesh.CfnVirtualNode.ListenerTlsValidationContextTrustProperty(
                    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"]
                    )
                )
            )
        )
    )],
    logging=appmesh.CfnVirtualNode.LoggingProperty(
        access_log=appmesh.CfnVirtualNode.AccessLogProperty(
            file=appmesh.CfnVirtualNode.FileAccessLogProperty(
                path="path",

                # the properties below are optional
                format=appmesh.CfnVirtualNode.LoggingFormatProperty(
                    json=[appmesh.CfnVirtualNode.JsonFormatRefProperty(
                        key="key",
                        value="value"
                    )],
                    text="text"
                )
            )
        )
    ),
    service_discovery=appmesh.CfnVirtualNode.ServiceDiscoveryProperty(
        aws_cloud_map=appmesh.CfnVirtualNode.AwsCloudMapServiceDiscoveryProperty(
            namespace_name="namespaceName",
            service_name="serviceName",

            # the properties below are optional
            attributes=[appmesh.CfnVirtualNode.AwsCloudMapInstanceAttributeProperty(
                key="key",
                value="value"
            )],
            ip_preference="ipPreference"
        ),
        dns=appmesh.CfnVirtualNode.DnsServiceDiscoveryProperty(
            hostname="hostname",

            # the properties below are optional
            ip_preference="ipPreference",
            response_type="responseType"
        )
    )
)
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.*;

VirtualNodeSpecProperty virtualNodeSpecProperty = VirtualNodeSpecProperty.builder()
        .backendDefaults(BackendDefaultsProperty.builder()
                .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())
        .backends(List.of(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()))
        .listeners(List.of(ListenerProperty.builder()
                .portMapping(PortMappingProperty.builder()
                        .port(123)
                        .protocol("protocol")
                        .build())

                // the properties below are optional
                .connectionPool(VirtualNodeConnectionPoolProperty.builder()
                        .grpc(VirtualNodeGrpcConnectionPoolProperty.builder()
                                .maxRequests(123)
                                .build())
                        .http(VirtualNodeHttpConnectionPoolProperty.builder()
                                .maxConnections(123)

                                // the properties below are optional
                                .maxPendingRequests(123)
                                .build())
                        .http2(VirtualNodeHttp2ConnectionPoolProperty.builder()
                                .maxRequests(123)
                                .build())
                        .tcp(VirtualNodeTcpConnectionPoolProperty.builder()
                                .maxConnections(123)
                                .build())
                        .build())
                .healthCheck(HealthCheckProperty.builder()
                        .healthyThreshold(123)
                        .intervalMillis(123)
                        .protocol("protocol")
                        .timeoutMillis(123)
                        .unhealthyThreshold(123)

                        // the properties below are optional
                        .path("path")
                        .port(123)
                        .build())
                .outlierDetection(OutlierDetectionProperty.builder()
                        .baseEjectionDuration(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .interval(DurationProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .maxEjectionPercent(123)
                        .maxServerErrors(123)
                        .build())
                .timeout(ListenerTimeoutProperty.builder()
                        .grpc(GrpcTimeoutProperty.builder()
                                .idle(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .perRequest(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .build())
                        .http(HttpTimeoutProperty.builder()
                                .idle(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .perRequest(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .build())
                        .http2(HttpTimeoutProperty.builder()
                                .idle(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .perRequest(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .build())
                        .tcp(TcpTimeoutProperty.builder()
                                .idle(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .build())
                        .build())
                .tls(ListenerTlsProperty.builder()
                        .certificate(ListenerTlsCertificateProperty.builder()
                                .acm(ListenerTlsAcmCertificateProperty.builder()
                                        .certificateArn("certificateArn")
                                        .build())
                                .file(ListenerTlsFileCertificateProperty.builder()
                                        .certificateChain("certificateChain")
                                        .privateKey("privateKey")
                                        .build())
                                .sds(ListenerTlsSdsCertificateProperty.builder()
                                        .secretName("secretName")
                                        .build())
                                .build())
                        .mode("mode")

                        // the properties below are optional
                        .validation(ListenerTlsValidationContextProperty.builder()
                                .trust(ListenerTlsValidationContextTrustProperty.builder()
                                        .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())
                        .build())
                .build()))
        .logging(LoggingProperty.builder()
                .accessLog(AccessLogProperty.builder()
                        .file(FileAccessLogProperty.builder()
                                .path("path")

                                // the properties below are optional
                                .format(LoggingFormatProperty.builder()
                                        .json(List.of(JsonFormatRefProperty.builder()
                                                .key("key")
                                                .value("value")
                                                .build()))
                                        .text("text")
                                        .build())
                                .build())
                        .build())
                .build())
        .serviceDiscovery(ServiceDiscoveryProperty.builder()
                .awsCloudMap(AwsCloudMapServiceDiscoveryProperty.builder()
                        .namespaceName("namespaceName")
                        .serviceName("serviceName")

                        // the properties below are optional
                        .attributes(List.of(AwsCloudMapInstanceAttributeProperty.builder()
                                .key("key")
                                .value("value")
                                .build()))
                        .ipPreference("ipPreference")
                        .build())
                .dns(DnsServiceDiscoveryProperty.builder()
                        .hostname("hostname")

                        // the properties below are optional
                        .ipPreference("ipPreference")
                        .responseType("responseType")
                        .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 virtualNodeSpecProperty = new VirtualNodeSpecProperty {
    BackendDefaults = new BackendDefaultsProperty {
        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 }
            }
        }
    },
    Backends = new [] { 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 }
                }
            }
        }
    } },
    Listeners = new [] { new ListenerProperty {
        PortMapping = new PortMappingProperty {
            Port = 123,
            Protocol = "protocol"
        },

        // the properties below are optional
        ConnectionPool = new VirtualNodeConnectionPoolProperty {
            Grpc = new VirtualNodeGrpcConnectionPoolProperty {
                MaxRequests = 123
            },
            Http = new VirtualNodeHttpConnectionPoolProperty {
                MaxConnections = 123,

                // the properties below are optional
                MaxPendingRequests = 123
            },
            Http2 = new VirtualNodeHttp2ConnectionPoolProperty {
                MaxRequests = 123
            },
            Tcp = new VirtualNodeTcpConnectionPoolProperty {
                MaxConnections = 123
            }
        },
        HealthCheck = new HealthCheckProperty {
            HealthyThreshold = 123,
            IntervalMillis = 123,
            Protocol = "protocol",
            TimeoutMillis = 123,
            UnhealthyThreshold = 123,

            // the properties below are optional
            Path = "path",
            Port = 123
        },
        OutlierDetection = new OutlierDetectionProperty {
            BaseEjectionDuration = new DurationProperty {
                Unit = "unit",
                Value = 123
            },
            Interval = new DurationProperty {
                Unit = "unit",
                Value = 123
            },
            MaxEjectionPercent = 123,
            MaxServerErrors = 123
        },
        Timeout = new ListenerTimeoutProperty {
            Grpc = new GrpcTimeoutProperty {
                Idle = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },
                PerRequest = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                }
            },
            Http = new HttpTimeoutProperty {
                Idle = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },
                PerRequest = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                }
            },
            Http2 = new HttpTimeoutProperty {
                Idle = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },
                PerRequest = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                }
            },
            Tcp = new TcpTimeoutProperty {
                Idle = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                }
            }
        },
        Tls = new ListenerTlsProperty {
            Certificate = new ListenerTlsCertificateProperty {
                Acm = new ListenerTlsAcmCertificateProperty {
                    CertificateArn = "certificateArn"
                },
                File = new ListenerTlsFileCertificateProperty {
                    CertificateChain = "certificateChain",
                    PrivateKey = "privateKey"
                },
                Sds = new ListenerTlsSdsCertificateProperty {
                    SecretName = "secretName"
                }
            },
            Mode = "mode",

            // the properties below are optional
            Validation = new ListenerTlsValidationContextProperty {
                Trust = new ListenerTlsValidationContextTrustProperty {
                    File = new TlsValidationContextFileTrustProperty {
                        CertificateChain = "certificateChain"
                    },
                    Sds = new TlsValidationContextSdsTrustProperty {
                        SecretName = "secretName"
                    }
                },

                // the properties below are optional
                SubjectAlternativeNames = new SubjectAlternativeNamesProperty {
                    Match = new SubjectAlternativeNameMatchersProperty {
                        Exact = new [] { "exact" }
                    }
                }
            }
        }
    } },
    Logging = new LoggingProperty {
        AccessLog = new AccessLogProperty {
            File = new FileAccessLogProperty {
                Path = "path",

                // the properties below are optional
                Format = new LoggingFormatProperty {
                    Json = new [] { new JsonFormatRefProperty {
                        Key = "key",
                        Value = "value"
                    } },
                    Text = "text"
                }
            }
        }
    },
    ServiceDiscovery = new ServiceDiscoveryProperty {
        AwsCloudMap = new AwsCloudMapServiceDiscoveryProperty {
            NamespaceName = "namespaceName",
            ServiceName = "serviceName",

            // the properties below are optional
            Attributes = new [] { new AwsCloudMapInstanceAttributeProperty {
                Key = "key",
                Value = "value"
            } },
            IpPreference = "ipPreference"
        },
        Dns = new DnsServiceDiscoveryProperty {
            Hostname = "hostname",

            // the properties below are optional
            IpPreference = "ipPreference",
            ResponseType = "responseType"
        }
    }
};
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"

virtualNodeSpecProperty := &VirtualNodeSpecProperty{
	BackendDefaults: &BackendDefaultsProperty{
		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),
				},
			},
		},
	},
	Backends: []interface{}{
		&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),
						},
					},
				},
			},
		},
	},
	Listeners: []interface{}{
		&ListenerProperty{
			PortMapping: &PortMappingProperty{
				Port: jsii.Number(123),
				Protocol: jsii.String("protocol"),
			},

			// the properties below are optional
			ConnectionPool: &VirtualNodeConnectionPoolProperty{
				Grpc: &VirtualNodeGrpcConnectionPoolProperty{
					MaxRequests: jsii.Number(123),
				},
				Http: &VirtualNodeHttpConnectionPoolProperty{
					MaxConnections: jsii.Number(123),

					// the properties below are optional
					MaxPendingRequests: jsii.Number(123),
				},
				Http2: &VirtualNodeHttp2ConnectionPoolProperty{
					MaxRequests: jsii.Number(123),
				},
				Tcp: &VirtualNodeTcpConnectionPoolProperty{
					MaxConnections: jsii.Number(123),
				},
			},
			HealthCheck: &HealthCheckProperty{
				HealthyThreshold: jsii.Number(123),
				IntervalMillis: jsii.Number(123),
				Protocol: jsii.String("protocol"),
				TimeoutMillis: jsii.Number(123),
				UnhealthyThreshold: jsii.Number(123),

				// the properties below are optional
				Path: jsii.String("path"),
				Port: jsii.Number(123),
			},
			OutlierDetection: &OutlierDetectionProperty{
				BaseEjectionDuration: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
				Interval: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
				MaxEjectionPercent: jsii.Number(123),
				MaxServerErrors: jsii.Number(123),
			},
			Timeout: &ListenerTimeoutProperty{
				Grpc: &GrpcTimeoutProperty{
					Idle: &DurationProperty{
						Unit: jsii.String("unit"),
						Value: jsii.Number(123),
					},
					PerRequest: &DurationProperty{
						Unit: jsii.String("unit"),
						Value: jsii.Number(123),
					},
				},
				Http: &HttpTimeoutProperty{
					Idle: &DurationProperty{
						Unit: jsii.String("unit"),
						Value: jsii.Number(123),
					},
					PerRequest: &DurationProperty{
						Unit: jsii.String("unit"),
						Value: jsii.Number(123),
					},
				},
				Http2: &HttpTimeoutProperty{
					Idle: &DurationProperty{
						Unit: jsii.String("unit"),
						Value: jsii.Number(123),
					},
					PerRequest: &DurationProperty{
						Unit: jsii.String("unit"),
						Value: jsii.Number(123),
					},
				},
				Tcp: &TcpTimeoutProperty{
					Idle: &DurationProperty{
						Unit: jsii.String("unit"),
						Value: jsii.Number(123),
					},
				},
			},
			Tls: &ListenerTlsProperty{
				Certificate: &ListenerTlsCertificateProperty{
					Acm: &ListenerTlsAcmCertificateProperty{
						CertificateArn: jsii.String("certificateArn"),
					},
					File: &ListenerTlsFileCertificateProperty{
						CertificateChain: jsii.String("certificateChain"),
						PrivateKey: jsii.String("privateKey"),
					},
					Sds: &ListenerTlsSdsCertificateProperty{
						SecretName: jsii.String("secretName"),
					},
				},
				Mode: jsii.String("mode"),

				// the properties below are optional
				Validation: &ListenerTlsValidationContextProperty{
					Trust: &ListenerTlsValidationContextTrustProperty{
						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"),
							},
						},
					},
				},
			},
		},
	},
	Logging: &LoggingProperty{
		AccessLog: &AccessLogProperty{
			File: &FileAccessLogProperty{
				Path: jsii.String("path"),

				// the properties below are optional
				Format: &LoggingFormatProperty{
					Json: []interface{}{
						&JsonFormatRefProperty{
							Key: jsii.String("key"),
							Value: jsii.String("value"),
						},
					},
					Text: jsii.String("text"),
				},
			},
		},
	},
	ServiceDiscovery: &ServiceDiscoveryProperty{
		AwsCloudMap: &AwsCloudMapServiceDiscoveryProperty{
			NamespaceName: jsii.String("namespaceName"),
			ServiceName: jsii.String("serviceName"),

			// the properties below are optional
			Attributes: []interface{}{
				&AwsCloudMapInstanceAttributeProperty{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
			IpPreference: jsii.String("ipPreference"),
		},
		Dns: &DnsServiceDiscoveryProperty{
			Hostname: jsii.String("hostname"),

			// the properties below are optional
			IpPreference: jsii.String("ipPreference"),
			ResponseType: jsii.String("responseType"),
		},
	},
}

Properties ​

backendDefaultsoptionalIResolvable | CfnVirtualNode.BackendDefaultsPropertybackend_defaultsoptionaltyping.Union[IResolvable, BackendDefaultsProperty]backendDefaultsoptionalIResolvableBackendDefaultsoptionalIResolvableBackendDefaultsoptionalinterface{} #
A reference to an object that represents the defaults for backends.
backendsoptionalIResolvable | IResolvable | CfnVirtualNode.BackendProperty[]backendsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, BackendProperty]]]backendsoptionalIResolvableBackendsoptionalIResolvableBackendsoptionalinterface{} #
The backends that the virtual node is expected to send outbound traffic to.
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.

listenersoptionalIResolvable | IResolvable | CfnVirtualNode.ListenerProperty[]listenersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ListenerProperty]]]listenersoptionalIResolvableListenersoptionalIResolvableListenersoptionalinterface{} #
The listener that the virtual node is expected to receive inbound traffic from.

You can specify one listener.

loggingoptionalIResolvable | CfnVirtualNode.LoggingPropertyloggingoptionaltyping.Union[IResolvable, LoggingProperty]loggingoptionalIResolvableLoggingoptionalIResolvableLoggingoptionalinterface{} #
The inbound and outbound access logging information for the virtual node.
serviceDiscoveryoptionalIResolvable | CfnVirtualNode.ServiceDiscoveryPropertyservice_discoveryoptionaltyping.Union[IResolvable, ServiceDiscoveryProperty]serviceDiscoveryoptionalIResolvableServiceDiscoveryoptionalIResolvableServiceDiscoveryoptionalinterface{} #
The service discovery information for the virtual node.

If your virtual node does not expect ingress traffic, you can omit this parameter. If you specify a listener , then you must specify service discovery information.