Virtual Machine Snapshot Remove Snapshot Task

Virtual Machine Snapshot Remove Snapshot Task

Removes this snapshot and deletes any associated storage.

Required privileges: VirtualMachine.State.RemoveSnapshot

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/VirtualMachineSnapshot/{moId}/RemoveSnapshot_Task
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case VirtualMachineSnapshot/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Request Body
RemoveSnapshotRequestType of type(s) application/json
Required
{
    "removeChildren": false,
    "consolidate": false
}
boolean
removeChildren
Required

Flag to specify removal of the entire snapshot subtree.

boolean
consolidate
Optional

(optional) If set to true, the virtual disk associated with this snapshot will be merged with other disk if possible. Defaults to true.

Authentication
This operation uses the following authentication methods.
Responses
200

This method returns a Task object with which to monitor the operation.

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

TaskInProgress: if the virtual machine is busy.

Returns TaskInProgress of type(s) application/json
This response body class contains all of the following: VimFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ],
    "task": {
        "type": "string",
        "value": "string"
    }
}
task
Required

Reference to an instance of the Task managed object.