VMware Cloud Director API - POST-InstantiateVAppTemplate

VMware Cloud Director API - POST-InstantiateVAppTemplate

POST /vdc/{id}/action/instantiateVAppTemplate

Operation:
POST /vdc/{id}/action/instantiateVAppTemplate
Description:
Create a vApp from a vApp template
Since:
0.9
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml
application/vnd.vmware.vcloud.instantiateVAppTemplateParams+json
Input type:
InstantiateVAppTemplateParamsType
Output parameters
VAppType

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

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/instantiateVAppTemplate

Headers:
Content-Length: 1138
Content-Type: application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml; charset=ISO-8859-1
x-vcloud-authorization: 4Ezv8QOCNMOaWCVI6gEHOXEG299HZAsmcB0qrgPRp1I=

Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:InstantiateVAppTemplateParams
    xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    deploy="false"
    name="Small vapp"
    powerOn="false">
    <vcloud:Description>VApp Description</vcloud:Description>
    <vcloud:InstantiationParams>
        <vcloud:NetworkConfigSection>
            <ovf:Info>NetInfo</ovf:Info>
            <vcloud:NetworkConfig
                networkName="VM Network">
                <vcloud:Configuration>
                    <vcloud:ParentNetwork
                        href="https://vcloud.example.com/api/network/1fcc8a15-340d-43cc-a200-76c2cbbe70ba"
                        name="VM Network"
                        type="application/vnd.vmware.vcloud.network+xml"/>
                    <vcloud:FenceMode>bridged</vcloud:FenceMode>
                </vcloud:Configuration>
            </vcloud:NetworkConfig>
        </vcloud:NetworkConfigSection>
    </vcloud:InstantiationParams>
    <vcloud:Source
        href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-fa813d19-3936-4099-bff9-e0ad8d1e34bb"
        name="imported"
        type="application/vnd.vmware.vcloud.vAppTemplate+xml"/>
</vcloud:InstantiateVAppTemplateParams>
Response
HTTP/1.1 201 Created

Headers:
Content-Length: 3262
Content-Type: application/vnd.vmware.vcloud.vapp+xml;version=5.5
Location: https://vcloud.example.com/api/vApp/vapp-6c0d9722-80a6-4f19-b676-72ebf48e4e71
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-6c0d9722-80a6-4f19-b676-72ebf48e4e71"
    id="urn:vcloud:vapp:6c0d9722-80a6-4f19-b676-72ebf48e4e71"
    name="Small vapp"
    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/5b57b28f-2d06-498c-bf88-e52f2501f8db"
        name="VM Network"
        rel="down"
        type="application/vnd.vmware.vcloud.vAppNetwork+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6c0d9722-80a6-4f19-b676-72ebf48e4e71/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-6c0d9722-80a6-4f19-b676-72ebf48e4e71/owner"
        rel="down"
        type="application/vnd.vmware.vcloud.owner+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6c0d9722-80a6-4f19-b676-72ebf48e4e71/metadata"
        rel="down"
        type="application/vnd.vmware.vcloud.metadata+xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6c0d9722-80a6-4f19-b676-72ebf48e4e71/ovf"
        rel="ovf"
        type="text/xml"/>
    <Link
        href="https://vcloud.example.com/api/vApp/vapp-6c0d9722-80a6-4f19-b676-72ebf48e4e71/productSections/"
        rel="down"
        type="application/vnd.vmware.vcloud.productSections+xml"/>
    <Description>VApp Description</Description>
    <Tasks>
        <Task
            cancelRequested="false"
            expiryTime="2013-05-15T13:09:05.983+03:00"
            href="https://vcloud.example.com/api/task/a66dd89e-a96f-4e0c-8d1d-9bba9fd2de1e"
            id="urn:vcloud:task:a66dd89e-a96f-4e0c-8d1d-9bba9fd2de1e"
            name="task"
            operation="Creating Virtual Application Small vapp(6c0d9722-80a6-4f19-b676-72ebf48e4e71)"
            operationName="vdcInstantiateVapp"
            serviceNamespace="com.vmware.vcloud"
            startTime="2013-02-14T13:09:05.983+02:00"
            status="running"
            type="application/vnd.vmware.vcloud.task+xml">
            <Link
                href="https://vcloud.example.com/api/task/a66dd89e-a96f-4e0c-8d1d-9bba9fd2de1e/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"/>
            <Progress>1</Progress>
            <Details/>
        </Task>
    </Tasks>
    <DateCreated>2013-02-14T13:09:04.639+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>