AWS::ServiceDiscovery::PublicDnsNamespace
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 Amazon Web Services account, see Amazon Cloud Map quotas in the
Amazon Cloud Map Developer Guide.
Important
The CreatePublicDnsNamespace API operation is not supported in the Amazon GovCloud (US) Regions.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ServiceDiscovery::PublicDnsNamespace", "Properties" : { "Description" :String, "Name" :String, "Properties" :Properties, "Tags" :[ Tag, ... ]} }
YAML
Type: AWS::ServiceDiscovery::PublicDnsNamespace Properties: Description:StringName:StringProperties:PropertiesTags:- Tag
Properties
Description-
A description for the namespace.
Required: No
Type: String
Maximum:
1024Update requires: No interruption
Name-
The name that you want to assign to this namespace.
Note
Do not include sensitive information in the name. The name is publicly available using DNS queries.
Required: Yes
Type: String
Maximum:
253Pattern:
^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?$Update requires: Replacement
Properties-
Properties for the public DNS namespace.
Required: No
Type: Properties
Update requires: No interruption
Tags-
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.
Required: No
Type: List of Tag
Maximum:
200Update requires: Updates are not supported.
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the value of Id for the namespace, such as
ns-e4anhexample0004.
For more information about using the Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.
Examples
Create a public DNS namespace
The following example creates a public DNS namespace named example.com.
JSON
{ "Type" : "AWS::ServiceDiscovery::PublicDnsNamespace", "Properties" : { "Description" : "Amazon Cloud Map public DNS namespace for example.com website", "Name" : "example.com", "Properties": { "DnsProperties": { "SOA": { "TTL": 100 } } } } }
YAML
Type: 'AWS::ServiceDiscovery::PublicDnsNamespace' Properties: Description: Amazon Cloud Map public DNS namespace for example.com website Name: example.com Properties: DnsProperties: SOA: TTL: 100
See also
-
CreatePublicDnsNamespace in the Amazon Cloud Map API Reference