import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
gpu_virtual_cluster = client.cloud.gpu_virtual.clusters.get(
cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
project_id=1,
region_id=7,
)
print(gpu_virtual_cluster.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cloud"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
gpuVirtualCluster, err := client.Cloud.GPUVirtual.Clusters.Get(
context.TODO(),
"1aaaab48-10d0-46d9-80cc-85209284ceb4",
cloud.GPUVirtualClusterGetParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", gpuVirtualCluster.ID)
}
curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"created_at": "2024-12-31T23:59:59Z",
"flavor": "g3-ai-32-192-1500-l40s-48-1",
"has_pending_changes": false,
"id": "1aaaab48-10d0-46d9-80cc-85209284ceb4",
"name": "my virtual gpu cluster",
"servers_count": 2,
"servers_ids": [
"b4522653-fbcd-44a0-a949-541570a52281",
"e56192de-ed28-452a-b775-eeeacc795e3b"
],
"servers_settings": {
"file_shares": [
{
"id": "a3f2d1b8-45e6-4f8a-bb5d-19dbf2cd7e9a",
"mount_path": "/mnt/vast"
}
],
"interfaces": [
{
"ip_family": "ipv4",
"name": "eth0",
"security_groups": [
{
"id": "ae74714c-c380-48b4-87f8-758d656cdad6",
"name": "default"
}
],
"type": "external"
}
],
"security_groups": [
{
"id": "ae74714c-c380-48b4-87f8-758d656cdad6",
"name": "default"
}
],
"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": "my-data-disk",
"size": 100,
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"type": "ssd"
}
]
},
"status": "active",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"updated_at": "2025-01-11T23:59:59Z"
}Get virtual GPU cluster
Get detailed information about a specific virtual GPU cluster.
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
gpu_virtual_cluster = client.cloud.gpu_virtual.clusters.get(
cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
project_id=1,
region_id=7,
)
print(gpu_virtual_cluster.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cloud"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
gpuVirtualCluster, err := client.Cloud.GPUVirtual.Clusters.Get(
context.TODO(),
"1aaaab48-10d0-46d9-80cc-85209284ceb4",
cloud.GPUVirtualClusterGetParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", gpuVirtualCluster.ID)
}
curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"created_at": "2024-12-31T23:59:59Z",
"flavor": "g3-ai-32-192-1500-l40s-48-1",
"has_pending_changes": false,
"id": "1aaaab48-10d0-46d9-80cc-85209284ceb4",
"name": "my virtual gpu cluster",
"servers_count": 2,
"servers_ids": [
"b4522653-fbcd-44a0-a949-541570a52281",
"e56192de-ed28-452a-b775-eeeacc795e3b"
],
"servers_settings": {
"file_shares": [
{
"id": "a3f2d1b8-45e6-4f8a-bb5d-19dbf2cd7e9a",
"mount_path": "/mnt/vast"
}
],
"interfaces": [
{
"ip_family": "ipv4",
"name": "eth0",
"security_groups": [
{
"id": "ae74714c-c380-48b4-87f8-758d656cdad6",
"name": "default"
}
],
"type": "external"
}
],
"security_groups": [
{
"id": "ae74714c-c380-48b4-87f8-758d656cdad6",
"name": "default"
}
],
"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": "my-data-disk",
"size": 100,
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"type": "ssd"
}
]
},
"status": "active",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"updated_at": "2025-01-11T23:59:59Z"
}Authorizations
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
1
Region ID
7
Cluster unique identifier
"1aaaab48-10d0-46d9-80cc-85209284ceb4"
Response
OK
Cluster creation date time
"2024-12-31T23:59:59Z"
Cluster flavor name
"g3-ai-32-192-1500-l40s-48-1"
True if any server in the cluster has pending (not yet applied) settings changes
false
Cluster unique identifier
"1aaaab48-10d0-46d9-80cc-85209284ceb4"
Cluster name
"my virtual gpu cluster"
Cluster servers count
2
List of cluster nodes
[
"b4522653-fbcd-44a0-a949-541570a52281",
"e56192de-ed28-452a-b775-eeeacc795e3b"
]
Show child attributes
Show child attributes
Cluster status
active, creating, degraded, deleting, error, rebooting, rebuilding, resizing, shutoff "active"
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
Show child attributes
[
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
Cluster update date time
"2025-01-11T23:59:59Z"
Was this page helpful?