Copy Or Move A Vapp - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

vCloud API Programming Guide
Example 4-18. Move a vAppTemplate
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/cloneVAppTemplate
Content-Type: application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml
<CloneVAppTemplateParams name="Ubuntu Copy" xmlns="http://www.vmware.com/vcloud/v1">
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-111"/>
<IsSourceDelete>true</IsSourceDelete>
</CloneVAppTemplateParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vAppTemplate+xml
...
<VAppTemplate ovfDescriptorUploaded="true" status="0" name="Ubuntu Copy"
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
...
<Tasks>
<Task ... operation="Busy Virtual Application Template Ubuntu Copy (382)" ...>
...
</Task>
</Tasks>
</VAppTemplate>

Copy or Move a vApp

The cloneVApp request makes a copy of the vApp referenced in the Source element of the request body. The 
request specifies a new name and, optionally, a new description for the copy. The request can optionally 
include an IsSourceDelete element whose value specifies whether the source vApp is deleted after the copy 
is complete. If IsSourceDelete is missing from the request body or present with a value of false, the source 
object remains in place after the copy is complete. Setting IsSourceDelete to true effectively moves the 
vApp.
You cannot copy or move a vApp that is deployed.
Example
4‐19 copies the vApp referenced by http://vcloud.example.com/api/v1.0/vApp/vApp‐201 to the vDC 
referenced by http://vcloud.example.com/api/v1.0/vdc/5 and provides a new name and description for the 
copy. Because the IsSourceDelete element in the request body contains a value of false, the source vApp 
is unaffected by the copy operation. (The default value of IsSourceDelete is false. The example includes it 
for illustrative purposes only.)
The response is a Task element owned by the copy.
Example 4-19. Copy a vApp
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/cloneVApp
Content-Type: application/vnd.vmware.vcloud.cloneVAppParams+xml
<CloneVAppParams name="New Linux Server" xmlns="http://www.vmware.com/vcloud/v1">
<Description>Cloned from Ubuntu FTP Server</Description>
<Source href="http://vcloud.example.com/api/v1.0/vApp/vApp-201"/>
<IsSourceDelete>false</IsSourceDelete>
</CloneVAppParams>
52
href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-302"
type="application/vnd.vmware.vcloud.vAppTemplate+xml" ...>
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
VMware, Inc.

Advertisement

Table of Contents
loading

Table of Contents