All Products
Search
Document Center

Database Backup:DescribeDownloadTask

Last Updated:Apr 26, 2024

Queries the advanced download tasks for an ApsaraDB RDS for MySQL instance, an ApsaraDB RDS for PostgreSQL instance, or a PolarDB for MySQL cluster.

Operation description

Debugging

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

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
dbs:DescribeDownloadTaskRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionCodestringYes

The ID of the region in which the instance resides. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance.

cn-hangzhou
InstanceNamestringNo

The ID of the instance.

Note This parameter is required.
rm-bp1imnmcjxdz7****
DatasourceIdstringNo

The ID of the Database Backup (DBS) data source. Specify the parameter in the format of ds-${Instance ID}_${regionId}.

ds-rm-2ze8g2am97624****_cn-hangzhou
BackupSetIdstringNo

The ID of the backup set generated when you create a download task. You can call the DescribeBackups operation to query the ID.

216****
StatestringNo

The state of the download task. Valid values:

  • Initializing: The download task is being initialized.
  • queueing: The download task is queuing.
  • running: The download task is running.
  • failed: The download task fails.
  • finished: The download task is complete.
  • expired: The download task expires.
queueing
TaskTypestringNo

The type of the download task. Valid values:

  • full: downloads a full backup set.
  • pitr: downloads a backup set at a specific point in time.
full
StartTimestringNo

The beginning of the time range to query. Specify this parameter as a timestamp of the LONG type. Unit: milliseconds.

1661941554000
EndTimestringNo

The end of the time range to query. Specify this parameter as a timestamp of the LONG type. Unit: milliseconds.

1661941556000
PageSizestringNo

The number of entries to return on each page.

50
CurrentPagestringNo

The page number of the page to return.

1
OrderDirectstringNo

The order in which you want to sort the entries. Valid values:

  • asc: the ascending order.
  • desc: the descending order. This is the default value.
desc
OrderColumnstringNo

The column based on which the entries are sorted. By default, the entries are sorted by the time when the download task was created. Set the value to gmt_create.

gmt_create

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

5D285EB9-A443-592D-9F3D-A888FAC3****
ErrCodestring

The error code returned if the request fails.

DBS.InternalError
Successstring

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
ErrMessagestring

The error message returned if the request fails.

instanceName can not be empty
Codestring

The error code returned if the request fails.

DBS.InternalError
Messagestring

The error message returned if the request fails.

instanceName can not be empty
Dataobject

The details of the tasks.

PageNumberlong

The page number of the returned page. The value must be an integer that is greater than 0. Default value: 1.

1
TotalPageslong

The total number of returned pages.

2
Extrastring

The extra description of the download tasks.

dbtest
TotalElementslong

The total number of full backup tasks.

1
PageSizelong

The number of entries returned per page.

10
Contentobject []

The details of the task.

TaskIdstring

The download task ID.

dt-qxntlvgu****
RegionCodestring

The ID of the region in which the instance resides.

cn-hangzhou
Formatstring

The format to which the downloaded backup set is converted. Valid values:

  • csv
  • SQL
  • Parquet
csv
DbListstring

The details of the databases.

[dbtest]
BakSetIdstring

The ID of the full backup set.

148261****
DownloadStatusstring

The status of the download task. Valid values:

  • Initializing: The download task is being initialized.
  • queuing: The download task is queuing.
  • running: The download task is running.
  • failed: The download task fails.
  • finished: The download task is complete.
  • expired: The download task expires.
queueing
ExportDataSizestring

The amount of output data. Unit: bytes.

0
ImportDataSizestring

The amount of data that is processed. Unit: bytes.

0
BackupSetTimestring

The point in time of the backup set if the task is used to download a backup set at a specific point in time. The value is a timestamp of the LONG type. Unit: millisecond.

1663162216000
TargetTypestring

The type of the method in which the backup set is downloaded. Valid values:

  • OSS
  • URL
URL
TargetPathstring

The destination path to which the data is downloaded if the value of TargetType is OSS.

test_db/path
Progressstring

The number of tables that have been downloaded and the total number of tables to be downloaded.

0/0
GmtCreatestring

The time when the download task was created. The value is a timestamp.

1663321957000

Examples

Sample success responses

JSONformat

{
  "RequestId": "5D285EB9-A443-592D-9F3D-A888FAC3****",
  "ErrCode": "DBS.InternalError",
  "Success": "true",
  "ErrMessage": "instanceName can not be empty",
  "Code": "DBS.InternalError",
  "Message": "instanceName can not be empty",
  "Data": {
    "PageNumber": 1,
    "TotalPages": 2,
    "Extra": "dbtest",
    "TotalElements": 1,
    "PageSize": 10,
    "Content": {
      "List": [
        {
          "TaskId": "dt-qxntlvgu****",
          "RegionCode": "cn-hangzhou",
          "Format": "csv",
          "DbList": "[dbtest]",
          "BakSetId": "148261****",
          "DownloadStatus": "queueing",
          "ExportDataSize": "0",
          "ImportDataSize": "0",
          "BackupSetTime": "1663162216000",
          "TargetType": "URL",
          "TargetPath": "test_db/path",
          "Progress": "0/0",
          "GmtCreate": "1663321957000"
        }
      ]
    }
  }
}

Error codes

HTTP status codeError codeError message
403Request.ForbiddenHave no Permissions

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

Change history

Change timeSummary of changesOperation
2022-11-16The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.