Update custom network
curl --request PATCH \
--url https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id} \
--header 'Content-Type: application/json' \
--header 'Cookie: <cookie>' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}"
payload = { "name": "<string>" }
headers = {
"Cookie": "<cookie>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Cookie: '<cookie>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <cookie>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Cookie", "<cookie>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}")
.header("Cookie", "<cookie>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Cookie"] = '<cookie>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCustom networks
Update custom network
Rename a custom network.
PATCH
/
2022-09-01-00
/
resource-instance
/
custom-network
/
{id}
Update custom network
curl --request PATCH \
--url https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id} \
--header 'Content-Type: application/json' \
--header 'Cookie: <cookie>' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}"
payload = { "name": "<string>" }
headers = {
"Cookie": "<cookie>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Cookie: '<cookie>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <cookie>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Cookie", "<cookie>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}")
.header("Cookie", "<cookie>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnistrate.cloud/2022-09-01-00/resource-instance/custom-network/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Cookie"] = '<cookie>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyUpdates the friendly name of a custom network. The CIDR block, cloud provider, and region cannot be changed after creation.
Authorization
Path parameters
string
required
ID of the custom network.
Body
string
New friendly name for the network.
Request
{
"name": "prod-vpc-eu"
}
Response
Returns the updated custom network. See Describe custom network for the field list.Errors
See Error for the error response shape.⌘I