Downloads the query diagnostic information of an AnalyticDB for PostgreSQL instance.
Description
You can call this operation to download the query diagnostic information of an AnalyticDB for PostgreSQL instance. After the download is complete, you can call the DescribeDownloadRecords operation to query download records and download URLs.
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
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DownloadDiagnosisRecords |
The operation that you want to perform. Set the value to DownloadDiagnosisRecords. |
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.
|
User | String | No | adbpguser |
The name of the database account. |
Database | String | Yes | adbtest |
The name of the database. |
StartTime | String | No | 2022-05-07T06:59Z |
The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
EndTime | String | No | 2022-05-07T07:59Z |
The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
QueryCondition | String | No | { "Type":"maxCost", "Value":"100" } |
The filter condition on queries. The value is in the JSON format. Valid values:
|
Lang | String | No | zh |
The language of the file that contains the query diagnostic information. Valid values:
|
ResourceGroupId | String | No | rg-bp67acfmxazb4p**** |
The ID of the resource group to which the instance belongs. For more information about how to obtain the ID of a resource group, see View basic information of a resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | B4CAF581-2AC7-41AD-8940-D56DF7AADF5B |
The ID of the request. |
DownloadId | String | 11 |
The ID of the download task. |
DBInstanceId | String | gp-bp12ga6v69h86**** |
The ID of the instance. |
Examples
Sample requests
http(s)://gpdb.aliyuncs.com/?Action=DownloadDiagnosisRecords
&DBInstanceId=gp-bp12ga6v69h86****
&User=adbpguser
&Database=adbtest
&StartTime=2022-05-07T06:59Z
&EndTime=2022-05-07T07:59Z
&QueryCondition={ "Type":"maxCost", "Value":"100" }
&Lang=zh
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DownloadDiagnosisRecordsResponse>
<RequestId>B4CAF581-2AC7-41AD-8940-D56DF7AADF5B</RequestId>
<DownloadId>11111</DownloadId>
</DownloadDiagnosisRecordsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "B4CAF581-2AC7-41AD-8940-D56DF7AADF5B",
"DownloadId" : "11"
}
Error codes
For a list of error codes, visit the API Error Center.