Domain name for API request: cbs.intl.tencentcloudapi.com.
This API (ModifyAutoSnapshotPolicyAttribute) is used to modify the attributes of an automatic snapshot policy.
A maximum of 20 requests can be initiated per second for this API.
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 Params. The value used for this API: ModifyAutoSnapshotPolicyAttribute. |
| Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| AutoSnapshotPolicyId | Yes | String | Specifies the scheduled snapshot policy ID. query via the describeautosnapshotpolicies API (https://www.tencentcloud.com/document/product/362/33556?from_cn_redirect=1). |
| IsActivated | No | Boolean | Whether the periodic snapshot policy is activated. false means inactive, true means active. defaults to true. |
| IsPermanent | No | Boolean | Indicates whether snapshots created by the regular snapshot policy are retained permanently. false means the snapshots are not retained permanently, true means permanent retention. defaults to false. |
| 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. |
| Policy.N | No | Array of Policy | The policy for executing the scheduled snapshot. |
| RetentionDays | No | Integer | Number of days to retain the snapshots created according to this scheduled snapshot policy. If this parameter is specified, IsPermanent cannot be specified as TRUE; otherwise, they will conflict with each other. |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to enable an automatic snapshot policy
POST / HTTP/1.1
Host: cbs.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyAutoSnapshotPolicyAttribute
<Common request parameters>
{
"AutoSnapshotPolicyId": "asp-01928374",
"IsActivated": true
}
{
"Response": {
"RequestId": "88a4815c-4a09-4948-b0c9-fa6fdefe8e4a"
}
}
This example shows you how to modify the scheduled snapshot policy named data_disk_auto_snapshot and set IsPermanent to true, so that snapshots created by the regular snapshot policy are retained permanently.
POST / HTTP/1.1
Host: cbs.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyAutoSnapshotPolicyAttribute
<Common request parameters>
{
"AutoSnapshotPolicyId": "asp-nqu08k2l",
"AutoSnapshotPolicyName": "data_disk_auto_snapshot",
"IsPermanent": true
}
{
"Response": {
"RequestId": "384c1fa8-6973-9623-b6bf-5a1fa9a7ad88"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan