Update the NIS configuration if NIS is the selected mode of operation.
Specify a virtual server ID of 0 to ensure the global NIS configuration is updated. If the virtual server specified has a global security context, then the global NIS configuration will be updated, otherwise the NIS configuration will be updated for the specified virtual server.
Note: Accepted parameter values may be restricted based on the virtual server access granted by the API key used for authentication.
virtualServerId
required
Either the virtual server ID or the object ID of the virtual server
Either the virtual server ID or the object ID of the virtual server
curl -X 'PATCH'
-H "X-Subsystem-User: [[apiKey]]"
\
-H "X-Subsystem-Password: [[apiKey]]"
\
-H "X-Api-Key: [[apiKey]]"
\
-H "Authorization: Basic [[basicHash]]"
\
-H
'Accept: application/json'
-H
'Content-Type: application/json'
'https://172.27.146.40:8444/v9/storage/virtual-servers/{virtualServerId}/name-services/nis'
-d
''
import http.client
conn = http.client.HTTPSConnection("172.27.146.40:8444")
payload = "{\"characterSet\":\"LATIN-1\",\"domain\":\"string\",\"isEnabled\":true,\"maxBindResponseTime\":300,\"rebindPeriod\":15,\"servers\":[\"string\"],\"useBroadcast\":true}"
headers = {
'Authorization': "Basic REPLACE_BASIC_AUTH",
'content-type': "application/json"
}
conn.request("PATCH", "/v9/storage/virtual-servers/1/name-services/nis", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://172.27.146.40:8444/v9/storage/virtual-servers/1/name-services/nis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic REPLACE_BASIC_AUTH'
request["content-type"] = 'application/json'
request.body = "{\"characterSet\":\"LATIN-1\",\"domain\":\"string\",\"isEnabled\":true,\"maxBindResponseTime\":300,\"rebindPeriod\":15,\"servers\":[\"string\"],\"useBroadcast\":true}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"characterSet": "LATIN-1",
"domain": "string",
"isEnabled": true,
"maxBindResponseTime": 300,
"rebindPeriod": 15,
"servers": [
"string"
],
"useBroadcast": true
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PATCH", "https://172.27.146.40:8444/v9/storage/virtual-servers/1/name-services/nis");
xhr.setRequestHeader("Authorization", "Basic REPLACE_BASIC_AUTH");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.patch("https://172.27.146.40:8444/v9/storage/virtual-servers/1/name-services/nis")
.header("Authorization", "Basic REPLACE_BASIC_AUTH")
.header("content-type", "application/json")
.body("{\"characterSet\":\"LATIN-1\",\"domain\":\"string\",\"isEnabled\":true,\"maxBindResponseTime\":300,\"rebindPeriod\":15,\"servers\":[\"string\"],\"useBroadcast\":true}")
.asString();import Foundation
let headers = [
"Authorization": "Basic REPLACE_BASIC_AUTH",
"content-type": "application/json"
]
let parameters = [
"characterSet": "LATIN-1",
"domain": "string",
"isEnabled": true,
"maxBindResponseTime": 300,
"rebindPeriod": 15,
"servers": ["string"],
"useBroadcast": true
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://172.27.146.40:8444/v9/storage/virtual-servers/1/name-services/nis")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8444",
CURLOPT_URL => "https://172.27.146.40:8444/v9/storage/virtual-servers/1/name-services/nis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "{\"characterSet\":\"LATIN-1\",\"domain\":\"string\",\"isEnabled\":true,\"maxBindResponseTime\":300,\"rebindPeriod\":15,\"servers\":[\"string\"],\"useBroadcast\":true}",
CURLOPT_HTTPHEADER => [
"Authorization: Basic REPLACE_BASIC_AUTH",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "https://172.27.146.40:8444/v9/storage/virtual-servers/1/name-services/nis");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"characterSet\":\"LATIN-1\",\"domain\":\"string\",\"isEnabled\":true,\"maxBindResponseTime\":300,\"rebindPeriod\":15,\"servers\":[\"string\"],\"useBroadcast\":true}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://172.27.146.40:8444/v9/storage/virtual-servers/1/name-services/nis");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Basic REPLACE_BASIC_AUTH");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"characterSet\":\"LATIN-1\",\"domain\":\"string\",\"isEnabled\":true,\"maxBindResponseTime\":300,\"rebindPeriod\":15,\"servers\":[\"string\"],\"useBroadcast\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);characterSetstring (Enum)Character set to use when making NIS requests
Character set to use when making NIS requests
domainstringDomain to join - must be supplied, if no name already set for the current context
Domain to join - must be supplied, if no name already set for the current context
isEnabledbooleanTrue if enabled, false for disabled
True if enabled, false for disabled
maxBindResponseTimeintegerint32Time in milliseconds, that the NIS client will wait for a response from the NIS server
Time in milliseconds, that the NIS client will wait for a response from the NIS server
300rebindPeriodintegerint32Period in minutes between attempts to rebind to the current server
Period in minutes between attempts to rebind to the current server
15serversarrayList of NIS servers
List of NIS servers
string
ipAddressstringIP address of NIS server
IP address of NIS server
"10.1.2.3"priorityintegerint32Priority relating to the order with which the servers are used. A value of 1 indicates the highest priority and 3 is the lowest priority. If servers are discovered by broadcast they get a lower priority than can be manually set
Priority relating to the order with which the servers are used. A value of 1 indicates the highest priority and 3 is the lowest priority. If servers are discovered by broadcast they get a lower priority than can be manually set
1useBroadcastbooleanTrue indicates NIS servers can be discovered via broadcast messages
True indicates NIS servers can be discovered via broadcast messages
{
"characterSet": "LATIN-1",
"domain": "example",
"isEnabled": false,
"maxBindResponseTime": 300,
"rebindPeriod": 15,
"servers": [
"example"
],
"useBroadcast": false
}