interface PrivateDnsNamespaceProps
| Language | Type name | 
|---|---|
  .NET | Amazon.CDK.AWS.ServiceDiscovery.PrivateDnsNamespaceProps | 
  Go | github.com/aws/aws-cdk-go/awscdk/v2/awsservicediscovery#PrivateDnsNamespaceProps | 
  Java | software.amazon.awscdk.services.servicediscovery.PrivateDnsNamespaceProps | 
  Python | aws_cdk.aws_servicediscovery.PrivateDnsNamespaceProps | 
  TypeScript (source) | aws-cdk-lib » aws_servicediscovery » PrivateDnsNamespaceProps | 
Example
import * as ec2 from '../../aws-ec2';
import * as elbv2 from '../../aws-elasticloadbalancingv2';
import * as cdk from '../../core';
import * as servicediscovery from '../lib';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-servicediscovery-integ');
const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 });
const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', {
  name: 'boobar.com',
  vpc,
});
const service = namespace.createService('Service', {
  dnsRecordType: servicediscovery.DnsRecordType.A_AAAA,
  dnsTtl: cdk.Duration.seconds(30),
  loadBalancer: true,
});
const loadbalancer = new elbv2.ApplicationLoadBalancer(stack, 'LB', { vpc, internetFacing: true });
service.registerLoadBalancer('Loadbalancer', loadbalancer);
const arnService = namespace.createService('ArnService', {
  discoveryType: servicediscovery.DiscoveryType.API,
});
arnService.registerNonIpInstance('NonIpInstance', {
  customAttributes: { arn: 'arn://' },
});
app.synth();
Properties
| Name | Type | Description | 
|---|---|---|
| name | string | A name for the Namespace. | 
| vpc | IVpc | The Amazon VPC that you want to associate the namespace with. | 
| description? | string | A 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.

 .NET
 Go
 Java
 Python
 TypeScript (