Queries the number of accesses to a table or all tables in an AnalyticDB for MySQL cluster on a date.
Operation description
For information about the endpoints of AnalyticDB for MySQL, see Endpoints .
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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis 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:DescribeTableAccessCount | list | *DBClusterLakeVersion acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| DBClusterId | string | Yes | The ID of the AnalyticDB for MySQL Data Lakehouse Edition cluster. Note
You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL clusters within a region.
| amv-2ze627uzpkh8a8**** |
| TableName | string | No | The name of the table. Note
If you leave this parameter empty, the number of accesses to all tables in the cluster on a date is returned.
| CUSTOMER |
| 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
Only data within the last 30 days can be queried.
| 2022-09-25T12:10:00Z |
| Order | string | No | The order by which to sort query results. Specify the parameter value in the JSON string format. Example:
Note
If you do not specify this parameter, query results are sorted in ascending order based on the database and the table.
| [{"Field":"TableSchema","Type":"Asc"}] |
| PageNumber | integer | No | The page number. Pages start from 1. Default value: 1. | 1 |
| PageSize | integer | No | The number of entries per page. Valid values:
| 30 |
| RegionId | string | Yes | The region ID of the cluster. | cn-hangzhou |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "6B7D627B-DA23-572D-AD71-256F64698B7D",
"PageNumber": 1,
"PageSize": 30,
"TotalCount": 1,
"Items": [
{
"ReportDate": "2022-09-26",
"TableSchema": "tpch",
"AccessCount": 6,
"TableName": "CUSTOMER",
"InstanceName": "amv-2ze627uzpkh8a8****"
}
]
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2023-09-13 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
