aws-cdk-lib.aws_servicediscovery.PrivateDnsNamespaceProps

interface PrivateDnsNamespaceProps

LanguageType name
.NETAmazon.CDK.AWS.ServiceDiscovery.PrivateDnsNamespaceProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsservicediscovery#PrivateDnsNamespaceProps
Javasoftware.amazon.awscdk.services.servicediscovery.PrivateDnsNamespaceProps
Pythonaws_cdk.aws_servicediscovery.PrivateDnsNamespaceProps
TypeScript (source)aws-cdk-lib » aws_servicediscovery » PrivateDnsNamespaceProps

Example

// Cloud Map service discovery is currently required for host ejection by outlier detection
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({
    outlierDetection: {
      baseEjectionDuration: Duration.seconds(10),
      interval: Duration.seconds(30),
      maxEjectionPercent: 50,
      maxServerErrors: 5,
    },
  })],
});

Properties

NameTypeDescription
namestringA name for the Namespace.
vpcIVpcThe Amazon VPC that you want to associate the namespace with.
description?stringA description of the Namespace.

name

Type: string

A name for the Namespace.


vpc

Type: IVpc

The Amazon VPC that you want to associate the namespace with.


description?

Type: string (optional, default: none)

A description of the Namespace.