AWS Cloud Map
API Reference (API Version 2017-03-14)

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.


Creates a public namespace based on DNS, which will be visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace and name your service backend, the resulting DNS name for the service will be For the current limit on the number of namespaces that you can create using the same AWS account, see AWS Cloud Map Limits in the AWS Cloud Map Developer Guide.

Request Syntax

{ "CreatorRequestId": "string", "Description": "string", "Name": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


A unique string that identifies the request and that allows failed CreatePublicDnsNamespace requests to be retried without the risk of executing the operation twice. CreatorRequestId can be any unique string, for example, a date/time stamp.

Type: String

Length Constraints: Maximum length of 64.

Required: No


A description for the namespace.

Type: String

Length Constraints: Maximum length of 1024.

Required: No


The name that you want to assign to this namespace.

Type: String

Length Constraints: Maximum length of 1024.

Required: Yes

Response Syntax

{ "OperationId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


A value that you can use to determine whether the request completed successfully. To get the status of the operation, see GetOperation.

Type: String

Length Constraints: Maximum length of 255.


For information about the errors that are common to all actions, see Common Errors.


The operation is already in progress.

HTTP Status Code: 400


One or more specified values aren't valid. For example, a required value might be missing, a numeric value might be outside the allowed range, or a string value might exceed length constraints.

HTTP Status Code: 400


The namespace that you're trying to create already exists.

HTTP Status Code: 400


The resource can't be created because you've reached the limit on the number of resources.

HTTP Status Code: 400


CreatePublicDnsNamespace Example

Sample Request

POST / HTTP/1.1 x-amz-date:20181118T211705Z authorization: AWS4-HMAC-SHA256 Credential=AKIAIIO2CIV3EXAMPLE/20181118/us-west-2/servicediscovery/aws4_request, SignedHeaders=content-length;content-type;host;user-agent;x-amz-date;x-amz-target, Signature=[calculated-signature] x-amz-target:Route53AutoNaming_v20170314.CreatePublicDnsNamespace content-type:application/x-amz-json-1.1 content-length:[number of characters in the JSON string] { "CreatorRequestId": "example-creator-request-id-0003", "Name": "", "Description": " Cloud Map Public DNS Namespace" }

Sample Response

HTTP/1.1 200 Content-Length: 59 Content-Type: application/x-amz-json-1.1 { "OperationId":"dns2voqozuhfet5kzxoxg-a-response-example" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: