DescribeAutoSnapshotPolicies

Last updated: 2020-06-18 16:08:38

    1. API Description

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

    This API (DescribeAutoSnapshotPolicies) is used to query scheduled snapshot policies.

    • You can query the detailed information of scheduled snapshot policies by ID, name, or status. Insert AND between different values. For details on filtering information, see Filter.
    • If the parameter is empty, a certain number (specified by Limit; the default is 20) of the scheduled snapshot policy lists are returned to the current user.

    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: cbs.ap-shanghai-fsi.tencentcloudapi.com

    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: DescribeAutoSnapshotPolicies.
    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.
    AutoSnapshotPolicyIds.N No Array of String List of scheduled snapshot policy IDs to be queried. The parameter does not support specifying both SnapshotIds and Filters.
    Filters.N No Array of Filter Filter conditions. Specification of both the AutoSnapshotPolicyIds and Filters parameters is not supported.
  • auto-snapshot-policy-id - Array of String - Required or not: No - (Filter condition) Filters according to the scheduled snapshot policy ID. The format of the scheduled snapshot policy ID is as follows: asp-11112222.
  • auto-snapshot-policy-state - Array of String - Required or not: No - (Filter condition) Filters according to the status of the scheduled snapshot policy. The format of the scheduled snapshot policy ID is as follows: asp-11112222. (NORMAL: normal | ISOLATED: isolated)
  • auto-snapshot-policy-name - Array of String - Required or not: No - (Filter condition) Filters according to the name of the scheduled snapshot policy.
  • Limit No Integer Number of results to be returned. Default is 20. Maximum is 100. For more information on Limit, please see relevant sections in API Introduction.
    Offset No Integer Offset. Default is 0. For more information on Offset, please see relevant sections in API Introduction.
    Order No String Outputs the ordering of the scheduled snapshot lists. Value range:
  • ASC: Ascending order
  • DESC: Descending order.
  • OrderField No String The sorting filter applied to the scheduled snapshot list. Value range: <Sort by creation time of scheduled snapshot. By default, this is sorted by creation time.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer The quantity of valid scheduled snapshot policies.
    AutoSnapshotPolicySet Array of AutoSnapshotPolicy List of scheduled snapshot policies.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying Scheduled Snapshot Policies with NORMAL Status

    Input Example

    https://cbs.tencentcloudapi.com/?Action=DescribeAutoSnapshotPolicies
    &Filters.0.Name=auto-snapshot-policy-state
    &Filters.0.Values.0=NORMAL
    &Limit=3
    &Offset=0
    &<common request parameters>

    Output Example

    {
      "Response": {
        "AutoSnapshotPolicySet": [
          {
            "DiskIdSet": [],
            "IsActivated": 1,
            "AutoSnapshotPolicyState": "NORMAL",
            "AutoSnapshotPolicyName": "Snapshot Policy 1",
            "IsPermanent": 0,
            "NextTriggerTime": "2017-12-04 12:00:00",
            "AutoSnapshotPolicyId": "asp-lfp6fi4f",
            "Policy": [
              {
                "DayOfWeek": [
                  1,
                  4
                ],
                "Hour": [
                  12
                ]
              }
            ],
            "CreateTime": "2017-11-01 10:46:22",
            "RetentionDays": 7
          },
          {
            "DiskIdSet": [],
            "IsActivated": 1,
            "AutoSnapshotPolicyState": "NORMAL",
            "AutoSnapshotPolicyName": "Snapshot Policy 2",
            "IsPermanent": 0,
            "NextTriggerTime": "2017-12-03 10:00:00",
            "AutoSnapshotPolicyId": "asp-nqu08k2l",
            "Policy": [
              {
                "DayOfWeek": [
                  0
                ],
                "Hour": [
                  10
                ]
              }
            ],
            "CreateTime": "2017-11-17 15:01:25",
            "RetentionDays": 7
          }
        ],
        "TotalCount": 2,
        "RequestId": "701c8a35-ed66-fc79-3795-5a1fa72cdbf1"
      }
    }

    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.

    SDK

    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
    InvalidFilter The specified Filter is not supported.
    InvalidParameterValue Invalid parameter value. Parameter value format error or parameter value not supported.
    MissingParameter Missing parameter. Request does not include the required parameter.

    Was this page helpful?

    Was this page helpful?

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