Queries the download records of query diagnostic information for an AnalyticDB for PostgreSQL instance.

Description

You must call the DownloadDiagnosisRecords operation to obtain a download record before you can call this operation to query and download the query diagnostic information.

This operation is available only for instances of V6.3.10.1 or later in elastic storage mode. For more information about how to view and update the minor engine version of an instance, see View the minor engine version and Update the minor engine version.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDownloadRecords

The operation that you want to perform. Set the value to DescribeDownloadRecords.

DBInstanceId String Yes gp-bp12ga6v69h86****

The ID of the instance.

Note You can call the DescribeDBInstances operation to query the details of all AnalyticDB for PostgreSQL instances in a specific region, including instance IDs.

Response parameters

Parameter Type Example Description
Records Array of Item

Details of the download records.

DownloadId Long 1150

The ID of the download record.

ExceptionMsg String Error message

The error message returned.

FileName String 20220509113448-20220509173448.csv

The name of the file.

Status String finished

The state of the upload task. After you call the DownloadDiagnosisRecords operation, query diagnostic information is first uploaded to Object Storage Service (OSS). After the upload task is complete, the query diagnostic information can be downloaded. Valid values:

  • running: uploading
  • finished: uploaded
  • failed: failed
DownloadUrl String https://perth-download-task.oss-cn-beijing.aliyuncs.com/*****

The URL that can be used to download the file.

RequestId String B4CAF581-2AC7-41AD-8940-D56DF7AADF5B

The ID of the request.

Examples

Sample requests

http(s)://gpdb.aliyuncs.com/?Action=DescribeDownloadRecords
&DBInstanceId=gp-bp12ga6v69h86****
&<Common request parameters>

Sample success responses

XML format

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

<DescribeDownloadRecordsResponse>
    <Records>
        <DownloadId>1150</DownloadId>
        <ExceptionMsg>Error message</ExceptionMsg>
        <FileName>20220509113448-20220509173448.csv</FileName>
        <Status>finished</Status>
        <DownloadUrl>https://perth-download-task.oss-cn-beijing.aliyuncs.com/*****</DownloadUrl>
    </Records>
    <RequestId>B4CAF581-2AC7-41AD-8940-D56DF7AADF5B</RequestId>
</DescribeDownloadRecordsResponse>

JSON format

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

{
  "Records" : [ {
    "DownloadId" : 1150,
    "ExceptionMsg" : "Error message",
    "FileName" : "20220509113448-20220509173448.csv",
    "Status" : "finished",
    "DownloadUrl" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/*****"
  } ],
  "RequestId" : "B4CAF581-2AC7-41AD-8940-D56DF7AADF5B"
}

Error codes

For a list of error codes, visit the API Error Center.