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

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

attachments
AttachmentSerializer · object[]
required

Reserved fixed IP attachment entities

created_at
string<date-time>
required

Datetime when the reserved fixed IP was created

is_external
boolean
required

If reserved fixed IP belongs to a public network

is_vip
boolean
required

If reserved fixed IP is a VIP

name
string
required

Reserved fixed IP name

network
NetworkSerializer · object
required

Network details

network_id
string<uuid4>
required

ID of the network the port is attached to

port_id
string<uuid4>
required

ID of the port underlying the reserved fixed IP

region
string
required

Region name

region_id
integer
required

Region ID

reservation
ReservationSerializer · object
required

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

status
string
required

Underlying port status

updated_at
string<date-time>
required

Datetime when the reserved fixed IP was last updated

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