All Products
Search
Document Center

AnalyticDB:DescribeTableAccessCount

最終更新日:Aug 30, 2024

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
adb:DescribeTableAccessCountget
  • DBCluster
    acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query the details of all AnalyticDB for MySQL clusters within a specified region, including cluster IDs.
am-bp1r053byu48p****
TableNamestringNo

The name of the specific table.

Note If this parameter is not specified, the number of accesses to all tables within the specified cluster for a specified date is returned.
CUSTOMER
StartTimestringYes

The date to query. Specify the time in the yyyy-MM-dd format. The time must be in UTC.

Note Only data for the last 30 days can be queried.
2021-08-30
OrderstringNo

The order by which to sort query results. Specify the parameter value in the JSON string format. Example: [{"Field":"TableSchema","Type":"Asc"}].

  • Field indicates the field that is used to sort the retrieved entries. Valid values:

    • TableSchema: the name of the database to which the table belongs.
    • TableName: the name of the table.
    • AccessCount: the number of accesses to the table.
  • Type indicates the sorting method. Valid values:

    • Asc: ascending order.
    • Desc: descending order.
Note If this parameter is not specified, query results are sorted in ascending order of the database to which a specific table belongs.
[{"Field":"TableSchema","Type":"Asc"}]
PageNumberintegerNo

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. The value must be a positive integer. Default value: 30.

30
RegionIdstringYes

The ID of the region.

Note You can call the DescribeRegions operation to query the regions and zones supported by AnalyticDB for MySQL, including region IDs.
cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

C242707A-01D1-54DA-A5F6-671557******
PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned on the current page.

30
TotalCountinteger

The total number of entries.

1
Itemsarray<object>

Details about the table usage.

object
ReportDatestring

The date when the table was used.

2021-08-30
TableSchemastring

The database to which the table belongs.

tpch
AccessCountstring

The number of accesses to the table.

6
TableNamestring

The name of the table.

CUSTOMER
InstanceNamestring

The ID of the cluster to which the table belongs.

am-bp1r053byu48p****

Examples

Sample success responses

JSONformat

{
  "RequestId": "C242707A-01D1-54DA-A5F6-671557******",
  "PageNumber": 1,
  "PageSize": 30,
  "TotalCount": 1,
  "Items": [
    {
      "ReportDate": "2021-08-30",
      "TableSchema": "tpch",
      "AccessCount": "6",
      "TableName": "CUSTOMER",
      "InstanceName": "am-bp1r053byu48p****"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
503ServiceUnavailableAn error occurred while processing your request.The system is unavailable. Please try again later.

For a list of error codes, visit the Service error codes.