Skip to main content
A newer release of this product is available.

Create DNS domain and server configurations

Contributors

POST /name-services/dns

Creates DNS domain and server configurations for an SVM.

Important notes

  • Each SVM can have only one DNS configuration.

  • The domain name and the servers fields cannot be empty.

  • IPv6 must be enabled if IPv6 family addresses are specified in the servers field.

  • Configuring more than one DNS server is recommended to avoid a single point of failure.

  • The DNS server specified using the servers field is validated during this operation.

The validation fails in the following scenarios:

  1. The server is not a DNS server.

  2. The server does not exist.

  3. The server is unreachable.

Parameters

Name Type In Required Description

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

Request Body

Name Type Description

_links

_links

domains

array[string]

A list of DNS domains. Domain names have the following requirements:

  • The name must contain only the following characters: A through Z, a through z, 0 through 9, ".", "-" or "_".

  • The first character of each label, delimited by ".", must be one of the following characters: A through Z or a through z or 0 through 9.

  • The last character of each label, delimited by ".", must be one of the following characters: A through Z, a through z, or 0 through 9.

  • The top level domain must contain only the following characters: A through Z, a through z.

  • The system reserves the following names:"all", "local", and "localhost".

servers

array[string]

The list of IP addresses of the DNS servers. Addresses can be either IPv4 or IPv6 addresses.

svm

svm

Example request
{
  "_links": {
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "domains": [
    "example.com",
    "example2.example3.com"
  ],
  "servers": [
    "10.224.65.20",
    "2001:db08:a0b:12f0::1"
  ],
  "svm": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "svm1",
    "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
  }
}

Response

Status: 201, Created
Name Type Description

_links

_links

num_records

integer

Number of DNS domain records

records

array[dns]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "records": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "domains": [
      "example.com",
      "example2.example3.com"
    ],
    "servers": [
      "10.224.65.20",
      "2001:db08:a0b:12f0::1"
    ],
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    }
  }
}

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

2621706

The specified SVM UUID is incorrect for the specified SVM name

8847360

Only admin or data SVMs allowed

8847361

Exceeded the maximum number of domains allowed. Maximum of six domains only

8847362

Exceeded the maximum number of name servers allowed. Maximum of three name servers only

8847392

Domain name cannot be an IP address

8847393

Top level domain name is invalid

8847399

One or more of the specified DNS servers do not exist or cannot be reached

8847394

FQDN name violated the limitations

9240587

FQDN name cannot be empty

9240588

FQDN name is too long. Maximum supported length: 255 characters

9240590

FQDN name is reserved. Following names are reserved: "all", "local" and "localhost"

9240607

One of the FQDN labels is too long. Maximum supported length: 63 characters

13434916

The SVM is in the process of being created. Wait a few minutes, and then try the command again.

23724130

Cannot use an IPv6 name server address because there are no IPv6 LIFs

Name Type Description

error

error

Example error
{
  "error": {
    "arguments": {
      "code": "string",
      "message": "string"
    },
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

self

href

svm

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

dns

Name Type Description

_links

_links

domains

array[string]

A list of DNS domains. Domain names have the following requirements:

  • The name must contain only the following characters: A through Z, a through z, 0 through 9, ".", "-" or "_".

  • The first character of each label, delimited by ".", must be one of the following characters: A through Z or a through z or 0 through 9.

  • The last character of each label, delimited by ".", must be one of the following characters: A through Z, a through z, or 0 through 9.

  • The top level domain must contain only the following characters: A through Z, a through z.

  • The system reserves the following names:"all", "local", and "localhost".

servers

array[string]

The list of IP addresses of the DNS servers. Addresses can be either IPv4 or IPv6 addresses.

svm

svm

Name Type Description

next

href

self

href

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.