Skip to content
v2.276.0

ServiceDiscoveryConfig Struct ​

Properties for VirtualNode Service Discovery.

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 serviceDiscoveryConfig: appmesh.ServiceDiscoveryConfig = {
  cloudmap: {
    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 ​

Cloud Map based Service Discovery.

Default: no Cloud Map based service discovery

DNS based Service Discovery.

Default: no DNS based service discovery