Update Snapshot Group

PUT/zstack/v1/volume-snapshots/group/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateVolumeSnapshotGroup": {
    "name": "new name"
  },
  "systemTags": [],
  "userTags": []
}

The systemTags and userTags fields in the above example are optional. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateVolumeSnapshotGroup":{"name":"new name"}}' http://localhost:8080/zstack/v1/volume-snapshots/group/c39089cddbd836628f346b14beafe2d3/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
name (Optional)Stringbody (Contained in the updateVolumeSnapshotGroup structure)Resource name 3.6.0
description (Optional)Stringbody (Contained in the updateVolumeSnapshotGroup structure)Detailed description of the resource 3.6.0
uuidStringurlThe UUID of the resource. Uniquely identifies the resource 3.6.0
systemTags (Optional)Listbody  3.6.0
userTags (Optional)Listbody  3.6.0

API Response

Response Example

{
  "inventory": {
    "uuid": "a261086918fe3c04be683430f15920a2",
    "snapshotCount": 1.0,
    "name": "group",
    "vmInstanceUuid": "98ac921100b43981b493071b6430bb2b",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM",
    "volumeSnapshotRefs": [
      {
        "volumeSnapshotUuid": "7ac8675cd8a9389ca343a2a7d49c47d7",
        "volumeSnapshotGroupUuid": "a261086918fe3c04be683430f15920a2",
        "deviceId": 0.0,
        "snapshotDeleted": false,
        "volumeUuid": "6fb0e4a0c3d6315bbb5c08a1a33bc231",
        "volumeName": "ROOT-volume",
        "volumeType": "Root",
        "volumeSnapshotInstallPath": "/Cloud_ps/to/path/snap.qcow2",
        "volumeSnapshotName": "group-ROOT-volume",
        "createDate": "Nov 14, 2017 10:20:57 PM",
        "lastOpDate": "Nov 14, 2017 10:20:57 PM"
      }
    ]
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error3.6.0
inventoryVolumeSnapshotGroupInventoryFor details, see inventory3.6.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10013.6.0
descriptionStringA brief description of the error3.6.0
detailsStringThe detailed error information3.6.0
elaborationStringA reserved field. The default value is null3.6.0
opaqueLinkedHashMapA reserved field. The default value is null3.6.0
causeErrorCodeThe root error. The source error that caused the current error. If no root error exists, this field is null3.6.0

inventory

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource3.6.0
snapshotCountIntegerThe number of snapshots in the group3.6.0
nameStringResource name3.6.0
descriptionStringDetailed description of the resource3.6.0
vmInstanceUuidStringVirtual Machine UUID3.6.0
createDateTimestampCreation time3.6.0
lastOpDateTimestampLast modification time3.6.0
volumeSnapshotRefsListFor details, see volumeSnapshotRefs3.6.0

volumeSnapshotRefs

NameTypeDescriptionStarting Version
volumeSnapshotUuidStringDisk snapshot UUID3.6.0
volumeSnapshotGroupUuidStringSnapshot group UUID3.6.0
deviceIdintThe device ID of the disk when the snapshot was taken3.6.0
snapshotDeletedbooleanWhether the snapshot has been deleted3.6.0
volumeUuidStringDisk UUID3.6.0
volumeNameStringDisk name3.6.0
volumeTypeStringDisk type3.6.0
volumeSnapshotInstallPathStringSnapshot install path3.6.0
volumeSnapshotNameStringSnapshot name3.6.0
createDateTimestampCreation time3.6.0
lastOpDateTimestampLast modification time3.6.0

SDK Examples

Java SDK

UpdateVolumeSnapshotGroupAction action = new UpdateVolumeSnapshotGroupAction();
action.name = "new name";
action.uuid = "c39089cddbd836628f346b14beafe2d3";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateVolumeSnapshotGroupAction.Result res = action.call();

Python SDK

UpdateVolumeSnapshotGroupAction action = UpdateVolumeSnapshotGroupAction()
action.name = "new name"
action.uuid = "c39089cddbd836628f346b14beafe2d3"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateVolumeSnapshotGroupAction.Result res = action.call()