Skip to content
v2.273.0

PrivateDnsNamespaceProps Struct ​

Example ​

ts
const vpc = new ec2.Vpc(this, 'vpc');
const namespace = new cloudmap.PrivateDnsNamespace(this, 'test-namespace', {
    vpc,
    name: 'domain.local',
});
const service = namespace.createService('Svc');

declare const mesh: appmesh.Mesh;
const node = mesh.addVirtualNode('virtual-node', {
  serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
  listeners: [appmesh.VirtualNodeListener.http({
    port: 8081,
    healthCheck: appmesh.HealthCheck.http({
      healthyThreshold: 3,
      interval: Duration.seconds(5), // minimum
      path: '/health-check-path',
      timeout: Duration.seconds(2), // minimum
      unhealthyThreshold: 2,
    }),
  })],
  accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
});

Properties ​

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= none#
A description of the Namespace.
namestringnamestrnameStringNamestringName*stringrequired#
A name for the Namespace.
vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpcrequired#
The Amazon VPC that you want to associate the namespace with.

Used as props by ​