VMware Cloud Director API - POST-CaptureVApp-vdc
POST /vdc/{id}/action/captureVApp
- Operation:
- POST /vdc/{id}/action/captureVApp
- Description:
- Create a vApp template from a vApp.
- Since:
- 0.9
- Deprecated:
- 5.5
- Input parameters
-
- Consume media type(s):
-
application/vnd.vmware.vcloud.captureVAppParams+xml
application/vnd.vmware.vcloud.captureVAppParams+json
- Input type:
- CaptureVAppParamsType
- Output parameters
-
VAppTemplateType
The response includes a Task element. You can monitor the task to to track the creation of the vApp template.
- 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/captureVApp
Headers:
Content-Length: 342
Content-Type: application/vnd.vmware.vcloud.captureVAppParams+xml; charset=ISO-8859-1
x-vcloud-authorization: qx9qKNjt+qYvVgBtf6m2S1oLWWsSqFdHWxXcFw8YevE=
Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:CaptureVAppParams
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
name="CapturedVapp">
<vcloud:Description>Template captured from vapp.</vcloud:Description>
<vcloud:Source
href="https://vcloud.example.com/api/vApp/vapp-bba47763-0ce1-45b9-8470-ea29ba58c52f"/>
</vcloud:CaptureVAppParams>
- Response
-
HTTP/1.1 201 Created
Headers:
Content-Length: 5324
Content-Type: application/vnd.vmware.vcloud.vapptemplate+xml;version=5.5
Location: https://vcloud.example.com/api/vAppTemplate/vappTemplate-c7e259a8-04b0-4305-a9da-d3b943bf33ed
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-c7e259a8-04b0-4305-a9da-d3b943bf33ed"
id="urn:vcloud:vapptemplate:c7e259a8-04b0-4305-a9da-d3b943bf33ed"
name="CapturedVapp"
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>Template captured from vapp.</Description>
<Tasks>
<Task
cancelRequested="false"
expiryTime="2013-05-15T13:15:11.023+03:00"
href="https://vcloud.example.com/api/task/d24d505b-79f7-46a6-b2c7-ff52e283c1e5"
id="urn:vcloud:task:d24d505b-79f7-46a6-b2c7-ff52e283c1e5"
name="task"
operation="Capturing Virtual Application Template CapturedVapp(c7e259a8-04b0-4305-a9da-d3b943bf33ed)"
operationName="vdcCaptureTemplate"
serviceNamespace="com.vmware.vcloud"
startTime="2013-02-14T13:15:11.023+02:00"
status="running"
type="application/vnd.vmware.vcloud.task+xml">
<Link
href="https://vcloud.example.com/api/task/d24d505b-79f7-46a6-b2c7-ff52e283c1e5/action/cancel"
rel="task:cancel"/>
<Owner
href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-c7e259a8-04b0-4305-a9da-d3b943bf33ed"
name="CapturedVapp"
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-e77b6d6a-9bf7-445d-84e8-caa4d6011ef7"
id="urn:vcloud:vm:e77b6d6a-9bf7-445d-84e8-caa4d6011ef7"
name="importedVapp"
type="application/vnd.vmware.vcloud.vm+xml">
<Description/>
<NetworkConnectionSection
href="https://vcloud.example.com/api/vAppTemplate/vm-e77b6d6a-9bf7-445d-84e8-caa4d6011ef7/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-e77b6d6a-9bf7-445d-84e8-caa4d6011ef7/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>importedVap-001</ComputerName>
</GuestCustomizationSection>
<VAppScopedLocalId>importedVapp</VAppScopedLocalId>
<DateCreated>2013-02-14T13:15:07.202+02:00</DateCreated>
</Vm>
</Children>
<LeaseSettingsSection
href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-c7e259a8-04b0-4305-a9da-d3b943bf33ed/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-c7e259a8-04b0-4305-a9da-d3b943bf33ed/leaseSettingsSection/"
rel="edit"
type="application/vnd.vmware.vcloud.leaseSettingsSection+xml"/>
<StorageLeaseInSeconds>2592000</StorageLeaseInSeconds>
<StorageLeaseExpiration>2013-03-16T13:15:07.202+02:00</StorageLeaseExpiration>
</LeaseSettingsSection>
<CustomizationSection
goldMaster="false"
href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-c7e259a8-04b0-4305-a9da-d3b943bf33ed/customizationSection/"
ovf:required="false"
type="application/vnd.vmware.vcloud.customizationSection+xml">
<ovf:Info>VApp template customization section</ovf:Info>
<CustomizeOnInstantiate>false</CustomizeOnInstantiate>
</CustomizationSection>
<DateCreated>2013-02-14T13:15:07.202+02:00</DateCreated>
</VAppTemplate>