AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the CreatePrivateDnsNamespace operation. 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 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 Cloud Map quotas in the Cloud Map Developer Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.ServiceDiscovery.AmazonServiceDiscoveryRequest
      Amazon.ServiceDiscovery.Model.CreatePrivateDnsNamespaceRequest

Namespace: Amazon.ServiceDiscovery.Model
Assembly: AWSSDK.ServiceDiscovery.dll
Version: 3.x.y.z

Syntax

C#
public class CreatePrivateDnsNamespaceRequest : AmazonServiceDiscoveryRequest
         IAmazonWebServiceRequest

The CreatePrivateDnsNamespaceRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property CreatorRequestId System.String

Gets and sets the property CreatorRequestId.

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

Public Property Description System.String

Gets and sets the property Description.

A description for the namespace.

Public Property Name System.String

Gets and sets the property Name.

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.

Public Property Properties Amazon.ServiceDiscovery.Model.PrivateDnsNamespaceProperties

Gets and sets the property Properties.

Properties for the private DNS namespace.

Public Property Tags System.Collections.Generic.List<Amazon.ServiceDiscovery.Model.Tag>

Gets and sets the property 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.

Public Property Vpc System.String

Gets and sets the property Vpc.

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

Examples

Example: Create private DNS namespace

Example: Create private DNS namespace


var client = new AmazonServiceDiscoveryClient();
var response = client.CreatePrivateDnsNamespace(new CreatePrivateDnsNamespaceRequest 
{
    CreatorRequestId = "eedd6892-50f3-41b2-8af9-611d6e1d1a8c",
    Name = "example.com",
    Vpc = "vpc-1c56417b"
});

string operationId = response.OperationId;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5