This API has a deprecated equivalent from v7.0U1.
Set DNS Servers
Set the DNS server configuration. If you set the mode argument to “DHCP”, a DHCP refresh is forced.
Request
URLURL
https://{api_host}/api/appliance/networking/dns/servers
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Request Body
Request Body
NetworkingDnsServersDNSServerConfig of mimetype application/json
Required
DNS server configuration. Servers.DNSServerConfig structure This structure represents the configuration state used to determine DNS servers.
(The request body parameter is missing description)
{
"mode": "enum",
"servers": [
"string"
]
}
mode
Required
Define how to determine the DNS servers. Leave the servers argument empty if the mode argument is “DHCP”. Set the servers argument to a comma-separated list of DNS servers if the mode argument is “static”. The DNS server are assigned from the specified list.
Possible values are: dhcp , is_static
array of
string
servers
Required
List of the currently used DNS servers.
cURL Command
curl -X PUT -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"mode":"enum","servers":["string"]}' https://{api_host}/api/appliance/networking/dns/servers
Errors
Availability
Added in 7.0U2