Update automatic snapshot policy
Updated at:2025-10-20
This API allows modifications to an automatic snapshot policy, including the policy name, creation time, recurrence days, and retention time.
Request structure
Plain Text
1PUT /v{version}/asp/update?clientToken={clientToken} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "name":name,
6 "timePoints":timePoints,
7 "repeatWeekdays":repeatWeekdays,
8 "retentionDays":retentionDays,
9 "aspId":aspId
10}
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number |
| name | String | Yes | RequestBody | The name of an automatic snapshot policy can include uppercase and lowercase letters, numbers, Chinese characters, and special characters (-_/). It must start with a letter and have a length of 1-65 characters. |
| timePoints | List |
Yes | RequestBody | Specify the time points for daily snapshots, with values ranging from 0 to 23. |
| repeatWeekdays | List |
Yes | RequestBody | Specify the days of the week for snapshots, with values ranging from 0 to 6. |
| retentionDays | String | Yes | RequestBody | Specify the number of days to retain automatic snapshots. A value of -1 means the snapshots will be retained permanently. |
| aspId | String | Yes | RequestBody | ID of the automatic policy |
Response headers
No special headers are required beyond the standard ones.
Response parameters
There are no special response parameters
Error codes
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| BadRequest | Bad request parameters or illegal request. | 400 | Invalid request parameters |
| Asp.NameInvalid | asp name is invalid. | 400 | Invalid name |
| Asp.RetentionDaysInvalid | RetentionDays should in [1,10000] | 400 | Invalid retention days |
| Asp.TimePointsInvalid | TimePoints should in [0,23] | 400 | Exceptional execution timestamp parameter |
| Asp.RepeatWeekdaysInvalid | RepeatWeekdays should in [1,7] | 400 | Exceptional execution date parameter |
Request example
Plain Text
1PUT /v2/asp/update?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4
5{
6 "name":"asp-num1",
7 "timePoints":["10","20"],
8 "repeatWeekdays":["1","5"],
9 "retentionDays":"7",
10 "aspId":"asp-0yykRGvU"
11}
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Wed, 03 Dec 2014 06:42:19 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
