create_volume()
This operation creates a volume in the specified project and region.
Request Syntax
create_volume(
project_id: str,
region_id: str,
volume_name: str,
)
PARAMETERS:
-
project_id (str) -
[REQUIRED]
Project ID that owns the volume.
-
region_id (str) -
[REQUIRED]
Region ID where the volume is created.
-
volume_name (str) -
[REQUIRED]
Name of the volume.
RETURN TYPE:
requests.Response
HTTP response from the create volume API.
EXCEPTIONS:
-
MilvusException
Raised when volume creation fails.
Examples
from pymilvus.bulk_writer import VolumeManager
vm = VolumeManager(
cloud_endpoint="https://api.cloud.zilliz.com",
api_key="YOUR_API_KEY",
)
resp = vm.create_volume(
project_id="proj-xxx",
region_id="aws-us-west-2",
volume_name="books-volume",
)
print(resp.json())