Detach Volume from Stacklet
- Name
put
- Type
- /v1/volumes/:id
- Description
You can detach a volume from a stacklet by sending a
PUT
request with specific action.
Request
Required Attributes
- Name
action
- Type
- string
- Description
Action performed on a volume (attach, detach, resize, rename) in this case
detach
.
- Name
stacklet_id
- Type
- integer
- Description
The stacklet id which the volume will be attached to.
Example
curl -X PUT "https://api.simplystack.com/v1/volumes/6c848d7f-0389-4fdf-95bf-7d4d58d9cc04" \
-H "Content-Type: application/json" \
-H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
-d '{"action": "detach"}'
Response
JSON object with key named volume
with the following identifiers:
Attributes
- Name
uuid
- Type
- string
- Description
A unique identifier for the volume.
- Name
name
- Type
- string
- Description
The volume name given by the user at its creation.
- Name
size
- Type
- integer
- Description
The volume size in bytes.
- Name
task
- Type
- object
- Description
This attribute will display the current status of the task or null if the task doesn't exist.
- Name
region
- Type
- object
- Description
The region name where the volume is located.
- Name
stacklet
- Type
- object
- Description
Information about the Stacklet associated with this volume.
- Name
size_gigabytes
- Type
- integer
- Description
The volume size in gigabytes.
- Name
created_at
- Type
- integer
- Description
The date and time in ISO 8601 formats of when the volume was created.
Example
json
{
"volume": {
"id": "6c848d7f-0389-4fdf-95bf-7d4d58d9cc04",
"name": "volume01",
"created_at": "2020-01-07T18:37:45.190194Z",
"task": {
"id": 3,
"name": "detach",
"description": {
"completed": "Volume was detached from a Stacklet.",
"progress": "Volume is detaching from a Stacklet."
}
}
"region": {
"available": true,
"features": [
"floating_ips"
],
"name": "Frankfurt",
"slug": "fra"
},
"size": 10737418240,
"size_gigabytes": 10.0,
"stacklet": null
}
}