Skip to main content

CreateAutoSnapshotPolicy

Description

call CreateAutoSnapshotPolicy to create an automatic snapshot policy.

Request Method

POST

Request Path

/apsara/route/Ecs/CreateAutoSnapshotPolicy

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
repeatWeekdaysBODYstringYes["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 (,).
regionIdBODYstringYesNo sample value for this parameter.region id
retentionDaysBODYintegerYes30The retention time of automatic snapshots, in days. Value range: -1: permanently saved. 1~65535: specify the number of days to save. default value:-1.
autoSnapshotPolicyNameBODYstringNotest-autoSnapshotPolicyNamethe 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.
versionBODYstringNo2016-01-01version of api
timePointsBODYstringYes["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

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}