POST
/
cloud
/
v1
/
ports
/
{project_id}
/
{region_id}
/
{port_id}
/
disable_port_security
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
instance_interface = client.cloud.instances.disable_port_security(
    port_id="port_id",
    project_id=0,
    region_id=0,
)
print(instance_interface.network_id)
{
  "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",
      "dns_domain": "string",
      "dns_name": "string",
      "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",
      "subnet_id": null,
      "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"
    }
  ],
  "interface_name": "my-interface",
  "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"
    }
  ],
  "mac_address": "00:16:3e:f2:87:16",
  "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,
        "has_router": false,
        "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,
        "has_router": false,
        "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
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

port_id
string
required

Port ID

Response

200 - application/json

Instance network interface

The response is of type object.