VMware Cloud Director API - POST-CreateSnapshot
POST /vApp/{id}/action/createSnapshot
- Operation:
- POST /vApp/{id}/action/createSnapshot
- Description:
- Creates new snapshot of a virtual machine or of all the virtual machines in a vApp. Prior to creation of the new snapshots, any existing user created snapshots associated with the virtual machines are removed.
- Since:
- 5.1
- Input parameters
-
- Consume media type(s):
-
application/vnd.vmware.vcloud.createSnapshotParams+xml
application/vnd.vmware.vcloud.createSnapshotParams+json
- Input type:
- CreateSnapshotParamsType
- Output parameters
-
TaskType
This operation is asynchronous and returns a task that you can monitor to track the progress of the request.
- Produce media type(s):
-
application/vnd.vmware.vcloud.task+xml
application/vnd.vmware.vcloud.task+json
- Output type:
- TaskType
- Examples
-
- Request
-
HTTP 1.1
POST /api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/createSnapshot
Headers:
Content-Length: 247
Content-Type: application/vnd.vmware.vcloud.createSnapshotParams+xml; charset=ISO-8859-1
x-vcloud-authorization: 4Ezv8QOCNMOaWCVI6gEHOXEG299HZAsmcB0qrgPRp1I=
Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:CreateSnapshotParams
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
memory="true"
name="name"
quiesce="true">
<vcloud:Description>Description</vcloud:Description>
</vcloud:CreateSnapshotParams>
- Response
-
HTTP/1.1 202 Accepted
Headers:
Content-Length: 1329
Content-Type: application/vnd.vmware.vcloud.task+xml;version=5.5
Location: https://vcloud.example.com/api/task/fab4b26f-4f2e-4d49-ad01-ae9324bbfe48
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><Task
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
cancelRequested="false"
expiryTime="2013-05-15T13:10:11.652+03:00"
href="https://vcloud.example.com/api/task/fab4b26f-4f2e-4d49-ad01-ae9324bbfe48"
id="urn:vcloud:task:fab4b26f-4f2e-4d49-ad01-ae9324bbfe48"
name="task"
operation="Creating Snapshot Virtual Machine (ec94079b-3071-4a72-b95c-4154acb12c38)"
operationName="vappCreateSnapshot"
serviceNamespace="com.vmware.vcloud"
startTime="2013-02-14T13:10:11.652+02:00"
status="running"
type="application/vnd.vmware.vcloud.task+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/task/fab4b26f-4f2e-4d49-ad01-ae9324bbfe48/action/cancel"
rel="task:cancel"/>
<Owner
href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38"
name=""
type="application/vnd.vmware.vcloud.vm+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"/>
<Details/>
</Task>