from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
gpu_image_list = client.cloud.gpu_baremetal_clusters.images.list(
project_id=1,
region_id=7,
)
print(gpu_image_list.count)
{
"count": 1,
"results": [
{
"architecture": "x86_64",
"created_at": "2024-05-05T14:51:26.570866Z",
"id": "44e136a7-15c1-4b5f-a086-20b7b3237d40",
"min_disk": 1,
"min_ram": 0,
"name": "ubuntu-23.10-x64",
"os_distro": "ubuntu",
"os_type": "linux",
"os_version": "19.04",
"size": 3758096384,
"ssh_key": "allow",
"status": "active",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": null,
"updated_at": "2024-05-05T14:51:26.570866Z",
"visibility": "public"
}
]
}
from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
gpu_image_list = client.cloud.gpu_baremetal_clusters.images.list(
project_id=1,
region_id=7,
)
print(gpu_image_list.count)
{
"count": 1,
"results": [
{
"architecture": "x86_64",
"created_at": "2024-05-05T14:51:26.570866Z",
"id": "44e136a7-15c1-4b5f-a086-20b7b3237d40",
"min_disk": 1,
"min_ram": 0,
"name": "ubuntu-23.10-x64",
"os_distro": "ubuntu",
"os_type": "linux",
"os_version": "19.04",
"size": 3758096384,
"ssh_key": "allow",
"status": "active",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": null,
"updated_at": "2024-05-05T14:51:26.570866Z",
"visibility": "public"
}
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Project ID
1
Region ID
7
OK
The response is of type object
.
Was this page helpful?