调用DescribeDownloadRecords接口查看目标AnalyticDB MySQL版集群中最近5次的SQL查询下载任务列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeDownloadRecords

系统规定参数。取值:DescribeDownloadRecords

DBClusterId String am-****************

集群ID。

说明 您可以调用DescribeDBClusters接口查看目标地域下所有AnalyticDB MySQL集群的详情,包括集群ID。
RegionId String cn-hangzhou

地域ID。

说明 您可以调用DescribeRegions接口查看AnalyticDB MySQL版支持的地域和可用区信息,包括地域ID。
Lang String zh

设置下载文件的文件标题以及部分错误信息的语言,支持如下语言:

  • zh:简体中文(默认语言)。
  • en:英文。
  • ja:日文。
  • zh-tw:繁体中文。

返回数据

名称 类型 示例值 描述
Records Array of Items

下载列表详情。

Status String finished

任务状态,取值为:

  • running:正在下载。
  • finished:已完成。
  • failed:下载失败。
DownloadId Long 69

下载任务ID。

ExceptionMsg String The query result is empty.

下载任务失败时返回的异常信息。

Url String https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164302.xlsx?Expires=1943514161&OSSAccessKeyId=*********&Signature=******"

文件下载地址。

FileName String 20210806094635-20210806095135

下载文件名。

RequestId String 987F51BE-C4CB-332A-B159-63CE87******

请求ID。

示例

请求示例

http(s)://adb.aliyuncs.com/?Action=DescribeDownloadRecords
&DBClusterId=am-****************
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDownloadRecordsResponse>
    <RequestId>987F51BE-C4CB-332A-B159-63CE87******</RequestId>
    <Records>
        <Status>failed</Status>
        <FileName>20210806094635-20210806095135.xlsx</FileName>
        <ExceptionMsg>The query result is empty.</ExceptionMsg>
        <Url/>
        <DownloadId>73</DownloadId>
    </Records>
    <Records>
        <Status>finished</Status>
        <FileName>20210805104301-20210805164302.xlsx</FileName>
        <ExceptionMsg/>
        <Url>https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164302.xlsx?Expires=1943514161&amp;OSSAccessKeyId=*********&amp;Signature=******</Url>
        <DownloadId>72</DownloadId>
    </Records>
    <Records>
        <Status>finished</Status>
        <FileName>20210805104301-20210805164301.xlsx</FileName>
        <ExceptionMsg/>
        <Url>https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164301.xlsx?Expires=1943513847&amp;OSSAccessKeyId=*********&amp;Signature=******</Url>
        <DownloadId>71</DownloadId>
    </Records>
    <Records>
        <Status>finished</Status>
        <FileName>20210804234858-20210805114858.xlsx</FileName>
        <ExceptionMsg/>
        <Url>https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210804234858-20210805114858.xlsx?Expires=1943495349&amp;OSSAccessKeyId=*********&amp;Signature=******</Url>
        <DownloadId>70</DownloadId>
    </Records>
    <Records>
        <Status>finished</Status>
        <FileName>20210702180330-20210702180333.xlsx</FileName>
        <ExceptionMsg/>
        <Url>https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210702180330-20210702180333.xlsx?Expires=1941607637&amp;OSSAccessKeyId=*********&amp;Signature=******</Url>
        <DownloadId>69</DownloadId>
    </Records>
</DescribeDownloadRecordsResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "987F51BE-C4CB-332A-B159-63CE87******",
  "Records" : [ {
    "Status" : "failed",
    "FileName" : "20210806094635-20210806095135.xlsx",
    "ExceptionMsg" : "The query result is empty.",
    "Url" : "",
    "DownloadId" : 73
  }, {
    "Status" : "finished",
    "FileName" : "20210805104301-20210805164302.xlsx",
    "ExceptionMsg" : "",
    "Url" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164302.xlsx?Expires=1943514161&OSSAccessKeyId=*********&Signature=******",
    "DownloadId" : 72
  }, {
    "Status" : "finished",
    "FileName" : "20210805104301-20210805164301.xlsx",
    "ExceptionMsg" : "",
    "Url" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164301.xlsx?Expires=1943513847&OSSAccessKeyId=*********&Signature=******",
    "DownloadId" : 71
  }, {
    "Status" : "finished",
    "FileName" : "20210804234858-20210805114858.xlsx",
    "ExceptionMsg" : "",
    "Url" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210804234858-20210805114858.xlsx?Expires=1943495349&OSSAccessKeyId=*********&Signature=******",
    "DownloadId" : 70
  }, {
    "Status" : "finished",
    "FileName" : "20210702180330-20210702180333.xlsx",
    "ExceptionMsg" : "",
    "Url" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210702180330-20210702180333.xlsx?Expires=1941607637&OSSAccessKeyId=*********&Signature=******",
    "DownloadId" : 69
  } ]
}

错误码

访问错误中心查看更多错误码。