Skip to content

Create Private Dns Namespace

servicediscovery_create_private_dns_namespace R Documentation

Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC

Description

Creates a private namespace based on DNS, which is 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 is backend.example.com. Service instances that are registered using a private DNS namespace can be discovered using either a discover_instances 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 Cloud Map quotas in the Cloud Map Developer Guide.

Usage

servicediscovery_create_private_dns_namespace(Name, CreatorRequestId,
  Description, Vpc, Tags, Properties)

Arguments

Name

[required] The name that you want to assign to this namespace. When you create a private DNS namespace, Cloud Map automatically creates an Amazon RouteĀ 53 private hosted zone that has the same name as the namespace.

CreatorRequestId

A unique string that identifies the request and that allows failed create_private_dns_namespace requests to be retried without the risk of running the operation twice. CreatorRequestId can be any unique string (for example, a date/timestamp).

Description

A description for the namespace.

Vpc

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

Tags

The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.

Properties

Properties for the private DNS namespace.

Value

A list with the following syntax:

list(
  OperationId = "string"
)

Request syntax

svc$create_private_dns_namespace(
  Name = "string",
  CreatorRequestId = "string",
  Description = "string",
  Vpc = "string",
  Tags = list(
    list(
      Key = "string",
      Value = "string"
    )
  ),
  Properties = list(
    DnsProperties = list(
      SOA = list(
        TTL = 123
      )
    )
  )
)

Examples

## Not run: 
# Example: Create private DNS namespace
svc$create_private_dns_namespace(
  CreatorRequestId = "eedd6892-50f3-41b2-8af9-611d6e1d1a8c",
  Name = "example.com",
  Vpc = "vpc-1c56417b"
)

## End(Not run)