Vcenter V Storage Object Manager Create Disk From Snapshot Task

Vcenter V Storage Object Manager Create Disk From Snapshot Task
Creates a new Disk from given snapshot of a VStorageObject.

Creates a new Disk from given snapshot of a VStorageObject.

Requires Datastore.FileManagement privilege.

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/VcenterVStorageObjectManager/{moId}/CreateDiskFromSnapshot_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 VcenterVStorageObjectManager/{moId}.

string
release
Required

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


Request Body
CreateDiskFromSnapshotRequestType of type(s) application/json
Required

Show optional properties

{
    "id": {},
    "datastore": {},
    "snapshotId": {},
    "name": "string"
}
{
    "id": {
        "_typeName": "string",
        "id": "string"
    },
    "datastore": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "snapshotId": {
        "_typeName": "string",
        "id": "string"
    },
    "name": "string",
    "profile": [
        {
            "_typeName": "string"
        }
    ],
    "crypto": {
        "_typeName": "string"
    },
    "path": "string",
    "isLinkedClone": false,
    "targetId": {
        "_typeName": "string",
        "id": "string"
    },
    "targetDatastore": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    }
}
id
Required

The ID of the virtual storage object.

datastore
Required

The datastore where the source virtual storage object is located.

snapshotId
Required

The ID of the snapshot of the virtual storage object.

string
name
Required

A user friendly name to be associated with the new disk.

array of object
profile
Optional

SPBM Profile requirement on the new virtual storage object. If not specified datastore default policy would be assigned.

crypto
Optional

Crypto information of the new disk. If unset and if profile contains an encryption iofilter and if snapshto is unencrypted, then crypto will be of type CryptoSpecEncrypt, and filled with keyId that is automatically generated and keyProviderId that is the default kms cluster. If unset and if profile is a default policy and if snapshot is unenrypted, then crypto is treated as CryptoSpecNoOp. If unset and if profile contains an encryption iofilter and if snapshot is encrypted, then crypto is treated as CryptoSpecNoOp. If unset and if profile is a default policy and if snapshot is encrypted, then crypto is treated as CryptoSpecDecrypt. To recrypt the disk during creating disk, crypto has to be present.

string
path
Optional

Relative location where disk has to be created, used in targetDatastore and datastore parameters. If not specified disk gets created at default VStorageObject location of targetDatastore or datastore.

boolean
isLinkedClone
Optional

Indicates whether a linkedClone Disk needs to be created from the snapshot.

Since: vSphere API Release 9.1.0.0

targetId
Optional

The ID of the target virtual storage object. For each new request, the ID should be a unique ID complying to RFC4122V4 (generated randomly). For retry requests with the same ID, all the other input parameters are expected to remain same. If not specified, a system generated ID will be assigned to the newly created virtual storage object.

Since: vSphere API Release 9.1.0.0

targetDatastore
Optional

The target datastore where the new disk needs to be created. if not specified, the new disk will be created where the source virtual storage object is located.

Since: vSphere API Release 9.1.0.0

Authentication
This operation uses the following authentication methods.
Responses
200

OK

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

500

FileFault: If an error occurs while snapshotting the virtual storage object.

InvalidDatastore: If the operation cannot be performed on the datastore.

InvalidState: If the operation cannot be performed on the disk.

NotFound: If specified virtual storage object cannot be found.

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

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"id":"{}","datastore":"{}","snapshotId":"{}","name":"string"}' https://{api_host}/sdk/vim25/{release}/VcenterVStorageObjectManager/{moId}/CreateDiskFromSnapshot_Task
                
Virtual Infrastructure Operations
POST
Vcenter V Storage Object Manager Revert V Storage Object Task
POST
Vcenter V Storage Object Manager Attach Tag To V Storage Object
POST
Vcenter V Storage Object Manager Clear V Storage Object Control Flags
POST
Vcenter V Storage Object Manager Clone V Storage Object Task
POST
Vcenter V Storage Object Manager Create Disk Task
POST
Vcenter V Storage Object Manager Create Disk From Snapshot Task
POST
Vcenter V Storage Object Manager V Storage Object Create Snapshot Task
POST
Vcenter V Storage Object Manager V Storage Object Create Snapshot Ex Task
POST
Vcenter V Storage Object Manager Delete Snapshot Task
POST
Vcenter V Storage Object Manager V Storage Object Delete Snapshot Ex Task
POST
Vcenter V Storage Object Manager V Storage Object Delete Snapshot Ex2 Task
POST
Vcenter V Storage Object Manager Delete V Storage Object Task
POST
Vcenter V Storage Object Manager Delete V Storage Object Ex Task
POST
Vcenter V Storage Object Manager Detach Tag From V Storage Object
POST
Vcenter V Storage Object Manager Extend Disk Task
POST
Vcenter V Storage Object Manager V Storage Object Extend Disk Ex Task
POST
Vcenter V Storage Object Manager Inflate Disk Task
POST
Vcenter V Storage Object Manager List Tags Attached To V Storage Object
POST
Vcenter V Storage Object Manager List V Storage Object
POST
Vcenter V Storage Object Manager List V Storage Objects Attached To Tag
POST
Vcenter V Storage Object Manager Vstorage Object V Center Query Changed Disk Areas
POST
Vcenter V Storage Object Manager Query Virtual Disk Uuid Ex
POST
Vcenter V Storage Object Manager Reconcile Datastore Inventory Task
POST
Vcenter V Storage Object Manager Reconcile Datastore Inventory Ex Task
POST
Vcenter V Storage Object Manager Register Disk
POST
Vcenter V Storage Object Manager Relocate V Storage Object Task
POST
Vcenter V Storage Object Manager Rename V Storage Object
POST
Vcenter V Storage Object Manager Rename V Storage Object Ex
POST
Vcenter V Storage Object Manager Repair V Storage Object Chain Task
POST
Vcenter V Storage Object Manager Retrieve Snapshot Details
POST
Vcenter V Storage Object Manager Retrieve Snapshot Info
POST
Vcenter V Storage Object Manager Retrieve V Storage Infrastructure Object Policy
POST
Vcenter V Storage Object Manager Retrieve V Storage Object
POST
Vcenter V Storage Object Manager Retrieve V Storage Object Associations
POST
Vcenter V Storage Object Manager Retrieve V Storage Object State
POST
Vcenter V Storage Object Manager Revert V Storage Object Ex Task
POST
Vcenter V Storage Object Manager Schedule Reconcile Datastore Inventory
POST
Vcenter V Storage Object Manager Set V Storage Object Control Flags
POST
Vcenter V Storage Object Manager Set Virtual Disk Uuid Ex Task
POST
Vcenter V Storage Object Manager Unregister Disk Task
POST
Vcenter V Storage Object Manager Update V Storage Infrastructure Object Policy Task
POST
Vcenter V Storage Object Manager Update V Storage Object Crypto Task
POST
Vcenter V Storage Object Manager V Center Update V Storage Object Metadata Ex Task
POST
Vcenter V Storage Object Manager Update V Storage Object Policy Task