Modifies the state of a storage component to ACTIVE, PAUSED, or READ_ONLY and returns all relevant component settings.
X-XSRF-TOKEN
String
required
XSRF token header for CSRF security. Can be obtained as the value of a cookie by performing a GET on /csrf.
XSRF token header for CSRF security. Can be obtained as the value of a cookie by performing a GET on /csrf.
xXSRFTOKEN_example
Cookie
String
required
XSRF token header for CSRF security. Can be obtained as the value of a cookie by performing a GET on /csrf.
XSRF token header for CSRF security. Can be obtained as the value of a cookie by performing a GET on /csrf.
cookie_example
curl -X 'POST'
-H
'Accept: application/json'
-H
'X-XSRF-TOKEN: xXSRFTOKEN_example'
-H
'Cookie: cookie_example'
'http://localhost/v1/storage_component/update_state'
-d
'{
"id" : 0
}'
import http.client
conn = http.client.HTTPConnection("undefinedundefined")
headers = {
'X-XSRF-TOKEN': "SOME_STRING_VALUE",
'Cookie': "SOME_STRING_VALUE"
}
conn.request("POST", "/v1/storage_component/update_state", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
url = URI("http://undefinedundefined/v1/storage_component/update_state")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-XSRF-TOKEN"] = 'SOME_STRING_VALUE'
request["Cookie"] = 'SOME_STRING_VALUE'
response = http.request(request)
puts response.read_bodyconst data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://undefinedundefined/v1/storage_component/update_state");
xhr.setRequestHeader("X-XSRF-TOKEN", "SOME_STRING_VALUE");
xhr.setRequestHeader("Cookie", "SOME_STRING_VALUE");
xhr.send(data);HttpResponse<String> response = Unirest.post("http://undefinedundefined/v1/storage_component/update_state")
.header("X-XSRF-TOKEN", "SOME_STRING_VALUE")
.header("Cookie", "SOME_STRING_VALUE")
.asString();import Foundation
let headers = [
"X-XSRF-TOKEN": "SOME_STRING_VALUE",
"Cookie": "SOME_STRING_VALUE"
]
let request = NSMutableURLRequest(url: NSURL(string: "http://undefinedundefined/v1/storage_component/update_state")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
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_URL => "http://undefinedundefined/v1/storage_component/update_state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Cookie: SOME_STRING_VALUE",
"X-XSRF-TOKEN: SOME_STRING_VALUE"
],
]);
$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, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "http://undefinedundefined/v1/storage_component/update_state");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "X-XSRF-TOKEN: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Cookie: SOME_STRING_VALUE");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("http://undefinedundefined/v1/storage_component/update_state");
var request = new RestRequest(Method.POST);
request.AddHeader("X-XSRF-TOKEN", "SOME_STRING_VALUE");
request.AddHeader("Cookie", "SOME_STRING_VALUE");
IRestResponse response = client.Execute(request);idintegerrequired
storageComponentStatestring (Enum)requiredState of the storage component that indicates availability to server requests. When the component is ready for server requests, the status is ACTIVE. A PAUSED component is on an administrative pause. Accessibility issues caused by network, authentication, or certificates can cause the component to be INACCESSIBLE. A READ_ONLY component blocks all writes to data disks but allows reads. The component that has not been activated or failed to activate is UNVERIFIED. A component that is permanently unavailable for serving requests is DECOMMISSIONED.
State of the storage component that indicates availability to server requests. When the component is ready for server requests, the status is ACTIVE. A PAUSED component is on an administrative pause. Accessibility issues caused by network, authentication, or certificates can cause the component to be INACCESSIBLE. A READ_ONLY component blocks all writes to data disks but allows reads. The component that has not been activated or failed to activate is UNVERIFIED. A component that is permanently unavailable for serving requests is DECOMMISSIONED.
[*/* content]