Modifies an automatic snapshot policy. After you modify an automatic snapshot policy, the newest automatic snapshot policy takes precedence and is applied to all linked file systems.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyAutoSnapshotPolicy

The operation that you want to perform. Set the value to ModifyAutoSnapshotPolicy.

AutoSnapshotPolicyId String Yes sp-extreme-233e6ylv0

The ID of the automatic snapshot policy. You can call the DescribeAutoSnapshotPolicies operation to view available automatic snapshot policies.

AutoSnapshotPolicyName String No FinanceJoshua

The name of the automatic snapshot policy. If you do not want to change the name, you can leave the parameter empty.

RepeatWeekdays String No 1,7

The days when the automatic snapshot policy recurs within a week. Unit: days. Valid values: 1 to 7. For example, 1 indicates Monday. You can specify multiple days from Monday to Sunday.

  • You can specify a maximum of seven days.
  • Separate multiple days with commas (,).
RetentionDays Integer No 30

The retention period of an automatic snapshot. Unit: days. Default value: -1. Valid values:

  • -1: specifies that an automatic snapshot is created for persistent storage.
  • 1-65536: specifies the number of days to retain an automatic snapshot.
TimePoints String No 0,1

The points in time when the automatic snapshot policy recurs. Unit: points in time. Valid values: 0 to 23, representing 24 points in time that range from 00:00 to 23:00. For example, 1 indicates 01:00. If you want to create multiple automatic snapshots a day, you can specify multiple points in time.

  • You can specify a maximum of 24 points in time.
  • Separate multiple points in time with commas (,).

Response parameters

Parameter Type Example Description 
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request. The request ID will be returned regardless of whether the API operation is successful.

Examples

Sample requests

GET https://nas.cn-hangzhou.aliyuncs.com/?Action=ModifyAutoSnapshotPolicy
&AutoSnapshotPolicyId=sp-extreme-6i0brwewjt0gfylh0
&AutoSnapshotPolicyName=xoxo
&<Common request parameters>
...

Sample success responses

JSON format

{
  "RequestId": "12FA778B-C8D3-4D2B-88AD-C10ED0326C57"
}

Error codes

For a list of error codes, visit the API Error Center.