Creating a Snapshot
Function
This API is used to create a standard 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
POST /v5/{project_id}/snapshots
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 |
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 |
CreateStandardSnapshot object |
Definition The request body for creating a standard snapshot. Constraints N/A Range N/A Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
volume_id |
No |
String |
The disk ID. |
name |
No |
String |
Definition The snapshot name. You can obtain it on the snapshot list page of the EVS console. Constraints N/A Range It can contain a maximum of 64 characters. 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 |
tags |
No |
Map<String,String> |
The snapshot tags. |
enterprise_project_id |
No |
String |
The ID of the enterprise project that the snapshot has been added to. |
instant_access |
No |
Boolean |
Whether to enable Instant Snapshot Restore. The default value is false, indicating not enable the function. |
incremental |
No |
Boolean |
Whether to create the incremental snapshot. |
Response Parameters
Status code: 202
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
The task ID. |
snapshot_id |
String |
The snapshot ID. |
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
POST https://{endpoint}/v5/{project_id}/snapshots { "snapshot" : { "volume_id" : "2c194dde-7de5-4529-a141-49f48181f411", "name" : "test_name", "description" : "test description", "enterprise_project_id" : "94f1ea84-1428-49b6-9920-8a9b8a29e4ca" } }
Example Responses
Status code: 202
Accepted
{ "job_id" : "ee62a0c1e79c4e11be5adc17a49f69ef", "snapshot_id" : "bb02c803-55ac-4e84-9c80-60d352199d7d" }
Status code: 400
Bad Request
{ "error" : { "message" : "XXXX", "code" : "EVS.XXX" } }
Status Codes
Status Code |
Description |
---|---|
202 |
Accepted |
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