tencent cloud



Last updated: 2022-01-19 10:54:31

1. API Description

Domain name for API request: cbs.tencentcloudapi.com.

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.

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.
This document describes the parameters for Signature V1. It's recommended to use the V3 signature, which provides higher security. Note that for Signature V3, the common parameters need to be placed in the HTTP Header. See details.

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 the attributes of a scheduled snapshot policy

This example shows you how to rename a scheduled snapshot policy to data_disk_auto_snapshot and set the IsPermanent parameter to TRUE to permanently retain the snapshots created.

Input Example

&<Common request parameters>

Output Example

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

5. Developer Resources


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 Incorrect parameter.
MissingParameter Missing parameter.
UnsupportedOperation.StateError The resource does not support this operation in this status.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support