curl --request POST \
--url https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security', 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.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"allowed_address_pairs": [
{
"ip_address": "<string>",
"mac_address": "<string>"
}
],
"floatingip_details": [
{
"created_at": "2019-06-13T13:58:12+0000",
"creator_task_id": "d1e1500b-e2be-40aa-9a4b-cc493fa1af30",
"fixed_ip_address": "192.168.10.15",
"floating_ip_address": "172.24.4.34",
"id": "c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
"port_id": "ee2402d0-f0cd-4503-9b75-69be1d11c5f1",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"router_id": "11005a33-c5ac-4c96-ab6f-8f2827cc7da6",
"status": "ACTIVE",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": "a4eb4b29-048e-42f6-a5e1-2c18bc001c45",
"updated_at": "2019-06-13T13:58:12+0000"
}
],
"ip_assignments": [
{
"ip_address": "192.168.123.20",
"subnet_id": "351b0dd7-ca09-431c-be53-935db3785067"
},
{
"ip_address": "192.168.120.16",
"subnet_id": "0a641ef8-62dc-4146-91e5-6ab4b464df6d"
}
],
"network_details": {
"created_at": "2019-06-18T11:56:16+0000",
"creator_task_id": "fd50fdd1-0482-4c9b-b847-fc9924665af6",
"default": true,
"external": true,
"id": "eed97610-708d-43a5-a9a5-caebd2b7b4ee",
"mtu": 1500,
"name": "public",
"port_security_enabled": true,
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"segmentation_id": 9,
"shared": false,
"subnets": [
{
"available_ips": 65432,
"cidr": "10.0.0.0/16",
"created_at": "2019-07-18T12:07:00+0000",
"description": "example description",
"enable_dhcp": true,
"id": "80bfcb8e-1709-4bb2-99d4-3fa1332571de",
"ip_version": 4,
"name": "test 2",
"network_id": "162091db-33cc-45d5-a375-964509af4813",
"project_id": 1,
"region": "Luxembourg 1",
"region_id": 1,
"tags": [
{
"key": "key1",
"read_only": false,
"value": "value1"
}
],
"total_ips": 65536,
"updated_at": "2019-07-22T10:55:45+0000"
},
{
"available_ips": 232,
"cidr": "192.168.192.0/24",
"created_at": "2019-07-22T15:15:05+0000",
"description": "{\"task_id\": \"cc9a5445-189e-48de-a01f-5e10641a6915\"}",
"enable_dhcp": true,
"id": "94196a6a-c2ce-4f0d-8dc7-d9e0e722aea0",
"ip_version": 4,
"name": "string",
"network_id": "162091db-33cc-45d5-a375-964509af4813",
"project_id": 1,
"region": "Luxembourg 1",
"region_id": 1,
"tags": [
{
"key": "key1",
"read_only": false,
"value": "value1"
}
],
"total_ips": 256,
"updated_at": "2019-07-22T15:15:05+0000"
}
],
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": null,
"type": "vlan",
"updated_at": "2019-06-18T11:57:00+0000"
},
"network_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
"port_id": "1f0ca628-a73b-42c0-bdac-7b10d023e097",
"port_security_enabled": true,
"interface_name": "my-interface",
"mac_address": "00:16:3e:f2:87:16"
}Disable port security for instance interface
Deprecated. Use PATCH /v1/ports/// instead.
curl --request POST \
--url https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security', 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.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}/disable_port_security")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"allowed_address_pairs": [
{
"ip_address": "<string>",
"mac_address": "<string>"
}
],
"floatingip_details": [
{
"created_at": "2019-06-13T13:58:12+0000",
"creator_task_id": "d1e1500b-e2be-40aa-9a4b-cc493fa1af30",
"fixed_ip_address": "192.168.10.15",
"floating_ip_address": "172.24.4.34",
"id": "c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
"port_id": "ee2402d0-f0cd-4503-9b75-69be1d11c5f1",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"router_id": "11005a33-c5ac-4c96-ab6f-8f2827cc7da6",
"status": "ACTIVE",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": "a4eb4b29-048e-42f6-a5e1-2c18bc001c45",
"updated_at": "2019-06-13T13:58:12+0000"
}
],
"ip_assignments": [
{
"ip_address": "192.168.123.20",
"subnet_id": "351b0dd7-ca09-431c-be53-935db3785067"
},
{
"ip_address": "192.168.120.16",
"subnet_id": "0a641ef8-62dc-4146-91e5-6ab4b464df6d"
}
],
"network_details": {
"created_at": "2019-06-18T11:56:16+0000",
"creator_task_id": "fd50fdd1-0482-4c9b-b847-fc9924665af6",
"default": true,
"external": true,
"id": "eed97610-708d-43a5-a9a5-caebd2b7b4ee",
"mtu": 1500,
"name": "public",
"port_security_enabled": true,
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"segmentation_id": 9,
"shared": false,
"subnets": [
{
"available_ips": 65432,
"cidr": "10.0.0.0/16",
"created_at": "2019-07-18T12:07:00+0000",
"description": "example description",
"enable_dhcp": true,
"id": "80bfcb8e-1709-4bb2-99d4-3fa1332571de",
"ip_version": 4,
"name": "test 2",
"network_id": "162091db-33cc-45d5-a375-964509af4813",
"project_id": 1,
"region": "Luxembourg 1",
"region_id": 1,
"tags": [
{
"key": "key1",
"read_only": false,
"value": "value1"
}
],
"total_ips": 65536,
"updated_at": "2019-07-22T10:55:45+0000"
},
{
"available_ips": 232,
"cidr": "192.168.192.0/24",
"created_at": "2019-07-22T15:15:05+0000",
"description": "{\"task_id\": \"cc9a5445-189e-48de-a01f-5e10641a6915\"}",
"enable_dhcp": true,
"id": "94196a6a-c2ce-4f0d-8dc7-d9e0e722aea0",
"ip_version": 4,
"name": "string",
"network_id": "162091db-33cc-45d5-a375-964509af4813",
"project_id": 1,
"region": "Luxembourg 1",
"region_id": 1,
"tags": [
{
"key": "key1",
"read_only": false,
"value": "value1"
}
],
"total_ips": 256,
"updated_at": "2019-07-22T15:15:05+0000"
}
],
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": null,
"type": "vlan",
"updated_at": "2019-06-18T11:57:00+0000"
},
"network_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
"port_id": "1f0ca628-a73b-42c0-bdac-7b10d023e097",
"port_security_enabled": true,
"interface_name": "my-interface",
"mac_address": "00:16:3e:f2:87:16"
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Path Parameters
Project ID
1
Region ID
1
Port ID
"1f0ca628-a73b-42c0-bdac-7b10d023e097"
Response
OK
Group of subnet masks and/or IP addresses that share the current IP as VIP
Show child attributes
Show child attributes
Bodies of floating IPs that are NAT-ing IPs of this port
Show child attributes
Show child attributes
IP addresses assigned to this port
Show child attributes
Show child attributes
[
{
"ip_address": "192.168.123.20",
"subnet_id": "351b0dd7-ca09-431c-be53-935db3785067"
},
{
"ip_address": "192.168.120.16",
"subnet_id": "0a641ef8-62dc-4146-91e5-6ab4b464df6d"
}
]
Body of the network this port is attached to
Show child attributes
Show child attributes
ID of the network the port is attached to
"bc688791-f1b0-44eb-97d4-07697294b1e1"
ID of virtual ethernet port object
"1f0ca628-a73b-42c0-bdac-7b10d023e097"
Port security status
true
Interface name
"my-interface"
MAC address of the virtual port
"00:16:3e:f2:87:16"
Was this page helpful?