Creates an automatic snapshot policy.
Description
- You can create a maximum of 100 automatic snapshot policies in each region for an Alibaba Cloud account.
- If an auto snapshot is being created when the scheduled time for a new auto snapshot arrives, the creation of the new snapshot is canceled. This may occur when the file system stores a large volume of data. For example, you have scheduled auto snapshots to be created at 09:00, 10:00, 11:00, and 12:00 for a file system. The file system starts to create a snapshot at 09:00 and the snapshot is created at 10:20. The process takes 80 minutes because the file system has a large volume of data. In this case, the file system does not create a snapshot at 10:00, but creates a snapshot at 11:00.
- A maximum of 128 auto snapshots can be created for a file system. If the upper limit is reached, the earliest auto snapshot is deleted. This rule does not apply to manual snapshots.
- If you modify the retention period of an automatic snapshot policy, the modification applies only to subsequent snapshots, but not to the existing snapshots.
- If an auto snapshot is being created for a file system, you cannot create a manual snapshot for the file system. You must wait after the auto snapshot is created.
- You can only apply automatic snapshot policies to a file system that is in the Running state.
- All auto snapshots are named in the
auto_yyyyMMdd_X
format, where:auto
indicates that the snapshot is created based on an automatic snapshot policy.yyyyMMdd
indicates the date on which the snapshot is created.y
indicates the year.M
indicates the month.d
indicates the day.X
indicates the ordinal number of the snapshot on the current day. For example,auto_20201018_1
indicates the first auto snapshot that was created on October 18, 2020. - After an automatic snapshot policy is created, you can call the ApplyAutoSnapshotPolicy operation to apply the policy to a file system and call the ModifyAutoSnapshotPolicy operation to modify the policy.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateAutoSnapshotPolicy |
The operation that you want to perform. Set the value to CreateAutoSnapshotPolicy. |
FileSystemType | String | Yes | extreme |
The type of the file system. Valid value: extreme, which indicates Extreme NAS file systems. |
RepeatWeekdays | String | Yes | 1,2,3 |
The day on which an auto snapshot is created. Auto snapshots are created on a weekly basis. Valid values: 1 to 7. The values from 1 to 7 indicate 7 days in a week from Monday to Sunday. If you want to create multiple auto snapshots a week, you can specify multiple days from Monday to Sunday and separate the days with commas (,). You can specify a maximum of seven days. |
TimePoints | String | Yes | 0,1,...,23 |
The point in time at which an auto snapshot is created. Unit: hours. Valid values: 0 to 23. The values from 0 to 23 indicate a total of 24 hours from 00:00 to 23:00. For example, 1 indicates 01:00. If you want to create multiple auto snapshots a day, you can specify multiple points in time and separate the points in time with commas (,). You can specify a maximum of 24 points in time. |
RetentionDays | Integer | No | 30 |
The number of days for which you want to retain auto snapshots. Unit: days. Valid values:
|
AutoSnapshotPolicyName | String | No | FinanceJoshua |
The name of the automatic snapshot policy. Limits:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
AutoSnapshotPolicyId | String | sp-extreme-233e6**** |
The ID of the automatic snapshot policy. |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=CreateAutoSnapshotPolicy
&FileSystemType=extreme
&RepeatWeekdays=1,2,3
&TimePoints=0,1,… 23
&<Common request parameters>
Sample success responses
XML
format
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
<AutoSnapshotPolicyId>sp-extreme-233e6****</AutoSnapshotPolicyId>
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"AutoSnapshotPolicyId": "sp-extreme-233e6****"
}
Error codes
For a list of error codes, visit the API Error Center.