diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index 3844caa83..841d258ca 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -1007,6 +1007,12 @@ os-attach: in: body required: true type: object +os-detach: + description: | + The ``os-detach`` action. + in: body + required: true + type: object os-extend: description: | The ``os-extend`` action. diff --git a/api-ref/source/v2/samples/volume-detach-request.json b/api-ref/source/v2/samples/volume-detach-request.json new file mode 100644 index 000000000..f2e9937a0 --- /dev/null +++ b/api-ref/source/v2/samples/volume-detach-request.json @@ -0,0 +1,6 @@ +{ + "os-detach": { + "attachment_id": "d8777f54-84cf-4809-a679-468ffed56cf1" + } +} + diff --git a/api-ref/source/v2/volumes-v2-volumes-actions.inc b/api-ref/source/v2/volumes-v2-volumes-actions.inc index a76a4ed35..0d74a91cf 100644 --- a/api-ref/source/v2/volumes-v2-volumes-actions.inc +++ b/api-ref/source/v2/volumes-v2-volumes-actions.inc @@ -196,6 +196,45 @@ Request Example +Detach volume from a server +=========================== + +.. rest_method:: POST /v2/{tenant_id}/volumes/{volume_id}/action + +Detaches a volume from a server. Specify the ``os-detach`` action in the request body. + +Preconditions + +- Volume status must be ``in-use``. + +Normal response codes: 202, + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - attachment_id: attachment_id + - os-detach: os-detach + - tenant_id: tenant_id + - volume_id_1: volume_id + +Request Example +--------------- + +.. literalinclude:: ./samples/volume-detach-request.json + :language: javascript + + + + + + + + + + Unmanage volume ===============