Configuring the Automatic Snapshot Creation Policy
Function
This API is used to configure automatic snapshot creation. By default, a snapshot is created every day.
URI
POST /v1.0/{project_id}/clusters/{cluster_id}/index_snapshot/policy
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
cluster_id |
Yes |
String |
ID of the cluster for which you want to create snapshots automatically. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
prefix |
Yes |
String |
Prefix of a snapshot that is automatically created, which is manually entered. Enter up to 32 characters and start with a lowercase letter. Lowercase letters, digits, hyphens (-), and underscores (_) are allowed. |
period |
Yes |
String |
Time when a snapshot is created every day. Snapshots can only be created on the hour. The time format is the time followed by the time zone, specifically, HH:mm z. In the format, HH:mm refers to the hour time and z refers to the time zone. For example, 00:00 GMT+08:00 and 01:00 GMT+08:00. |
keepday |
Yes |
Integer |
Snapshot retention period. The value ranges from 1 to 90. Expired snapshots will be automatically deleted on the half hour. |
enable |
Yes |
String |
Whether to enable the automatic snapshot creation policy.
|
deleteAuto |
No |
String |
Whether to clear all the automatically created snapshots when the automatic snapshot creation policy is disabled. The default value is false, indicating that automatically created snapshots will not be deleted. If this parameter is set to true, all created snapshots will be deleted when the automatic snapshot creation policy is disabled. |
Response Parameters
None
Example Requests
{ "prefix" : "snapshot", "period" : "16:00 GMT+08:00", "keepday" : 7, "enable" : "true", "deleteAuto" : "false" }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
406 |
The server could not fulfill the request according to the content characteristics of the 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