VMware Cloud Director API - POST-CloneVApp

VMware Cloud Director API - POST-CloneVApp

POST /vdc/{id}/action/cloneVApp

Operation:
POST /vdc/{id}/action/cloneVApp
Description:
Create a copy of a vApp.
Since:
0.9
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.cloneVAppParams+xml
application/vnd.vmware.vcloud.cloneVAppParams+json
Input type:
CloneVAppParamsType
Output parameters
VAppType

The response includes a Task element. You can monitor the task to to track the creation of the copy.

Produce media type(s):
application/vnd.vmware.vcloud.vApp+xml
application/vnd.vmware.vcloud.vApp+json
Output type:
VAppType
Examples
Request
HTTP 1.1
POST /api/vdc/afaafb99-228c-4838-ad07-5bf3aa649d42/action/cloneVApp

Headers:
Content-Length: 426
Content-Type: application/vnd.vmware.vcloud.cloneVAppParams+xml; charset=ISO-8859-1
x-vcloud-authorization: g+IXrJP8+/ndQN0PKg7FuR2YK/3FGuKE7/hP5LoM6hE=

Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:CloneVAppParams
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    deploy="false"
    linkedClone="false"
    name="VAppClone"
    powerOn="false">
    <vcloud:Description>Clone vapp.</vcloud:Description>
    <vcloud:Source
        href="https://vcloud.example.com/api/vApp/vapp-bba47763-0ce1-45b9-8470-ea29ba58c52f"/>
    <vcloud:IsSourceDelete>false</vcloud:IsSourceDelete>
</vcloud:CloneVAppParams>
Response
HTTP/1.1 201 Created

Headers:
Content-Length: 3246
Content-Type: application/vnd.vmware.vcloud.vapp+xml;version=5.5
Location: https://vcloud.example.com/api/vApp/vapp-6af31287-27c7-4e2e-8855-adec43350f93
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?><VApp
    xmlns="http://www.vmware.com/vcloud/v1.5"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    deployed="false"
    href="https://vcloud.example.com/api/vApp/vapp-6af31287-27c7-4e2e-8855-adec43350f93"
    id="urn:vcloud:vapp:6af31287-27c7-4e2e-8855-adec43350f93"
    name="VAppClone"
    ovfDescriptorUploaded="true"
    status="0"
    type="application/vnd.vmware.vcloud.vApp+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/network/528e8d60-b25d-4e3e-90e8-c555cf99b5f1"
        name="VM Network"
        rel="down"
        type="application/vnd.vmware.vcloud.vAppNetwork+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6af31287-27c7-4e2e-8855-adec43350f93/controlAccess/"
        rel="down"
        type="application/vnd.vmware.vcloud.controlAccess+xml"/>
    <Link
        href="https://vcloud.example.com/api/vdc/afaafb99-228c-4838-ad07-5bf3aa649d42"
        rel="up"
        type="application/vnd.vmware.vcloud.vdc+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6af31287-27c7-4e2e-8855-adec43350f93/owner"
        rel="down"
        type="application/vnd.vmware.vcloud.owner+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6af31287-27c7-4e2e-8855-adec43350f93/metadata"
        rel="down"
        type="application/vnd.vmware.vcloud.metadata+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6af31287-27c7-4e2e-8855-adec43350f93/ovf"
        rel="ovf"
        type="text/xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6af31287-27c7-4e2e-8855-adec43350f93/productSections/"
        rel="down"
        type="application/vnd.vmware.vcloud.productSections+xml"/>
    <Description>Clone vapp.</Description>
    <Tasks>
        <Task
            cancelRequested="false"
            expiryTime="2013-05-15T13:16:15.099+03:00"
            href="https://vcloud.example.com/api/task/8f0bb889-7127-44e5-a8f1-174f9d490397"
            id="urn:vcloud:task:8f0bb889-7127-44e5-a8f1-174f9d490397"
            name="task"
            operation="Copying Virtual Application VAppClone(6af31287-27c7-4e2e-8855-adec43350f93)"
            operationName="vdcCopyVapp"
            serviceNamespace="com.vmware.vcloud"
            startTime="2013-02-14T13:16:15.099+02:00"
            status="running"
            type="application/vnd.vmware.vcloud.task+xml">
            <Link
                href="https://vcloud.example.com/api/task/8f0bb889-7127-44e5-a8f1-174f9d490397/action/cancel"
                rel="task:cancel"/>
            <Owner
                href="https://vcloud.example.com/api/vApp/vapp-6af31287-27c7-4e2e-8855-adec43350f93"
                name="VAppClone"
                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"/>
            <Progress>1</Progress>
            <Details/>
        </Task>
    </Tasks>
    <DateCreated>2013-02-14T13:16:11.039+02:00</DateCreated>
    <Owner
        type="application/vnd.vmware.vcloud.owner+xml">
        <User
            href="https://vcloud.example.com/api/admin/user/51e86769-9e2d-4edc-af4e-5d3606494cbf"
            name="system"
            type="application/vnd.vmware.admin.user+xml"/>
    </Owner>
    <InMaintenanceMode>false</InMaintenanceMode>
</VApp>