Share via


Add DNS Server

 

The Add DNS Server operation adds a DNS server definition to an existing deployment.

Request

The Add DNS Server request is specified as follows. Replace <subscription-id> with your subscription ID, <service-name> with the name of the cloud service, and <deployment-name> with the name of the deployment.

Method

Request URI

POST

https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/dnsservers/

URI Parameters

None.

Request Headers

The following table describes the request headers.

Request Header

Description

Content-Type

Required. Set this header to application/xml.

x-ms-version

Required. Specifies the version of the operation to use for this request. The value of this header must be set to 2014-06-01 or higher.

Request Body

The format of the request body is as follows:

<?xml version="1.0" encoding="utf-8"?>
<DnsServer xmlns="https://schemas.microsoft.com/windowsazure">
  <Name>name-of-dns-server</ServiceName>
  <Address>ip-address-of-dns-server</Address>
</DnsServer>

The following table describes the elements of the request body.

Element Name

Description

Name

Required. Specifies the name of the DNS server.

Address

Required. Specifies the IP address of the DNS server.

Response

The response includes an HTTP status code and a set of response headers.

Status Code

A successful operation returns status code 201 (Created).

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers.

Response Header

Description

x-ms-request-id

A value that uniquely identifies a request made against the management service.

Response Body

None.