• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Volumes
  6. Deleting a Volume

Deleting a Volume

Function Description

This interface is used to delete a specified volume.

URI

  • URI format

    DELETE /v2/{tenant_id}/os-volumes/{volume_id}

    DELETE /v2.1/{tenant_id}/os-volumes/{volume_id}

  • Parameter description

    Parameter

    Mandatory

    Description

    tenant_id

    Yes

    Specifies the tenant or project ID.

    volume_id

    Yes

    Specifies the volume ID.

Restrictions

  • If the volume has a snapshot not deleted, the volume cannot be deleted.
  • A volume that is being attached to an ECS cannot be deleted.
  • A volume that is being migrated cannot be deleted.
  • Only a volume in the available, error, error_restoring, or error_extending state can be deleted.
  • This interface will become invalid from micro version 2.36. Since this version, the system will return error 404 when you invoke this interface. Using the corresponding storage service interface is recommended.

Extension Description

N/A

Request

N/A

Response

N/A

Request Example

DELETE /v2/b84c367e4d1047fc9b54f28b400ddbc2/os-volumes/0cf90bab-c513-46df-8559-45ba6de80e3f

DELETE /v2.1/b84c367e4d1047fc9b54f28b400ddbc2/os-volumes/0cf90bab-c513-46df-8559-45ba6de80e3f

Response Example

N/A

Returned Values

See General Request Returned Values.