Updating Snapshot Information
Function
This API is used to update information about a snapshot. Standard snapshots are available only in some regions. To check the supported regions, see the region information shown under "EVS Snapshots" in Function Overview.
Calling Method
For details, see Calling APIs.
URI
PUT /v5/{project_id}/snapshots/{snapshot_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition The project ID. Constraints N/A Range For details, see Obtaining a Project ID. Default Value N/A |
snapshot_id |
Yes |
String |
Definition The snapshot ID. You can obtain it on the snapshot list page of the EVS console. Constraints N/A Range N/A Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition The user token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. Constraints N/A Range N/A Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
snapshot |
Yes |
CinderUpdateSnapshotOptionV5 object |
The snapshot to be updated. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Definition The snapshot name. It can contain a maximum of 64 characters. Constraints When a backup is created for a disk, a snapshot will also be created and named with the autobk_snapshot_ prefix. Operations cannot be performed on such snapshots. You are advised not to use autobk_snapshot_ as the prefix of snapshot names to avoid any inconvenience. Range N/A Default Value N/A |
description |
No |
String |
Definition The snapshot description. Constraints N/A Range It can contain a maximum of 85 characters. Default Value N/A |
instant_access |
No |
Boolean |
Definition The Instant Snapshot Restore identifier. Constraints N/A Range
Default Value N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition The snapshot ID. Range N/A |
name |
String |
Definition The snapshot name. Snapshots whose names started with the autobk_snapshot_ prefix are automatically created by the system during backup creation. Such snapshots cannot be deleted or used to roll back data. Range N/A |
description |
String |
Definition The snapshot description. Range N/A |
created_at |
String |
Definition The time when the snapshot was created. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX Range N/A |
updated_at |
String |
The time when the snapshot was updated. |
volume_id |
String |
Definition The ID of the snapshot's source disk. Range N/A |
size |
String |
Definition The snapshot size, in GiB. Range N/A |
status |
String |
Definition The snapshot status. Range For details, see EVS Snapshot Status. |
project_id |
String |
The tenant ID. The tenant ID is the same as the project ID. |
enterprise_project_id |
String |
The ID of the enterprise project to which the snapshot belongs. |
encrypted |
Boolean |
Whether the snapshot is encrypted. |
cmk_id |
String |
The ID of the key used by the snapshot's source disk. |
category |
String |
The snapshot type, which can be standard or flash. |
availability_zone |
String |
The AZ to which the snapshot belongs. |
tags |
Map<String,String> |
The snapshot tags. |
instant_access |
Boolean |
Definition Whether Instant Snapshot Restore is enabled. Range true: enabled. Only SSD-backed disks support this function. false: disabled. Snapshots with Instant Snapshot Restore disabled are standard snapshots. |
retention_at |
String |
The snapshot retention duration. |
instant_access_retention_at |
String |
Definition The retention duration of Instant Snapshot Restore. After the retention duration ends, Instant Snapshot Restore is automatically disabled for snapshots. Range By default, the value of this parameter is the same as that of retention_at. |
incremental |
Boolean |
Whether the snapshot is an incremental snapshot. |
snapshot_type |
String |
Definition The snapshot creation source. Range auto: automatically created user: manually created copy: replicated |
progress |
String |
Definition The snapshot creation progress, in percentage. Range N/A |
encrypt_algorithm |
String |
The snapshot encryption algorithm. |
snapshot_chains |
Array of SnapshotChains objects |
The snapshot chain to which the snapshot belongs. |
snapshot_group_id |
String |
The ID of the snapshot consistency group to which the snapshot belongs. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition The snapshot chain ID. Range N/A |
availability_zone |
String |
Definition The AZ of the disk that the snapshot chain belongs to. Range N/A |
snapshot_count |
Integer |
The number of snapshots on the snapshot chain. |
capacity |
Integer |
Definition The snapshot chain storage usage. Range The value is greater than or equal to 0. |
project_id |
String |
Definition The project ID. Range N/A |
volume_id |
String |
Definition The ID of the disk that the snapshot chain belongs to. Range N/A |
category |
String |
Definition The snapshot chain type. Range N/A |
created_at |
String |
Definition The creation time. Range N/A |
updated_at |
String |
Definition The update time. Range N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Definition The error information returned if an error occurs. Range N/A |
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition The error code returned if an error occurs. Range For details about the error codes and their meanings, see Error Codes. |
message |
String |
Definition The error message returned if an error occurs. Range N/A |
Example Requests
PUT https://{endpoint}/v5/{project_id}/snapshots/{snapshot_id} { "snapshot" : { "name" : "snap-001", "description" : "Daily backup", "instant_access" : false } }
Example Responses
Status code: 200
OK
{ "snapshot": { "id": "308c213b-5e09-478e-a772-c81b20749fea", "status": "available", "project_id": "7c08fb7726964bf5b70a1f55a4cd6017", "size": 1, "name": null, "description": null, "cmk_id": null, "encrypted": false, "created_at": "2023-07-03T08:53:13.373010", "updated_at": "2023-07-03T08:53:13.578010", "volume_id": "66016b8d-b850-4afb-b2a4-d5903e9ffb59", "enterprise_project_id": "0", "category": "flash", "availability_zone": "az2.dc2", "tags": { }, "instant_access": true, "instant_access_retention_at": "2023-07-07T08:53:13.373010", retention_at": "2023-07-07T08: 53: 13.373010" } }
Status code: 400
Bad Request
{ "error" : { "message" : "XXXX", "code" : "EVS.XXX" } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot