Skip to main content
Resource Center/Resource Pool/Volume Operations
POSTVolume OperationsSince 0.6SynchronousAuth Required

CreateVolumeSnapshot

CreateVolumeSnapshot

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Request Inputs

Path Parameters

  • volumeUuidStringRequired

    The volume UUID.

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • nameStringRequired

      The snapshot name.

    • descriptionString

      Optional. The detailed description of the snapshot.

    • resourceUuidString

      Optional. The resource UUID.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoryVolumeSnapshotInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionStringRequired

      The detailed description of the resource.

    • typeStringRequired

      类型。

    • volumeUuidStringRequired

      The volume UUID.

    • treeUuidStringRequired

      树UUID。

    • parentUuidStringRequired

      父级资源UUID。

    • primaryStorageUuidStringRequired

      The primary storage UUID.

    • primaryStorageInstallPathStringRequired

      主存储安装路径。

    • volumeTypeStringRequired

      量类型。

    • formatStringRequired

      数据格式或导出格式。

    • latestBooleanRequired

      最新。

    • sizeLongRequired

      返回记录数。

    • stateStringRequired

      当前状态。

    • statusStringRequired

      状态信息。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • backupStorageRefsListRequired

      See backupStorageRefs.

      • volumeSnapshotUuidStringRequired

        The volume snapshot UUID.

      • backupStorageUuidStringRequired

        The backup storage UUID.

      • installPathStringRequired

        安装路径。

Endpoint

POST/zstack/v1/volumes/{volumeUuid}/volume-snapshots

/zstack/v1/volumes/{volumeUuid}/volume-snapshots

Operation ID

CreateVolumeSnapshot

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/volumes/{volumeUuid}/volume-snapshots' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "ec8f396d8a5d48ce8bd949d469c0be62", "name": "Snapshot-1", "description": "create-snapshot-from-volume", "type": "Hypervisor", "volumeUuid": "e60a0fb0b75743c1b0fcb017e31db043", "treeUuid": "b5cf59580ef443c4b7106cf755e6c572", "parentUuid": "cc0e37297d76486186f0dd2b61ddf4e2", "primaryStorageUuid": "82280d3f2f01482bbcdfee03599bcad5", "primaryStorageInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-e60a0fb0b75743c1b0fcb017e31db043/snapshots/ec8f396d8a5d48ce8bd949d469c0be62.qcow2", "volumeType": "Root", "format": "qcow2", "latest": true, "size": 1.073741824E9, "state": "Enabled", "status": "Ready", "createDate": "Jun 7, 2017 9:20:17 PM", "lastOpDate": "Jun 7, 2017 9:20:17 PM" } }

Change History

This API has no change history records yet.

View all change history