All Products
Search
Document Center

Cloud Backup:DescribePoliciesV2

Last Updated:Dec 20, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Queries one or more backup policies.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
hbr:DescribePoliciesV2list
*All Resources
*
    none
none

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

Policiesarray<object>

The backup policies.

Policyobject

The details of the backup policy.

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.
Rulesarray<object>

The rules in the backup policy.

Ruleobject

The details of the rule.

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
RetentionRulesarray<object>

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

RetentionRuleobject

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
DataSourceFiltersarray<object>

This parameter is required only when RuleType is set to TAG. It defines the data source filtering rule.

DataSourceFilterobject
SourceTypestring

Data source type. The value range is as follows:

  • UDM_ECS: Indicates ECS server backup.
  • OSS: Indicates OSS backup.
  • NAS: Indicates Alibaba Cloud NAS backup.
  • ECS_FILE: Indicates ECS file backup.
  • OTS: Indicates Tablestore backup.
UDM_ECS
DataSourceIdsarray

Deprecated.

DataSourceIdstring

Deprecated.

Deprecated.
TagFiltersarray<object>

This parameter is required only when RuleType is set to TAG. It defines the resource tag filtering rule.

TagFilterobject
Keystring

Tag key

env
Valuestring

Tag value.

prod
Operatorstring

Tag matching rules, supporting: - EQUAL: Matches both the tag key and tag value. - NOT: Matches the tag key but not the tag value.

EQUAL
Immutableboolean

This parameter is returned only if the PolicyType is UDM_ECS_ONLY. This parameter indicates whether the immutable backup feature is enabled.

true
PolicyBindingCountlong

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

5
PolicyTypestring

The policy type. Valid values:

  • STANDARD: the general backup policy. This type of policy applies to backups other than Elastic Compute Service (ECS) instance backup.
  • UDM_ECS_ONLY: the ECS instance backup policy. This type of policy applies only to ECS instance backup.
STANDARD
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,
          "DataSourceFilters": [
            {
              "SourceType": "UDM_ECS",
              "DataSourceIds": [
                "Deprecated.\n"
              ]
            }
          ],
          "TagFilters": [
            {
              "Key": "env",
              "Value": "prod",
              "Operator": "EQUAL"
            }
          ],
          "Immutable": true
        }
      ],
      "PolicyBindingCount": 5,
      "PolicyType": "STANDARD"
    }
  ],
  "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
2024-11-13The response structure of the API has changedView Change Details
2024-09-25The response structure of the API has changedView Change Details
2024-07-23The response structure of the API has changedView Change Details