nova/api-ref/source/os-volume-attachments.inc

158 lines
3.5 KiB
PHP
Raw Normal View History

.. -*- rst -*-
.. needs:example_verification
.. needs:body_verification
===================================================================
Servers with volume attachments (servers, os-volume\_attachments)
===================================================================
Attaches volumes that are created through the volume API to server
instances. Also, lists volume attachments for a server instance, shows
details for a volume attachment, and detaches a volume.
List volume attachments for an instance
=======================================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments
List volume attachments for an instance.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id_path
Response
--------
.. rest_parameters:: parameters.yaml
- volumeAttachments: volumeAttachments
- device: device_resp
- id: attachment_id_resp
- serverId: server_id
- volumeId: volumeId_resp
Attach a volume to an instance
==============================
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments
Attach a volume to an instance.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id_path
- volumeAttachment: volumeAttachment
- volumeId: volumeId
- device: device
Response
--------
.. rest_parameters:: parameters.yaml
- volumeAttachment: volumeAttachment
- device: device_resp
- id: attachment_id_resp
- serverId: server_id
- volumeId: volumeId_resp
Show a detail of a volume attachment
====================================
.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments/{attachment_id}
Show a detail of a volume attachment.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id_path
- attachment_id: attachment_id
Response
--------
.. rest_parameters:: parameters.yaml
- volumeAttachment: volumeAttachment
- device: device_resp
- id: attachment_id_resp
- serverId: server_id
- volumeId: volumeId_resp
Update a volume attachment
==========================
.. rest_method:: PUT /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments/{attachment_id}
Update a volume attachment.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id_path
- attachment_id: attachment_id
- volumeAttachment: volumeAttachment
- volumeId: volumeId_swap
Response
--------
No body is returned on successful request.
Detach a volume from an instance
================================
.. rest_method:: DELETE /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments/{attachment_id}
Detach a volume from an instance.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- server_id: server_id_path
- attachment_id: attachment_id
Response
--------
No body is returned on successful request.