All Products
Search
Document Center

Apsara File Storage NAS:CreateAutoSnapshotPolicy

Last Updated:Mar 14, 2024

Creates an automatic snapshot policy.

Operation description

  • The snapshot feature is in public preview and is provided free of charge. Apsara File Storage NAS Service Level Agreement (SLA) is not guaranteed in public preview.
  • Only advanced Extreme NAS file systems support this 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RepeatWeekdaysstringYes

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
TimePointsstringYes

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
RetentionDaysintegerNo

The retention period of auto snapshots.

Unit: days.

Valid values:

  • -1 (default). Auto snapshots are permanently retained. After the number of auto snapshots exceeds the upper limit, the earliest auto snapshot is automatically deleted.
  • 1 to 65536: Auto snapshots are retained for the specified days. After the retention period of auto snapshots expires, the auto snapshots are automatically deleted.
30
AutoSnapshotPolicyNamestringNo

The name of the automatic snapshot policy.

Limits:

  • The name must be 2 to 128 characters in length.
  • The name must start with a letter.
  • The name can contain digits, colons (:), underscores (_), and hyphens (-). It cannot start with http:// or https://.
  • This parameter is empty by default.
FinanceJoshua
FileSystemTypestringYes

The type of the file system.

Valid value: extreme, which indicates Extreme NAS file systems.

extreme

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
AutoSnapshotPolicyIdstring

The ID of the automatic snapshot policy.

sp-extreme-233e6****

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "AutoSnapshotPolicyId": "sp-extreme-233e6****"
}

Error codes

For a list of error codes, visit the Service error codes.