Creates an automatic snapshot policy.
Operation description
This feature is in free public preview.
Only Advanced Extreme NAS file systems support this feature.
Each Alibaba Cloud account can create up to 100 automatic snapshot policies in a region.
If a file system contains a large amount of data and the time required to create an automatic snapshot exceeds the interval between two scheduled time points, the next time point is automatically skipped. For example, you set 09:00, 10:00, 11:00, and 12:00 as the automatic snapshot time points. Because the file system contains a large amount of data, the snapshot creation starts at 09:00 and is completed at 10:20, which takes 80 minutes. The system skips the 10:00 time point and creates the next automatic snapshot at 11:00.
Each file system supports up to 128 automatic snapshots. After the snapshot quota is reached, the system automatically deletes the earliest automatic snapshots. Manual snapshots are not affected.
When you modify the retention period of an automatic snapshot policy, the modification takes effect only on new snapshots. Existing snapshots retain their original retention period.
If an automatic snapshot is being created for a file system, you must wait until the automatic snapshot is completed before you can manually create a snapshot.
Automatic snapshot policies cannot be executed on file systems that are not in the Normal state.
Automatic snapshots follow a unified naming format:
auto_yyyyMMdd_X. In this format,autoindicates an automatic snapshot, which distinguishes it from manual snapshots.yyyyMMddindicates the date when the snapshot is created, whereyrepresents the year,Mrepresents the month, anddrepresents the day.Xindicates the sequence number of the automatic snapshot created on that day. For example,auto_20201018_1indicates the first automatic snapshot created on October 18, 2020.A created automatic snapshot policy can be applied to any file system by calling ApplyAutoSnapshotPolicy, and the policy content can be modified by calling ModifyAutoSnapshotPolicy.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:CreateAutoSnapshotPolicy |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RepeatWeekdays |
string |
Yes |
The days of the week on which automatic snapshots are created. Cycle: week. Valid values: 1 to 7, which represent Monday to Sunday. To create automatic snapshots on multiple days in a week, specify multiple values separated by commas (,). You can specify up to 7 values. |
1,2,3 |
| TimePoints |
string |
Yes |
The time points at which automatic snapshots are created. Unit: hours. Valid values: 0 to 23, which represent the 24 time points from 00:00 to 23:00. For example, 1 indicates 01:00. To create multiple automatic snapshots within a day, specify multiple time points separated by commas (,). You can specify up to 24 time points. |
0,1,…,23 |
| RetentionDays |
integer |
No |
The retention period of automatic snapshots. Unit: days. Valid values:
|
30 |
| AutoSnapshotPolicyName |
string |
No |
The name of the automatic snapshot policy. Limits:
|
FinanceJoshua |
| FileSystemType |
string |
Yes |
The type of the file system. Valid values: extreme (Extreme NAS file system). Valid values:
|
extreme |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| AutoSnapshotPolicyId |
string |
The ID of the automatic snapshot policy. |
sp-extreme-233e6**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"AutoSnapshotPolicyId": "sp-extreme-233e6****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.