VMware Cloud Director API - POST-PowerOffVApp

VMware Cloud Director API - POST-PowerOffVApp

POST /vApp/{id}/power/action/powerOff

Operation:
POST /vApp/{id}/power/action/powerOff
Description:
Power off a vApp or VM.

If used on a vApp, powers off all VMs in the vApp. If used on a VM, powers off the VM. This operation is available only for a vApp or VM that is powered on.

Since:
0.9
Input parameters
Consume media type(s):
None
Input type:
None
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/vapp-6c0d9722-80a6-4f19-b676-72ebf48e4e71/power/action/powerOff

Headers:
x-vcloud-authorization: 4Ezv8QOCNMOaWCVI6gEHOXEG299HZAsmcB0qrgPRp1I=

Body:
Response
HTTP/1.1 202 Accepted

Headers:
Content-Length: 1346
Content-Type: application/vnd.vmware.vcloud.task+xml;version=5.5
Location: https://vcloud.example.com/api/task/df9aaf84-cdb2-483a-a537-3ab349da667c
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:09:56.521+03:00"
    href="https://vcloud.example.com/api/task/df9aaf84-cdb2-483a-a537-3ab349da667c"
    id="urn:vcloud:task:df9aaf84-cdb2-483a-a537-3ab349da667c"
    name="task"
    operation="Powering Off Virtual Application Small vapp(6c0d9722-80a6-4f19-b676-72ebf48e4e71)"
    operationName="vappPowerOff"
    serviceNamespace="com.vmware.vcloud"
    startTime="2013-02-14T13:09:56.521+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/df9aaf84-cdb2-483a-a537-3ab349da667c/action/cancel"
        rel="task:cancel"/>
    <Owner
        href="https://vcloud.example.com/api/vApp/vapp-6c0d9722-80a6-4f19-b676-72ebf48e4e71"
        name="Small vapp"
        type="application/vnd.vmware.vcloud.vApp+xml"/>
    <User
        href="https://vcloud.example.com/api/admin/user/1260efee-6915-494c-8afa-84e7e6d8a310"
        name="system"
        type="application/vnd.vmware.admin.user+xml"/>
    <Organization
        href="https://vcloud.example.com/api/org/7b832bc5-3d65-45a2-8d35-da28388ab80a"
        name="Default"
        type="application/vnd.vmware.vcloud.org+xml"/>
    <Details/>
</Task>