Skip to main content
GET
/
cloud
/
v1
/
networks
/
{project_id}
/
{region_id}
/
{network_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
)
network = client.cloud.networks.get(
    network_id="b39792c3-3160-4356-912e-ba396c95cdcf",
    project_id=1,
    region_id=1,
)
print(network.id)
{
  "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"
}

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

network_id
string<uuid4>
required

Network ID

Response

200 - application/json

OK

created_at
string<date-time>
required

Datetime when the network was created

creator_task_id
string<uuid4> | null
required

Task that created this entity

Example:

"fd50fdd1-0482-4c9b-b847-fc9924665af6"

default
boolean | null
required

True if network has is_default attribute

Example:

true

external
boolean
required

True if the network router:external attribute

id
string<uuid4>
required

Network ID

mtu
integer
required

MTU (maximum transmission unit). Default value is 1450

name
string
required

Network name

port_security_enabled
boolean
required

Indicates port_security_enabled status of all newly created in the network ports.

project_id
integer | null
required

Project ID

Example:

1337

region
string
required

Region name

region_id
integer
required

Region ID

segmentation_id
integer | null
required

Id of network segment

Example:

9

shared
boolean
required

True when the network is shared with your project by external owner

subnets
string<uuid4>[]
required

List of subnetworks

tags
TagSerializer · object[]
required

List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

task_id
string<uuid4> | null
required

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

type
string
required

Network type (vlan, vxlan)

updated_at
string<date-time>
required

Datetime when the network was last updated