Queries a list of SQL patterns for an AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster within a time range.
Operation description
- General endpoint:
adb.aliyuncs.com
. - Regional public endpoint:
adb.<region-id>.aliyuncs.com
. Example:adb.cn-hangzhou.aliyuncs.com
. - Regional Virtual Private Cloud (VPC) endpoint:
adb-vpc.<region-id>.aliyuncs.com
. Example:adb-vpc.cn-hangzhou.aliyuncs.com
.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
adb:DescribeSQLPatterns | list |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The ID of the AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster. Note
You can call the DescribeDBClusters operation to query the information about all AnalyticDB for MySQL Data Lakehouse Edition (V3.0) clusters within a region, including cluster IDs.
| amv-8vb8de93v9b**** |
StartTime | string | Yes | The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note
| 2022-09-06T03:06:00Z |
EndTime | string | Yes | The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note
The end time must be later than the start time.
| 2022-09-07T03:06:00Z |
RegionId | string | Yes | The region ID of the cluster. | cn-hangzhou |
Keyword | string | No | The keyword that is used for the query. | SELECT |
Order | string | No | The order by which to sort query results. Specify the parameter value in the JSON format. Example:
| [{"Field":"AverageQueryTime","Type":"Asc"}] |
PageNumber | integer | No | The page number. Pages start from page 1. Default value: 1. | 2 |
PageSize | integer | No | The number of entries per page. Valid values:
| 10 |
Lang | string | No | The language. Valid values:
| zh |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageNumber": 2,
"PageSize": 10,
"TotalCount": 20,
"PatternDetails": [
{
"SQLPattern": "SELECT * FROM KEPLER_META_NODE_STATIC_INFO WHERE elastic_node = ? OR (elastic_node = ? AND enable = ?)",
"PatternId": "5575924945138******",
"User": "test",
"AccessIp": "192.168.xx.xx",
"Tables": "tpch.orders",
"PatternCreationTime": "2022-09-06 05:06:00",
"AverageQueryTime": 4,
"MaxQueryTime": 2341,
"AverageExecutionTime": 234.78,
"MaxExecutionTime": 2142,
"AveragePeakMemory": 234.22,
"MaxPeakMemory": 234149,
"AverageScanSize": 234149.23,
"MaxScanSize": 32212254,
"QueryCount": 345,
"FailedCount": 18,
"Blockable": true,
"QueryTimeSum": 0,
"QueryTimePercentage": 0,
"PeakMemorySum": 0,
"PeakMemoryPercentage": 0,
"ScanSizeSum": 0,
"ScanSizePercentage": 0,
"AverageOperatorCost": 0,
"MaxOperatorCost": 0,
"OperatorCostSum": 0,
"OperatorCostPercentage": 0,
"AverageScanCost": 0,
"MaxScanCost": 0,
"ScanCostSum": 0,
"ScanCostPercentage": 0
}
],
"RequestId": "F3174013-5B7A-5A47-9FE0-6B5D397BD86B",
"AccessDeniedDetail": ""
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-08-06 | The response structure of the API has changed | View Change Details |
2024-05-14 | The response structure of the API has changed | View Change Details |
2023-12-08 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-06-08 | The internal configuration of the API is changed, but the call is not affected | View Change Details |