# Create a Volume

Launch stage: GA

`POST /api/2.1/unity-catalog/volumes`

Creates a new volume.

 The user could create either an external volume or a managed volume. An external volume
 will be created in the specified external location, while a managed volume
 will be located in the default location which is specified by the parent schema,
 or the parent catalog, or the Metastore.

 For the volume creation to succeed, the user must satisfy following conditions:
 - The caller must be a metastore admin, or be the owner of the parent catalog and schema,
   or have the **USE_CATALOG** privilege on the parent catalog
   and the **USE_SCHEMA** privilege on the parent schema.
 - The caller must have **CREATE VOLUME** privilege on the parent schema.

 For an external volume, following conditions also need to satisfy
 - The caller must have **CREATE EXTERNAL VOLUME** privilege on the external location.
 - There are no other tables, nor volumes existing in the specified storage location.
 - The specified storage location is not under the location of other tables, nor volumes,
   or catalogs or schemas.

API scopes: unity-catalog

## Request body

- `name` (string, optional)
  The name of the volume
- `catalog_name` (string, optional)
  The name of the catalog where the schema and the volume are
- `schema_name` (string, optional)
  The name of the schema where the volume is
- `volume_type` (string, optional)
  The type of the volume. An external volume is located in the specified external location.
   A managed volume is located in the default location which is specified by the parent schema, or the parent catalog, or the Metastore.
   [Learn more](https://docs.databricks.com/aws/en/volumes/managed-vs-external)
  Possible values:
  - `MANAGED`
  - `EXTERNAL`
- `storage_location` (string, optional)
  The storage location on the cloud
- `owner` (string, optional)
  The identifier of the user who owns the volume
- `comment` (string, optional)
  The comment attached to the volume
  Constraints: `[ 1 .. 65536 ] characters`
- `created_by` (string, optional)
  The identifier of the user who created the volume

## Returns

Returns the VolumeInfo object.

## Response

```json
{
  "name": "string",
  "catalog_name": "string",
  "schema_name": "string",
  "volume_type": "MANAGED",
  "storage_location": "string",
  "owner": "string",
  "comment": "string",
  "full_name": "string",
  "volume_id": "string",
  "metastore_id": "string",
  "created_at": 0,
  "created_by": "string",
  "updated_at": 0,
  "updated_by": "string",
  "access_point": "string",
  "browse_only": true
}
```

