Skip to main content
PATCH
/
cloud
/
v1
/
reserved_fixed_ips
/
{project_id}
/
{region_id}
/
{port_id}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
reserved_fixed_ip = client.cloud.reserved_fixed_ips.update(
    port_id="port_id",
    project_id=0,
    region_id=0,
    is_vip=True,
)
print(reserved_fixed_ip.network_id)
{
  "allowed_address_pairs": [
    {
      "ip_address": "<string>",
      "mac_address": "<string>"
    }
  ],
  "attachments": [
    {
      "resource_id": "83ed4ea6-bcae-4100-9e4d-36e541ff919b",
      "resource_type": "instance"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "is_external": true,
  "is_vip": true,
  "name": "<string>",
  "network": {
    "created_at": "2023-11-07T05:31:56Z",
    "creator_task_id": "fd50fdd1-0482-4c9b-b847-fc9924665af6",
    "default": true,
    "external": true,
    "id": "<string>",
    "mtu": 123,
    "name": "<string>",
    "port_security_enabled": true,
    "project_id": 1337,
    "region": "<string>",
    "region_id": 123,
    "segmentation_id": 9,
    "shared": true,
    "subnets": [
      "<string>"
    ],
    "tags": [
      {
        "key": "<string>",
        "read_only": true,
        "value": "<string>"
      }
    ],
    "task_id": null,
    "type": "<string>",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "network_id": "<string>",
  "port_id": "<string>",
  "region": "<string>",
  "region_id": 123,
  "reservation": {
    "resource_id": "83ed4ea6-bcae-4100-9e4d-36e541ff919b",
    "resource_type": "instance",
    "status": "attached"
  },
  "status": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "creator_task_id": "30378aea-9343-4ff6-be38-9756094e05da",
  "fixed_ip_address": "10.100.179.44",
  "fixed_ipv6_address": null,
  "project_id": 1337,
  "subnet_id": "747db04a-2aac-4fda-9492-d9b85a798c09",
  "subnet_v6_id": null,
  "task_id": null
}

Authorizations

Authorization
string
header
required

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
integer
required

Project ID

region_id
integer
required

Region ID

port_id
string
required

Port ID

Body

application/json
is_vip
boolean
required

If reserved fixed IP should be a VIP

Example:

true

Response

Updated reserved fixed IP details

allowed_address_pairs
AllowedAddressPairsSerializer · object[]
required

Group of subnet masks and/or IP addresses that share the current IP as VIP

Example:
[
  {
    "ip_address": "192.168.123.20",
    "mac_address": "00:16:3e:f2:87:16"
  },
  {
    "ip_address": "192.168.0.2",
    "mac_address": "00:16:3e:f2:87:89"
  }
]
attachments
AttachmentSerializer · object[]
required

Reserved fixed IP attachment entities

Example:
[
  {
    "resource_id": "e3c6ee77-48cb-416b-b204-11b492cc776e3",
    "resource_type": "instance"
  },
  {
    "resource_id": "e73a4dbd-da04-4b6e-8ef9-07e8742001b7",
    "resource_type": "ai_cluster"
  }
]
created_at
string<date-time>
required

Datetime when the reserved fixed IP was created

Example:

"2019-06-18T11:56:16+0000"

is_external
boolean
required

If reserved fixed IP belongs to a public network

Example:

false

is_vip
boolean
required

If reserved fixed IP is a VIP

Example:

false

name
string
required

Reserved fixed IP name

Example:

"Reserved fixed ip 10.100.179.44"

network
NetworkSerializer · object
required

Network details

network_id
string<uuid4>
required

ID of the network the port is attached to

Example:

"eed97610-708d-43a5-a9a5-caebd2b7b4ee"

port_id
string<uuid4>
required

ID of the port underlying the reserved fixed IP

Example:

"817c8a3d-bb67-4b88-a0d1-aec980318ff1"

region
string
required

Region name

Example:

"Luxembourg 1"

region_id
integer
required

Region ID

Example:

7

reservation
ReservationSerializer · object
required

Reserved fixed IP status with resource type and ID it is attached to

status
string
required

Underlying port status

Example:

"DOWN"

updated_at
string<date-time>
required

Datetime when the reserved fixed IP was last updated

Example:

"2019-06-18T11:57:00+0000"

creator_task_id
string<uuid4> | null

Task that created this entity

Example:

"30378aea-9343-4ff6-be38-9756094e05da"

fixed_ip_address
string<ipv4> | null

IPv4 address of the reserved fixed IP

Example:

"10.100.179.44"

fixed_ipv6_address
string<ipv6> | null

IPv6 address of the reserved fixed IP

Example:

null

project_id
integer | null

Project ID

Example:

1337

subnet_id
string<uuid4> | null

ID of the subnet that owns the IP address

Example:

"747db04a-2aac-4fda-9492-d9b85a798c09"

subnet_v6_id
string<uuid4> | null

ID of the subnet that owns the IPv6 address

Example:

null

task_id
string<uuid4> | null

The UUID of the active task that currently holds a lock on the resource. This lock prevents concurrent modifications to ensure consistency. If null, the resource is not locked.

Example:

null