Amazon Route 53
API Reference

CreatePrivateDnsNamespace

Creates a private namespace based on DNS, which will be visible only inside a specified Amazon VPC. 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 will be backend.example.com. For the current limit on the number of namespaces that you can create using the same AWS account, see Limits on Auto Naming in the Route 53 Developer Guide.

Request Syntax

{ "CreatorRequestId": "string", "Description": "string", "Name": "string", "Vpc": "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.

CreatorRequestId

A unique string that identifies the request and that allows failed CreatePrivateDnsNamespace 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

Description

A description for the namespace.

Type: String

Length Constraints: Maximum length of 1024.

Required: No

Name

The name that you want to assign to this namespace. When you create a namespace, Amazon Route 53 automatically creates a hosted zone that has the same name as the namespace.

Type: String

Length Constraints: Maximum length of 1024.

Required: Yes

Vpc

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

Type: String

Length Constraints: Maximum length of 64.

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.

OperationId

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.

Errors

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

DuplicateRequest

The operation is already in progress.

HTTP Status Code: 400

InvalidInput

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

NamespaceAlreadyExists

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

HTTP Status Code: 400

ResourceLimitExceeded

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

HTTP Status Code: 400

See Also

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