Last updated: 2020-09-10 18:02:23

1. API Description

Domain name for API request:

This API (ModifyAutoSnapshotPolicyAttribute) is used to modify the attributes of an automatic snapshot policy.

  • You can use this API to modify the attributes of a scheduled snapshot policy, including the execution policy, name, and activation.
  • When modifying the number of days for retention, you must ensure that there is no clash with the permanent retention attribute. Otherwise, the entire operation will fail and a specific error code will be returned.

A maximum of 20 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example:

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: ModifyAutoSnapshotPolicyAttribute.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
AutoSnapshotPolicyId Yes String Scheduled snapshot policy ID.
Policy.N No Array of Policy The policy for executing the scheduled snapshot.
AutoSnapshotPolicyName No String The name of the scheduled snapshot policy to be created. If it is left empty, the default is 'Not named'. The maximum length cannot exceed 60 bytes.
IsActivated No Boolean Whether or not the scheduled snapshot policy is activated. FALSE: Not activated. TRUE: Activated. The default value is TRUE.
IsPermanent No Boolean Whether the snapshot created by this scheduled snapshot policy is retained permanently. FALSE: Not retained permanently. TRUE: Retained permanently. The default value is FALSE.
RetentionDays No Integer The number of days for which snapshots created by this policy are retained. This parameter cannot clash with IsPermanent, which is, if the scheduled snapshot policy is configured to retain permanently, RetentionDays must be 0.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Modifying Scheduled Snapshot Policy Attributes

The name of the scheduled snapshot policy to be modified is data_disk_auto_snapshot. IsPermanent is set to TRUE. Snapshots created by this scheduled snapshot policy are retained permanently.

Input Example
&<common request parameters>

Output Example

  "Response": {
    "RequestId": "384c1fa8-6973-9623-b6bf-5a1fa9a7ad88"

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.


TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InvalidAccount.InsufficientBalance Insufficient account balance
InvalidAutoSnapshotPolicyId.NotFound AutoSnapshotPolicyId entered does not exist.
InvalidParameter Invalid parameter
MissingParameter Missing parameter. Request does not include the required parameter.
UnsupportedOperation.StateError The resource does not support this operation in this status.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback