import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.gpu_virtual_clusters.list(
project_id=1,
region_id=7,
)
page = page.results[0]
print(page.id){
"count": 1,
"results": [
{
"created_at": "2023-11-07T05:31:56Z",
"flavor": "<string>",
"id": "<string>",
"name": "<string>",
"servers_count": 123,
"servers_ids": [
"<string>"
],
"servers_settings": {
"file_shares": [
{
"id": "<string>",
"mount_path": "<string>"
}
],
"interfaces": [
{
"ip_family": "dual",
"name": "eth0",
"type": "<string>"
}
],
"security_groups": [
{
"id": "<string>",
"name": "<string>"
}
],
"ssh_key_name": "my-ssh-key",
"user_data": "eyJ0ZXN0IjogImRhdGEifQ==",
"volumes": [
{
"boot_index": 1,
"delete_on_termination": true,
"image_id": "3793c250-0b3b-4678-bab3-e11afbc29657",
"name": "<string>",
"size": 123,
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"type": "cold"
}
]
},
"status": "active",
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"updated_at": "2025-01-11T23:59:59Z"
}
]
}List all virtual GPU clusters in the specified project and region.
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.gpu_virtual_clusters.list(
project_id=1,
region_id=7,
)
page = page.results[0]
print(page.id){
"count": 1,
"results": [
{
"created_at": "2023-11-07T05:31:56Z",
"flavor": "<string>",
"id": "<string>",
"name": "<string>",
"servers_count": 123,
"servers_ids": [
"<string>"
],
"servers_settings": {
"file_shares": [
{
"id": "<string>",
"mount_path": "<string>"
}
],
"interfaces": [
{
"ip_family": "dual",
"name": "eth0",
"type": "<string>"
}
],
"security_groups": [
{
"id": "<string>",
"name": "<string>"
}
],
"ssh_key_name": "my-ssh-key",
"user_data": "eyJ0ZXN0IjogImRhdGEifQ==",
"volumes": [
{
"boot_index": 1,
"delete_on_termination": true,
"image_id": "3793c250-0b3b-4678-bab3-e11afbc29657",
"name": "<string>",
"size": 123,
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"type": "cold"
}
]
},
"status": "active",
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"updated_at": "2025-01-11T23:59:59Z"
}
]
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Limit of items on a single page
x <= 1000Offset in results list
x >= 0OK
Number of objects
x >= 0Objects
Show child attributes
Cluster creation date time
Cluster flavor name
Cluster unique identifier
Cluster name
Cluster servers count
List of cluster nodes
Show child attributes
List of file shares mounted across the cluster.
Show child attributes
Which subnets should be selected: IPv4, IPv6, or use dual stack.
dual, ipv4, ipv6 Interface name
"eth0"
"external"SSH key name
"my-ssh-key"
Optional custom user data
"eyJ0ZXN0IjogImRhdGEifQ=="
List of volumes
Show child attributes
Boot index of the volume
x >= 01
Flag indicating whether the volume is deleted on instance termination
Image ID for the volume
"3793c250-0b3b-4678-bab3-e11afbc29657"
Volume name
Volume size in GiB
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.
Show child attributes
Tag key. The maximum size for a key is 255 characters.
If true, the tag is read-only and cannot be modified by the user
Tag value. The maximum size for a value is 255 characters.
Volume type
cold, ssd_hiiops, ssd_local, ssd_lowlatency, standard, ultra Cluster status
active, deleting, error, new, resizing 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.
Cluster update date time
"2025-01-11T23:59:59Z"
Was this page helpful?