VMware Cloud Director API - POST-DetachDisk

VMware Cloud Director API - POST-DetachDisk

POST /vApp/{id}/disk/action/detach

Operation:
POST /vApp/{id}/disk/action/detach
Description:
Detach a disk from a VM.
Since:
5.1
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml
application/vnd.vmware.vcloud.diskAttachOrDetachParams+json
Input type:
DiskAttachOrDetachParamsType
Output parameters
TaskType

This operation is asynchronous and returns a task that you can monitor to track the progress of the request.

Produce media type(s):
application/vnd.vmware.vcloud.task+xml
application/vnd.vmware.vcloud.task+json
Output type:
TaskType
Examples
Request
HTTP 1.1
POST /api/vApp/vm-89c84bd6-c6f2-4e4c-8a7d-c44a3489e2e4/disk/action/detach

Headers:
Content-Length: 407
Content-Type: application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml; charset=ISO-8859-1
x-vcloud-authorization: eVBkZn2wahPAU+IvbURo7ekslpuoHERMB2DZEFlJuHs=

Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:DiskAttachOrDetachParams
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
    <vcloud:Disk
        href="https://vcloud.example.com/api/disk/e8b2b752-21ca-4cb9-80f6-a55ef1a81eec"
        name="diskName"
        type="application/vnd.vmware.vcloud.disk+xml"/>
    <vcloud:BusNumber>10</vcloud:BusNumber>
    <vcloud:UnitNumber>10</vcloud:UnitNumber>
</vcloud:DiskAttachOrDetachParams>
Response
HTTP/1.1 202 Accepted

Headers:
Content-Length: 1326
Content-Type: application/vnd.vmware.vcloud.task+xml;version=5.5
Location: https://vcloud.example.com/api/task/1bb144bd-aa95-420b-9096-914a42aedff0
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?><Task
    xmlns="http://www.vmware.com/vcloud/v1.5"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    cancelRequested="false"
    expiryTime="2013-05-15T13:26:05.606+03:00"
    href="https://vcloud.example.com/api/task/1bb144bd-aa95-420b-9096-914a42aedff0"
    id="urn:vcloud:task:1bb144bd-aa95-420b-9096-914a42aedff0"
    name="task"
    operation="Detaching Disk from Virtual Machine (89c84bd6-c6f2-4e4c-8a7d-c44a3489e2e4)"
    operationName="vappDetachDisk"
    serviceNamespace="com.vmware.vcloud"
    startTime="2013-02-14T13:26:05.606+02:00"
    status="running"
    type="application/vnd.vmware.vcloud.task+xml"
    xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
    <Link
        href="https://vcloud.example.com/api/task/1bb144bd-aa95-420b-9096-914a42aedff0/action/cancel"
        rel="task:cancel"/>
    <Owner
        href="https://vcloud.example.com/api/vApp/vm-89c84bd6-c6f2-4e4c-8a7d-c44a3489e2e4"
        name=""
        type="application/vnd.vmware.vcloud.vm+xml"/>
    <User
        href="https://vcloud.example.com/api/admin/user/1260efee-6915-494c-8afa-84e7e6d8a310"
        name="vcloud"
        type="application/vnd.vmware.admin.user+xml"/>
    <Organization
        href="https://vcloud.example.com/api/org/a93c9db9-7471-3192-8d09-a8f7eeda85f9"
        name="System"
        type="application/vnd.vmware.vcloud.org+xml"/>
    <Details/>
</Task>