Get Volume
client.compute.volumes.get(stringvolumeID, RequestOptionsoptions?): Volume { id, created_at, kind, 10 more }
GET/v1/compute/volumes/{volume_id}
Get Volume
import NirvanaLabs from '@nirvana-labs/nirvana';
const client = new NirvanaLabs({
apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});
const volume = await client.compute.volumes.get('volume_id');
console.log(volume.id);{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-01-01T00:00:00Z",
"kind": "boot",
"name": "my-volume",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"size": 100,
"status": "ready",
"tags": [
"production",
"ethereum"
],
"type": "abs",
"updated_at": "2025-01-01T00:00:00Z",
"vm_id": "123e4567-e89b-12d3-a456-426614174000",
"vm_name": "my-vm"
}Returns Examples
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-01-01T00:00:00Z",
"kind": "boot",
"name": "my-volume",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"size": 100,
"status": "ready",
"tags": [
"production",
"ethereum"
],
"type": "abs",
"updated_at": "2025-01-01T00:00:00Z",
"vm_id": "123e4567-e89b-12d3-a456-426614174000",
"vm_name": "my-vm"
}