Creates an automatic snapshot policy.
Operation description
- The snapshot feature is in public preview and is provided free of charge. File Storage NAS Service Level Agreement (SLA) is not guaranteed in public preview.
- Only advanced Extreme NAS file systems support the snapshot feature.
- 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 skipped. This occurs if the file system stores a large volume of data. For example, you have scheduled auto snapshots to be created at 09:00:00, 10:00:00, 11:00:00, and 12:00:00 for a file system. The system starts to create an auto snapshot at 09:00:00 and does not complete the process until 10:20:00. The process takes 80 minutes because the file system has a large volume of data. In this case, the system does not create an auto snapshot at 10:00:00, but creates an auto snapshot at 11:00: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
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
nas:CreateAutoSnapshotPolicy | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RepeatWeekdays | string | Yes | The days of a week on which to create automatic snapshots. Cycle: week. Valid values: 1 to 7. The values from 1 to 7 indicate the seven days in a week from Monday to Sunday. If you want to create multiple auto snapshots within 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. | 1,2,3 |
TimePoints | string | Yes | The points in time at which auto snapshots were 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, the value 1 indicates 01:00. If you want to create multiple auto snapshots within 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. | 0,1,…23 |
RetentionDays | integer | No | The retention period of auto 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 value: extreme, which indicates Extreme NAS file systems. | extreme |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"AutoSnapshotPolicyId": "sp-extreme-233e6****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-05 | The internal configuration of the API is changed, but the call is not affected | View Change Details |