Create DNS domain and server configurations
Creates DNS domain and server configurations for an SVM, setting up the necessary networking details within the storage environment. This operation is essential for ensuring that your SVM can resolve domain names efficiently, with options to customize settings according to your infrastructure requirements.
HTTP method and endpoint
POST /name-services/dns
Introduced in
ONTAP 9.6
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
serversfield. -
Configuring more than one DNS server is recommended to avoid a single point of failure.
-
The DNS server specified using the
serversfield is validated during this operation.
The validation fails in the following scenarios:
-
The server is not a DNS server.
-
The server does not exist.
-
The server is unreachable.
-
The DNS server validation can be skipped by setting the property "skip_config_validation" to "true".
-
Scope of the SVM can be specified using the "scope" parameter. "svm" scope refers to data SVMs and "cluster" scope refers to clusters.
-
The following parameters are optional:
-
timeout
-
attempts
-
source_address_match
-
packet_query_match
-
tld_query_enabled
-
skip_config_validation
-
scope
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 |
||
attempts |
integer |
Number of attempts allowed when querying the DNS name servers. |
domains |
array[string] |
A list of DNS domains. Domain names have the following requirements:
|
packet_query_match |
boolean |
Indicates whether or not the query section of the reply packet is equal to that of the query packet. |
scope |
string |
Set to "svm" for DNS owned by an SVM, otherwise set to "cluster". |
servers |
array[string] |
The list of IP addresses of the DNS servers. Addresses can be either IPv4 or IPv6 addresses. |
skip_config_validation |
boolean |
Indicates whether or not the validation for the specified DNS configuration is disabled. |
source_address_match |
boolean |
Indicates whether or not the DNS responses are from a different IP address to the IP address the request was sent to. |
svm |
||
timeout |
integer |
Timeout values for queries to the name servers, in seconds. |
tld_query_enabled |
boolean |
Enable or disable top-level domain (TLD) queries. |
Example request
{
"domains": [
"example.com",
"example2.example3.com"
],
"scope": "string",
"servers": [
"10.224.65.20",
"2001:db08:a0b:12f0::1"
],
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
}
}
Response
Status: 201, Created
| Name | Type | Description |
|---|---|---|
num_records |
integer |
Number of DNS domain records. |
records |
array[dns] |
Example response
{
"num_records": 1,
"records": [
{
"domains": [
"example.com",
"example2.example3.com"
],
"scope": "string",
"servers": [
"10.224.65.20",
"2001:db08:a0b:12f0::1"
],
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
}
}
]
}
Headers
| Name | Description | Type |
|---|---|---|
Location |
Useful for tracking the resource location |
string |
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 |
8847403 |
Scope specified is invalid for the specified SVM |
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 is 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 |
Definitions
See Definitions
href
| Name | Type | Description |
|---|---|---|
href |
string |
_links
dynamic_dns
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
Enable or disable Dynamic DNS (DDNS) updates for the specified SVM. |
fqdn |
string |
Fully Qualified Domain Name (FQDN) to be used for dynamic DNS updates. |
skip_fqdn_validation |
boolean |
Enable or disable FQDN validation. |
time_to_live |
string |
Time to live value for the dynamic DNS updates, in an ISO-8601 duration formatted string. Maximum Time To Live is 720 hours(P30D in ISO-8601 format) and the default is 24 hours(P1D in ISO-8601 format). |
use_secure |
boolean |
Enable or disable secure dynamic DNS updates for the specified SVM. |
status
Status of each of the DNS name server configured for the specified SVM.
| Name | Type | Description |
|---|---|---|
code |
integer |
Code corresponding to the status message. Code is 0 when the state is 'up'. |
message |
string |
Detailed description of the validation state if the state is 'down' or the response time of the DNS server if the state is 'up'. |
name_server |
string |
The IP address of the DNS server. The address can be either an IPv4 or an IPv6 address. |
state |
string |
The validation status of the DNS server. |
svm
| Name | Type | Description |
|---|---|---|
_links |
||
name |
string |
The name of the SVM. |
uuid |
string |
The unique identifier of the SVM. |
dns
| Name | Type | Description |
|---|---|---|
_links |
||
attempts |
integer |
Number of attempts allowed when querying the DNS name servers. |
domains |
array[string] |
A list of DNS domains. Domain names have the following requirements:
|
packet_query_match |
boolean |
Indicates whether or not the query section of the reply packet is equal to that of the query packet. |
scope |
string |
Set to "svm" for DNS owned by an SVM, otherwise set to "cluster". |
servers |
array[string] |
The list of IP addresses of the DNS servers. Addresses can be either IPv4 or IPv6 addresses. |
skip_config_validation |
boolean |
Indicates whether or not the validation for the specified DNS configuration is disabled. |
source_address_match |
boolean |
Indicates whether or not the DNS responses are from a different IP address to the IP address the request was sent to. |
svm |
||
timeout |
integer |
Timeout values for queries to the name servers, in seconds. |
tld_query_enabled |
boolean |
Enable or disable top-level domain (TLD) queries. |
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. |