All Products
Search
Document Center

File Storage NAS:CreateAutoSnapshotPolicy

Last Updated:Nov 07, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
nas:CreateAutoSnapshotPolicycreate
  • All Resources
    *
    none
none

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.

Change history

Change timeSummary of changesOperation
2024-09-05The internal configuration of the API is changed, but the call is not affectedView Change Details