PATCH
/
cloud
/
v1
/
networks
/
{project_id}
/
{region_id}
/
{network_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
)
network = client.cloud.networks.update(
    network_id="b39792c3-3160-4356-912e-ba396c95cdcf",
    project_id=1,
    region_id=1,
    name="some_name",
)
print(network.id)
{
  "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": [
    "f00624ab-41bc-4d54-a723-1673ce32d997",
    "41e0f698-4d39-483b-b77a-18eb070e4c09"
  ],
  "tags": [
    {
      "key": "my-tag",
      "read_only": false,
      "value": "my-tag-value"
    }
  ],
  "task_id": null,
  "type": "vlan",
  "updated_at": "2019-06-18T11:57:00+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

network_id
string
required

Network ID

Examples:

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

Body

application/json

Response

200 - application/json

OK

The response is of type object.