All Products
Search
Document Center

Cloud Backup:DescribePoliciesV2

Last Updated:May 10, 2024

Queries one or more backup policies.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NextTokenstringNo

The token that is used to obtain the next page of backup policies.

caeba0bbb2be03f84eb48b699f0a
MaxResultsintegerNo

The number of results for each query.

Valid values: 10 to 100. Default value: 10.

10
PolicyIdstringNo

The ID of the backup policy.

po-000************2l6

Response parameters

ParameterTypeDescriptionExample
object

DescribePoliciesResponse

Policiesobject []

The backup policies.

CreatedTimelong

The time when the backup policy was created. The value is a UNIX timestamp. Unit: seconds.

1650248136
UpdatedTimelong

The time when the backup policy was updated. The value is a UNIX timestamp. Unit: seconds.

1662080404
PolicyIdstring

The ID of the backup policy.

po-000************bkz
PolicyNamestring

The name of the backup policy.

Daily Local Backup + Remote Backup
PolicyDescriptionstring

The description of the backup policy.

Data is backed up at 10:00:00 every day and replicated to the China (Shanghai) region for geo-redundancy.
Rulesobject []

The rules in the backup policy.

RuleIdstring

The rule ID.

rule-000************f1e
RuleTypestring

The type of the rule. Each backup policy must have at least one rule of the BACKUP type and only one rule of the TRANSITION type. Valid values:

  • BACKUP: backup rule
  • TRANSITION: lifecycle rule
  • REPLICATION: replication rule
BACKUP
Schedulestring

This parameter is returned only if the value of the RuleType parameter is BACKUP. This parameter indicates the backup schedule settings. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is completed. For example, I|1631685600|P1D indicates that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day.

  • startTime: the time at which the system starts to run a backup job. The time follows the UNIX time format. Unit: seconds.
  • interval: the interval at which the system runs a backup job. The interval follows the ISO 8601 standard. For example, PT1H indicates an interval of 1 hour. P1D indicates an interval of one day.
I|1648647166|P1D
BackupTypestring

This parameter is returned only if the value of the RuleType parameter is BACKUP. This parameter indicates the backup type. Valid value: COMPLETE, which indicates full backup.

COMPLETE
VaultIdstring

This parameter is returned only if the value of the RuleType parameter is BACKUP. The ID of the backup vault.

v-000**************kgm
ReplicationRegionIdstring

This parameter is returned only if the value of the RuleType parameter is REPLICATION. This parameter indicates the ID of the destination region.

cn-shanghai
Retentionlong

This parameter is returned only if the value of the RuleType parameter is TRANSITION or REPLICATION.

  • If the value of the RuleType parameter is TRANSITION, this parameter indicates the retention period of the backup data. Minimum value: 1. Unit: days.
  • If the value of the RuleType parameter is REPLICATION, this parameter indicates the retention period of remote backups. Minimum value: 1. Unit: days.
7
RetentionRulesobject []

This parameter is returned only if the value of the RuleType parameter is TRANSITION. This parameter indicates the special retention rules.

AdvancedRetentionTypestring

The type of the special retention rule. Valid values:

  • WEEKLY: weekly backups
  • MONTHLY: monthly backups
  • YEARLY: yearly backups
YEARLY
WhichSnapshotlong

Indicates which backup is retained based on the special retention rule. Only the first backup can be retained.

1
Retentionlong

The special retention period of backups. Minimum value: 1. Unit: days.

730
ArchiveDayslong

This parameter is returned only if the value of the RuleType parameter is TRANSITION. This parameter indicates the time when data is dumped from a backup vault to an archive vault. Unit: days.

30
KeepLatestSnapshotslong

Indicates whether the feature of keeping at least one backup version is enabled. Valid values:

  • 0: The feature is disabled.
  • 1: The feature is enabled.
1
PolicyBindingCountlong

The number of data sources that are bound to the backup policy.

5
NextTokenstring

The token that is used to obtain the next page of backup policies.

caeba0bbb2be03f84eb48b699f0a
MaxResultsinteger

The number of results for each query.

Valid values: 10 to 100. Default value: 10.

10
TotalCountlong

The total number of returned entries.

12
Successboolean

Indicates whether the call is successful. Valid values:

  • true: The call is successful.
  • false: The call fails.
true
Codestring

The HTTP status code. The status code 200 indicates that the call is successful.

200
Messagestring

The message that is returned. If the call is successful, "successful" is returned. If the call fails, an error message is returned.

successful
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Sample success responses

JSONformat

{
  "Policies": [
    {
      "CreatedTime": 1650248136,
      "UpdatedTime": 1662080404,
      "PolicyId": "po-000************bkz",
      "PolicyName": "Daily Local Backup + Remote Backup\n",
      "PolicyDescription": "Data is backed up at 10:00:00 every day and replicated to the China (Shanghai) region for geo-redundancy.\n",
      "Rules": [
        {
          "RuleId": "rule-000************f1e",
          "RuleType": "BACKUP",
          "Schedule": "I|1648647166|P1D",
          "BackupType": "COMPLETE",
          "VaultId": "v-000**************kgm",
          "ReplicationRegionId": "cn-shanghai",
          "Retention": 7,
          "RetentionRules": [
            {
              "AdvancedRetentionType": "YEARLY",
              "WhichSnapshot": 1,
              "Retention": 730
            }
          ],
          "ArchiveDays": 30,
          "KeepLatestSnapshots": 1
        }
      ],
      "PolicyBindingCount": 5
    }
  ],
  "NextToken": "caeba0bbb2be03f84eb48b699f0a",
  "MaxResults": 10,
  "TotalCount": 12,
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history