POST
/
cloud
/
v2
/
volumes
/
{project_id}
/
{region_id}
/
{volume_id}
/
detach
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
task_id_list = client.cloud.volumes.detach_from_instance(
    volume_id="726ecfcc-7fd0-4e30-a86e-7892524aa483",
    project_id=1,
    region_id=1,
    instance_id="169942e0-9b53-42df-95ef-1a8b6525c2bd",
)
print(task_id_list.tasks)
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project ID

Examples:

1

region_id
integer
required

Region ID

Examples:

1

volume_id
string
required

Volume ID

Examples:

"726ecfcc-7fd0-4e30-a86e-7892524aa483"

Body

application/json

Response

200 - application/json

OK

The response is of type object.