PATCH
/
cloud
/
v1
/
subnets
/
{project_id}
/
{region_id}
/
{subnet_id}
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
subnet = client.cloud.networks.subnets.update(
    subnet_id="b39792c3-3160-4356-912e-ba396c95cdcf",
    project_id=1,
    region_id=1,
)
print(subnet.cidr)
{
  "available_ips": 250,
  "cidr": "192.168.13.0/24",
  "created_at": "2019-06-13T13:58:12+0000",
  "creator_task_id": "5cc890da-d031-4a23-ac31-625edfa22812",
  "dns_nameservers": [
    "8.8.8.8",
    "8.8.4.4"
  ],
  "enable_dhcp": true,
  "gateway_ip": "192.168.13.1",
  "has_router": false,
  "host_routes": [],
  "id": "b39792c3-3160-4356-912e-ba396c95cdcf",
  "ip_version": 4,
  "name": "subnet_3",
  "network_id": "b30d0de7-bca2-4c83-9c57-9e645bd2cc92",
  "project_id": 1337,
  "region": "Luxembourg 1",
  "region_id": 7,
  "tags": [
    {
      "key": "my-tag",
      "read_only": false,
      "value": "my-tag-value"
    }
  ],
  "task_id": null,
  "total_ips": 253,
  "updated_at": "2019-06-13T13:58:12+0000"
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project ID

Examples:

1

region_id
integer
required

Region ID

Examples:

1

subnet_id
string
required

Subnet ID

Examples:

"b39792c3-3160-4356-912e-ba396c95cdcf"

Body

application/json

Response

200 - application/json

OK

The response is of type object.