VMware Cloud Director API - POST-CloneVAppTemplate

VMware Cloud Director API - POST-CloneVAppTemplate

POST /vdc/{id}/action/cloneVAppTemplate

Operation:
POST /vdc/{id}/action/cloneVAppTemplate
Description:
Create a copy of a vApp template.
Since:
0.9
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml
application/vnd.vmware.vcloud.cloneVAppTemplateParams+json
Input type:
CloneVAppTemplateParamsType
Output parameters
VAppTemplateType

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.vAppTemplate+xml
application/vnd.vmware.vcloud.vAppTemplate+json
Output type:
VAppTemplateType
Examples
Request
HTTP 1.1
POST /api/vdc/afaafb99-228c-4838-ad07-5bf3aa649d42/action/cloneVAppTemplate

Headers:
Content-Length: 359
Content-Type: application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml; charset=ISO-8859-1
x-vcloud-authorization: iIkyZzr07kqm/lMWdPGyA4xBD9ys0teo/Yo0F6NXHbo=

Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:CloneVAppTemplateParams
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    name="ClonedVAppTemplNew">
    <vcloud:Source
        href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-b839171b-0272-4c3e-8910-fe3d421e35de"/>
    <vcloud:IsSourceDelete>false</vcloud:IsSourceDelete>
</vcloud:CloneVAppTemplateParams>
Response
HTTP/1.1 201 Created

Headers:
Content-Length: 7754
Content-Type: application/vnd.vmware.vcloud.vapptemplate+xml;version=5.5
Location: https://vcloud.example.com/api/vAppTemplate/vappTemplate-780798e9-00bb-44a8-a3be-402ab18f8b50
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?><VAppTemplate
    xmlns="http://www.vmware.com/vcloud/v1.5"
    xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    goldMaster="false"
    href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-780798e9-00bb-44a8-a3be-402ab18f8b50"
    id="urn:vcloud:vapptemplate:780798e9-00bb-44a8-a3be-402ab18f8b50"
    name="ClonedVAppTemplNew"
    ovfDescriptorUploaded="true"
    status="0"
    type="application/vnd.vmware.vcloud.vAppTemplate+xml"
    xsi:schemaLocation="http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd 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/vdc/afaafb99-228c-4838-ad07-5bf3aa649d42"
        rel="up"
        type="application/vnd.vmware.vcloud.vdc+xml"/>
    <Description>Catalog description</Description>
    <Tasks>
        <Task
            cancelRequested="false"
            expiryTime="2013-05-14T14:51:29.945+03:00"
            href="https://vcloud.example.com/api/task/90046ac0-b5b2-4fdb-9e85-30901bfaeb24"
            id="urn:vcloud:task:90046ac0-b5b2-4fdb-9e85-30901bfaeb24"
            name="task"
            operation="Copying Virtual Application Template ClonedVAppTemplNew(780798e9-00bb-44a8-a3be-402ab18f8b50)"
            operationName="vdcCopyTemplate"
            serviceNamespace="com.vmware.vcloud"
            startTime="2013-02-13T14:51:29.945+02:00"
            status="running"
            type="application/vnd.vmware.vcloud.task+xml">
            <Link
                href="https://vcloud.example.com/api/task/90046ac0-b5b2-4fdb-9e85-30901bfaeb24/action/cancel"
                rel="task:cancel"/>
            <Owner
                href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-780798e9-00bb-44a8-a3be-402ab18f8b50"
                name="ClonedVAppTemplNew"
                type="application/vnd.vmware.vcloud.vAppTemplate+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>
    <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>
    <Children>
        <Vm
            goldMaster="false"
            href="https://vcloud.example.com/api/vAppTemplate/vm-762015b1-5345-46ed-a5b0-bf9a53bef748"
            id="urn:vcloud:vm:762015b1-5345-46ed-a5b0-bf9a53bef748"
            name="smallLin"
            type="application/vnd.vmware.vcloud.vm+xml">
            <Description>VMware engineering hostd intgration test vm w/2.4.26 linux with vmware tools</Description>
            <NetworkConnectionSection
                href="https://vcloud.example.com/api/vAppTemplate/vm-762015b1-5345-46ed-a5b0-bf9a53bef748/networkConnectionSection/"
                ovf:required="false"
                type="application/vnd.vmware.vcloud.networkConnectionSection+xml">
                <ovf:Info>Specifies the available VM network connections</ovf:Info>
            </NetworkConnectionSection>
            <GuestCustomizationSection
                href="https://vcloud.example.com/api/vAppTemplate/vm-762015b1-5345-46ed-a5b0-bf9a53bef748/guestCustomizationSection/"
                ovf:required="false"
                type="application/vnd.vmware.vcloud.guestCustomizationSection+xml">
                <ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
                <Enabled>false</Enabled>
                <ChangeSid>false</ChangeSid>
                <JoinDomainEnabled>false</JoinDomainEnabled>
                <UseOrgSettings>false</UseOrgSettings>
                <AdminPasswordEnabled>false</AdminPasswordEnabled>
                <AdminPasswordAuto>false</AdminPasswordAuto>
                <AdminAutoLogonEnabled>false</AdminAutoLogonEnabled>
                <AdminAutoLogonCount>0</AdminAutoLogonCount>
                <ResetPasswordRequired>false</ResetPasswordRequired>
                <ComputerName>DamnSmallLi-001</ComputerName>
            </GuestCustomizationSection>
            <ovf:ProductSection
                ovf:class=""
                ovf:instance=""
                ovf:required="true">
                <ovf:Info>Information about the installed software</ovf:Info>
                <ovf:Category>vCloud</ovf:Category>
                <ovf:Property
                    ovf:key="vCloud_computerName"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_computerName</ovf:Label>
                </ovf:Property>
                <ovf:Property
                    ovf:key="vCloud_numnics"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_numnics</ovf:Label>
                </ovf:Property>
                <ovf:Property
                    ovf:key="vCloud_adminPassword"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_adminPassword</ovf:Label>
                </ovf:Property>
                <ovf:Property
                    ovf:key="vCloud_primaryNic"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_primaryNic</ovf:Label>
                </ovf:Property>
                <ovf:Property
                    ovf:key="vCloud_reconfigToken"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_reconfigToken</ovf:Label>
                </ovf:Property>
                <ovf:Property
                    ovf:key="vCloud_bitMask"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_bitMask</ovf:Label>
                </ovf:Property>
                <ovf:Property
                    ovf:key="vCloud_resetPassword"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_resetPassword</ovf:Label>
                </ovf:Property>
                <ovf:Property
                    ovf:key="vCloud_markerid"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_markerid</ovf:Label>
                </ovf:Property>
                <ovf:Property
                    ovf:key="vCloud_UseSysPrep"
                    ovf:password="false"
                    ovf:type="string"
                    ovf:userConfigurable="true"
                    ovf:value="">
                    <ovf:Label>vCloud_UseSysPrep</ovf:Label>
                </ovf:Property>
            </ovf:ProductSection>
            <VAppScopedLocalId>DamnSmallLinux</VAppScopedLocalId>
            <DateCreated>2013-02-13T14:51:29.842+02:00</DateCreated>
        </Vm>
    </Children>
    <LeaseSettingsSection
        href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-780798e9-00bb-44a8-a3be-402ab18f8b50/leaseSettingsSection/"
        ovf:required="false"
        type="application/vnd.vmware.vcloud.leaseSettingsSection+xml">
        <ovf:Info>Lease settings section</ovf:Info>
        <Link
            href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-780798e9-00bb-44a8-a3be-402ab18f8b50/leaseSettingsSection/"
            rel="edit"
            type="application/vnd.vmware.vcloud.leaseSettingsSection+xml"/>
        <StorageLeaseInSeconds>2592000</StorageLeaseInSeconds>
        <StorageLeaseExpiration>2013-03-15T14:51:29.842+02:00</StorageLeaseExpiration>
    </LeaseSettingsSection>
    <CustomizationSection
        goldMaster="false"
        href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-780798e9-00bb-44a8-a3be-402ab18f8b50/customizationSection/"
        ovf:required="false"
        type="application/vnd.vmware.vcloud.customizationSection+xml">
        <ovf:Info>VApp template customization section</ovf:Info>
        <CustomizeOnInstantiate>true</CustomizeOnInstantiate>
    </CustomizationSection>
    <DateCreated>2013-02-13T14:51:29.842+02:00</DateCreated>
</VAppTemplate>