# VirtualNodeSpecProperty

An object that represents the specification of a virtual node.

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## 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',
    },
  },
};
```

## Properties

- `backendDefaults`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.BackendDefaultsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.BackendDefaultsProperty.html) — A reference to an object that represents the defaults for backends.

- `backends`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.BackendProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.BackendProperty.html)[] — The backends that the virtual node is expected to send outbound traffic to.

  > 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.

- `listeners`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.ListenerProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.ListenerProperty.html)[] — The listener that the virtual node is expected to receive inbound traffic from.

  You can specify one listener.

- `logging`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.LoggingProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.LoggingProperty.html) — The inbound and outbound access logging information for the virtual node.

- `serviceDiscovery`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.ServiceDiscoveryProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.ServiceDiscoveryProperty.html) — 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.
