All Products
Search
Document Center

Cloud Backup:DescribeBackupPlans

Last Updated:Dec 20, 2024

Queries the information about one or more backup plans that meet the specified conditions.

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:DescribeBackupPlansget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The page number. Pages start from page 1. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 99. Default value: 10.

10
SourceTypestringYes

The type of the data source. Valid values:

  • ECS_FILE: Elastic Compute Service (ECS) files
  • OSS: Object Storage Service (OSS) buckets
  • NAS: Apsara File Storage NAS file systems
  • OTS: Tablestore instances
  • UDM_ECS: ECS instances
ECS_FILE
Filtersarray<object>No

The filter.

objectNo
KeystringNo

The keys in the filter. Valid values:

  • regionId: the ID of a region
  • planId: the ID of a backup plan
  • sourceType: the type of a data source
  • vaultId: the ID of a backup vault
  • instanceName: the name of an instance
  • instanceId: the ID of an instance
  • planName: the name of a backup plan
vaultId
ValuesarrayNo

The values that you want to match in the filter.

stringNo

The value that you want to match in the filter.

v-*********************

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
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
PageNumberinteger

The page number of the returned page. Pages start from page 1. Default value: 1.

1
PageSizeinteger

The number of entries returned on each page. Valid values: 1 to 99. Default value: 10.

10
TotalCountlong

The total number of returned backup plans that meet the specified conditions.

8
BackupPlansarray<object>

The queried backup plans.

BackupPlanobject
VaultIdstring

The ID of the backup vault.

v-*********************
BackupTypestring

The backup type. Valid value: COMPLETE, which indicates full backup.

COMPLETE
CreateTimelong

This parameter is valid only when SourceType is set to NAS. This parameter indicates the time when the file system was created. This value is a UNIX timestamp. Unit: seconds.

1554347313
DataSourceIdstring

The ID of the data source.

ds-000ht6o9*****w61
SourceTypestring

The type of the data source. Valid values:

  • ECS_FILE: ECS files
  • OSS: OSS buckets
  • NAS: NAS file systems
  • OTS: Tablestore instances
  • UDM_ECS: ECS instances
ECS_FILE
Disabledboolean

Indicates whether the backup plan is disabled. Valid values:

  • true: The backup plan is disabled.
  • false: The backup plan is enabled.
false
Prefixstring

This parameter is valid only when SourceType is set to OSS. This parameter indicates the prefix of the objects that are backed up.

oss-prefix
Optionsstring

This parameter is valid only when SourceType is set to ECS_FILE. This parameter indicates whether Windows Volume Shadow Copy Service (VSS) is used to define a source path.

{"UseVSS":false}
ClientIdstring

The ID of the backup client.

c-000ge4w*****1qb
Excludestring

This parameter is valid only when SourceType is set to ECS_FILE. This parameter indicates the paths to the files that are excluded from the backup job.

["/var", "/proc"]
Retentionlong

The retention period of the backup data. Unit: days.

7
CreatedTimelong

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

1554347313
ClusterIdstring

The ID of the client group.

cl-000ht6o9******h
Bucketstring

This parameter is valid only when SourceType is set to OSS. This parameter indicates the name of the OSS bucket.

hbr-backup-oss
Detailstring

The details about ECS instance backup.

{\"doCopy\":true,\"doBackup\":false,\"instanceName\":\"instance example\",\"appConsistent\":false,\"destinationRegionId\":\"cn-shanghai\",\"enableFsFreeze\":true,\"osNameEn\":\"Windows Server 2019 Data Center Edition 64bit Chinese Edition\",\"osName\":\"Windows Server 2019 Data Center Edition 64bit Chinese Edition\",\"diskIdList\":[],\"backupVaultId\":\"\",\"snapshotGroup\":true,\"destinationRetention\":35,\"platform\":\"Windows Server 2012\",\"timeoutInSeconds\":60,\"backupRetention\":1,\"osType\":\"windows\",\"preScriptPath\":\"\",\"postScriptPath\":\"\",\"enableWriters\":true,\"ecsDeleted\":false}
Schedulestring

The backup policy. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified by {startTime} and the subsequent backup jobs at an interval that is specified by {interval}. 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|1602673264|P1D
SpeedLimitstring

This parameter is valid only when SourceType is set to ECS_FILE. This parameter indicates the throttling rules. Format: {start}|{end}|{bandwidth}. Multiple throttling rules are separated with vertical bars (|). A time range cannot overlap with another one.

  • start: the start hour.
  • end: the end hour.
  • bandwidth: the bandwidth. Unit: KB.
0:24:5120
InstanceIdstring

This parameter is valid only when SourceType is set to ECS_FILE. This parameter indicates the ID of the ECS instance.

i-*********************
PlanIdstring

The ID of the backup plan.

plan-*********************
BackupSourceGroupIdstring

The ID of the data source group.

System-Database
FileSystemIdstring

This parameter is valid only when SourceType is set to NAS. This parameter indicates the ID of the NAS file system.

00594
OtsDetailobject

The details about the Tablestore instance.

TableNamesarray

The names of the tables in the Tablestore instance.

TableNamestring

The name of the destination table in the Tablestore instance.

test2_HBR_RESTORED
InstanceNamestring

The name of the Tablestore instance.

instancename
UpdatedTimelong

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

1554347313
PlanNamestring

The name of the backup plan.

planname
Includestring

This parameter is valid only when SourceType is set to ECS_FILE. This parameter indicates the paths to the files that are backed up.

["/home/alice/*.pdf", "/home/bob/*.txt"]
Rulesarray<object>

The backup policies. This parameter is valid only for disk backup.

Ruleobject
DestinationRetentionlong

The retention period of the backup data in remote backup mode. Unit: days.

90
Schedulestring

The backup policy. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified by {startTime} and the subsequent backup jobs at an interval that is specified by {interval}. 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|1631685600|P1D
Retentionlong

The retention period of the backup data. Unit: days.

90
Disabledboolean

Indicates whether the policy is disabled.

true
DoCopyboolean

Indicates whether the snapshot data is backed up to the backup vault.

false
DestinationRegionIdstring

The ID of the region in which the remote backup vault resides.

cn-shanghai
RuleIdstring

The policy ID.

rule-0008i52rf0ulpni6kn6m
RuleNamestring

The policy name.

Disk Golden Rule
BackupTypestring

The backup type. Valid value: COMPLETE, which indicates full backup.

COMPLETE
Resourcesarray<object>

The backup resources. This parameter is valid only for disk backup.

Resourceobject
SourceTypestring

The type of the data source. Valid value: UDM_DISK.

UDMDISK
ResourceIdstring

The ID of the data source.

d-j6cgioir6m******lu4
Extrastring

Additional information about the data source.

{\"doBackup\":false,\"diskName\":\"data_disk\",\"size\":100,\"type\":\"data\",\"category\":\"cloud_essd\",\"imageId\":\"\",\"device\":\"/dev/xvdb\",\"encrypted\":false}
Pathsarray

The source paths. This parameter is valid only when SourceType is set to ECS_FILE.

Pathstring

The source path.

["/home"]
TrialInfoobject

The free trial information.

TrialStartTimelong

The start time of the free trial.

1579413159
TrialVaultReleaseTimelong

The time when the free-trial backup vault is released.

1594965600
TrialExpireTimelong

The expiration time of the free trial.

1584597600
KeepAfterTrialExpirationboolean

Indicates whether you are billed based on the pay-as-you-go method after the free trial ends.

true
InstanceGroupIdstring

The ID of the instance group.

i-**
CrossAccountTypestring

Indicates whether data is backed up within the same Alibaba Cloud account or across Alibaba Cloud accounts. Valid values:

  • SELF_ACCOUNT
  • CROSS_ACCOUNT
CROSS_ACCOUNT
CrossAccountUserIdlong

The ID of the source Alibaba Cloud account that authorizes the current Alibaba Cloud account to back up data across Alibaba Cloud accounts.

1841642xxxxx9795
CrossAccountRoleNamestring

The name of the Resource Access Management (RAM) role that is created within the source Alibaba Cloud account and assigned to the current Alibaba Cloud account to authorize the current Alibaba Cloud account to back up data across Alibaba Cloud accounts.

BackupRole
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.
0
DestSourceTypestring

The data source type at the destination. This parameter is returned only for data synchronization.

OSS
DestDataSourceIdstring

The data source ID at the destination. This parameter is returned only for data synchronization.

ds-*********************
DestDataSourceDetailstring

The data source details at the destination. This parameter is returned only for data synchronization.

{\"prefix\":\"/\"}
ChangeListPathstring

The configurations of the incremental file synchronization. This parameter is returned only for data synchronization.

{"dataSourceId": "ds-123456789", "path": "/changelist"}
LatestExecuteJobIdstring

The latest execution job id of plan.

job-12345678
CreatedByTagboolean

Whether to automatically create through tags.

HitTagsarray<object>

Hit tag rule.

HitTagobject

Hit tag rule.

Keystring

Tag key.

type
Valuestring

Tag value.

0
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

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 8,
  "BackupPlans": {
    "BackupPlan": [
      {
        "VaultId": "v-*********************",
        "BackupType": "COMPLETE",
        "CreateTime": 1554347313,
        "DataSourceId": "ds-000ht6o9*****w61",
        "SourceType": "ECS_FILE",
        "Disabled": false,
        "Prefix": "oss-prefix",
        "Options": "{\"UseVSS\":false}",
        "ClientId": "c-000ge4w*****1qb",
        "Exclude": "[\"/var\", \"/proc\"]\t",
        "Retention": 7,
        "CreatedTime": 1554347313,
        "ClusterId": "cl-000ht6o9******h",
        "Bucket": "hbr-backup-oss",
        "Detail": "{\\\"doCopy\\\":true,\\\"doBackup\\\":false,\\\"instanceName\\\":\\\"instance example\\\",\\\"appConsistent\\\":false,\\\"destinationRegionId\\\":\\\"cn-shanghai\\\",\\\"enableFsFreeze\\\":true,\\\"osNameEn\\\":\\\"Windows Server  2019 Data Center Edition 64bit Chinese Edition\\\",\\\"osName\\\":\\\"Windows Server  2019 Data Center Edition 64bit Chinese Edition\\\",\\\"diskIdList\\\":[],\\\"backupVaultId\\\":\\\"\\\",\\\"snapshotGroup\\\":true,\\\"destinationRetention\\\":35,\\\"platform\\\":\\\"Windows Server 2012\\\",\\\"timeoutInSeconds\\\":60,\\\"backupRetention\\\":1,\\\"osType\\\":\\\"windows\\\",\\\"preScriptPath\\\":\\\"\\\",\\\"postScriptPath\\\":\\\"\\\",\\\"enableWriters\\\":true,\\\"ecsDeleted\\\":false}",
        "Schedule": "I|1602673264|P1D",
        "SpeedLimit": "0:24:5120",
        "InstanceId": "i-*********************",
        "PlanId": "plan-*********************",
        "BackupSourceGroupId": "System-Database",
        "FileSystemId": "00594",
        "OtsDetail": {
          "TableNames": {
            "TableName": [
              "test2_HBR_RESTORED"
            ]
          }
        },
        "InstanceName": "instancename",
        "UpdatedTime": 1554347313,
        "PlanName": "planname",
        "Include": "[\"/home/alice/*.pdf\", \"/home/bob/*.txt\"]",
        "Rules": {
          "Rule": [
            {
              "DestinationRetention": 90,
              "Schedule": "I|1631685600|P1D",
              "Retention": 90,
              "Disabled": true,
              "DoCopy": false,
              "DestinationRegionId": "cn-shanghai",
              "RuleId": "rule-0008i52rf0ulpni6kn6m",
              "RuleName": "Disk Golden Rule",
              "BackupType": "COMPLETE"
            }
          ]
        },
        "Resources": {
          "Resource": [
            {
              "SourceType": "UDMDISK",
              "ResourceId": "d-j6cgioir6m******lu4",
              "Extra": "{\\\"doBackup\\\":false,\\\"diskName\\\":\\\"data_disk\\\",\\\"size\\\":100,\\\"type\\\":\\\"data\\\",\\\"category\\\":\\\"cloud_essd\\\",\\\"imageId\\\":\\\"\\\",\\\"device\\\":\\\"/dev/xvdb\\\",\\\"encrypted\\\":false}"
            }
          ]
        },
        "Paths": {
          "Path": [
            "[\"/home\"]"
          ]
        },
        "TrialInfo": {
          "TrialStartTime": 1579413159,
          "TrialVaultReleaseTime": 1594965600,
          "TrialExpireTime": 1584597600,
          "KeepAfterTrialExpiration": true
        },
        "InstanceGroupId": "i-**",
        "CrossAccountType": "CROSS_ACCOUNT",
        "CrossAccountUserId": 0,
        "CrossAccountRoleName": "BackupRole",
        "KeepLatestSnapshots": 0,
        "DestSourceType": "OSS",
        "DestDataSourceId": "ds-*********************",
        "DestDataSourceDetail": "{\\\"prefix\\\":\\\"/\\\"}",
        "ChangeListPath": "{\"dataSourceId\": \"ds-123456789\", \"path\": \"/changelist\"}",
        "LatestExecuteJobId": "job-12345678",
        "CreatedByTag": true,
        "HitTags": {
          "HitTag": [
            {
              "Key": "type",
              "Value": "0",
              "Operator": "EQUAL"
            }
          ]
        }
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-12-10The response structure of the API has changedView Change Details
2023-09-21The response structure of the API has changedView Change Details
2023-09-08The request parameters of the API has changedView Change Details
2023-07-31The request parameters of the API has changed. The response structure of the API has changedView Change Details
2022-02-21The response structure of the API has changedView Change Details