---
title: "Volume data model"
url: "https://docs.unified.to/compute/volume/model"
description: "The Volume data model object in Unified's Volume API: 12 fields, including created_at, updated_at and name, with types and enum values."
---
# Volume data model

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/compute/integrations.md) page. 

| Field                    | Type                                                                                   | Required | Description                                                                           |
| ------------------------ | -------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------- |
| id                       | string                                                                                 | No       | Unique identifier for the volume                                                      |
| created\_at              | string (date-time)                                                                     | No       | When the volume was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                  |
| updated\_at              | string (date-time)                                                                     | No       | When the volume was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)             |
| name                     | string                                                                                 | No       | Display name of the volume                                                            |
| type                     | enum                                                                                   | No       | The kind of volume Values: STANDARD, HIGH\_PERFORMANCE, SHARED, LOCAL, OTHER          |
| status                   | enum                                                                                   | No       | Normalized volume status Values: CREATING, AVAILABLE, IN\_USE, DELETING, ERROR, OTHER |
| size\_mb                 | number                                                                                 | No       | Provisioned size in MiB                                                               |
| used\_mb                 | number                                                                                 | No       | Used space in MiB                                                                     |
| region\_id               | string                                                                                 | No       | The region the volume lives in                                                        |
| availability\_zone       | string                                                                                 | No       | The availability zone within the region, where the vendor places volumes per zone     |
| instance\_ids            | string\[\]                                                                             | No       | Instances the volume is mounted on                                                    |
| metadata                 | [ComputeMetadata](https://docs.unified.to/compute/volume/model.md#ComputeMetadata)\[\] | No       | Vendor labels, tags and metadata                                                      |
| metadata\[\].id          | string                                                                                 | No       |                                                                                       |
| metadata\[\].slug        | string                                                                                 | No       | The label, tag or metadata key                                                        |
| metadata\[\].value       | object                                                                                 | No       | The label, tag or metadata value                                                      |
| metadata\[\].namespace   | string                                                                                 | No       | The origin of the value (eg. labels, tags, metadata)                                  |
| metadata\[\].format      | enum                                                                                   | No       | The data type of the value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT         |
| metadata\[\].extra\_data | object                                                                                 | No       |                                                                                       |

## TypeScript

```typescript
export type ComputeVolume = {
	id?: string; // Unique identifier for the volume
	created_at?: string-time; // When the volume was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the volume was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // Display name of the volume
	type?: 'STANDARD' | 'HIGH_PERFORMANCE' | 'SHARED' | 'LOCAL' | 'OTHER'; // The kind of volume
	status?: 'CREATING' | 'AVAILABLE' | 'IN_USE' | 'DELETING' | 'ERROR' | 'OTHER'; // Normalized volume status
	size_mb?: number; // Provisioned size in MiB
	used_mb?: number; // Used space in MiB
	region_id?: string; // The region the volume lives in
	availability_zone?: string; // The availability zone within the region, where the vendor places volumes per zone
	instance_ids?: string[]; // Instances the volume is mounted on
	metadata?: []; // Vendor labels, tags and metadata
	raw?: any; // Raw data from integration
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodComputeVolume = z.object({
	id: z.string().optional().describe("Unique identifier for the volume"),
	created_at: z.string-time().optional().describe("When the volume was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the volume was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("Display name of the volume"),
	type: z.enum("STANDARD", "HIGH_PERFORMANCE", "SHARED", "LOCAL", "OTHER").optional().describe("The kind of volume"),
	status: z.enum("CREATING", "AVAILABLE", "IN_USE", "DELETING", "ERROR", "OTHER").optional().describe("Normalized volume status"),
	size_mb: z.number().optional().describe("Provisioned size in MiB"),
	used_mb: z.number().optional().describe("Used space in MiB"),
	region_id: z.string().optional().describe("The region the volume lives in"),
	availability_zone: z.string().optional().describe("The availability zone within the region, where the vendor places volumes per zone"),
	instance_ids: z.array().optional().describe("Instances the volume is mounted on"),
	metadata: z.array().optional().describe("Vendor labels, tags and metadata"),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class ComputeVolumeType(str, Enum):
	STANDARD = 'STANDARD'
	HIGH_PERFORMANCE = 'HIGH_PERFORMANCE'
	SHARED = 'SHARED'
	LOCAL = 'LOCAL'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeVolumeStatus(str, Enum):
	CREATING = 'CREATING'
	AVAILABLE = 'AVAILABLE'
	IN_USE = 'IN_USE'
	DELETING = 'DELETING'
	ERROR = 'ERROR'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeVolume:
	"""Unique identifier for the volume"""
	id: Optional[str]
	"""When the volume was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the volume was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""Display name of the volume"""
	name: Optional[str]
	"""The kind of volume"""
	type: Optional[ComputeVolumeType]
	"""Normalized volume status"""
	status: Optional[ComputeVolumeStatus]
	"""Provisioned size in MiB"""
	size_mb: Optional[int]
	"""Used space in MiB"""
	used_mb: Optional[int]
	"""The region the volume lives in"""
	region_id: Optional[str]
	"""The availability zone within the region, where the vendor places volumes per zone"""
	availability_zone: Optional[str]
	"""Instances the volume is mounted on"""
	instance_ids: Optional[List[List[str]]]
	"""Vendor labels, tags and metadata"""
	metadata: Optional[PropertyComputeVolumeMetadata]

```
