AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ServiceDiscovery::PublicDnsNamespace

CfnPublicDnsNamespace

Creates a public namespace based on DNS, which is visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace `example.com` and name your service `backend` , the resulting DNS name for the service is `backend.example.com` . You can discover instances that were registered with a public DNS namespace by using either a `DiscoverInstances` request or using DNS. For the current quota on the number of namespaces that you can create using the same AWS account , see [AWS Cloud Map quotas](https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the *AWS Cloud Map Developer Guide* . > The `CreatePublicDnsNamespace` API operation is not supported in the AWS GovCloud (US) Regions.

Import

import { CfnPublicDnsNamespace } from 'aws-cdk-lib/aws-servicediscovery';

Or use the module namespace:

import * as servicediscovery from 'aws-cdk-lib/aws-servicediscovery';
// servicediscovery.CfnPublicDnsNamespace

Properties

Configuration passed to the constructor as CfnPublicDnsNamespaceProps.

nameRequired
string

The name that you want to assign to this namespace. > Do not include sensitive information in the name. The name is publicly available using DNS queries.

descriptionOptional
string

A description for the namespace.

propertiesOptional
IResolvable | PropertiesProperty

Properties for the public DNS namespace.

tagsOptional
CfnTag[]

The tags for the namespace. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-servicediscovery
CFN TypeAWS::ServiceDiscovery::PublicDnsNamespace
Properties4

External Links