CreateAutoSnapshotPolicy
Description
call CreateAutoSnapshotPolicy to create an automatic snapshot policy.
Request Method
POST
Request Path
/apsara/route/Ecs/CreateAutoSnapshotPolicy
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
repeatWeekdays | BODY | string | Yes | ["1","2"] | The repeat date of the automatic snapshot, the unit is days, and the period is week. Value range: 1 to 7, for example, 1 means Monday. when multiple automatic snapshots need to be created within 1 week, multiple points in time can be passed in: can pass in up to 7 time points. multiple points in time are similar in one format ["1", the JSON array of "2"..."7"] is represented, and the time points are separated by half-width commas (,). |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
retentionDays | BODY | integer | Yes | 30 | The retention time of automatic snapshots, in days. Value range: -1: permanently saved. 1~65535: specify the number of days to save. default value:-1. |
autoSnapshotPolicyName | BODY | string | No | test-autoSnapshotPolicyName | the name of the automatic snapshot policy. The length is 2~128 English or Chinese characters. It must start with a letter or Chinese, and cannot start with http:// or https. It can contain numbers, colons (:), underscores (_), or hyphens (-). default value: empty. |
version | BODY | string | No | 2016-01-01 | version of api |
timePoints | BODY | string | Yes | ["0", "1 ",… "23"] | The time when the automatic snapshot is created, in hours. Value range: 0~23, representing 24 time points from 00:00 to 23:00, for example, 1 means 01:00. When you need to create multiple automatic snapshots in one day, you can pass in multiple time points, up to 24 time points. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}