All Products
Search
Document Center

AnalyticDB for MySQL:DescribeProcessList

Last Updated:Mar 22, 2024

Queries the queries that are being executed on a cluster.

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:DescribeProcessListRead
  • DBCluster
    acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

am-bp11q28kvl688****
ShowFullbooleanNo

Specifies whether to show a complete SQL statement. Valid values:

  • True: shows a complete SQL statement.
  • False: shows only the first 100 characters of an SQL statement.
Note The default value is False.
True
RunningTimeintegerNo

The execution duration used to filter queries. Queries that take a longer time than the specified execution duration are displayed. Unit: seconds.

5
UserstringNo

The name of the user used to filter queries.

test
KeywordstringNo

The keyword in an SQL statement, which is used to filter queries. Set the value to SELECT.

SELECT
OrderstringNo

The order in which queries are sorted based on the specified fields. Specify this parameter as an ordered JSON array in the [{"Field":"Time","Type":"Desc" },{ "Field":"User", "Type":"Asc" }] format.

  • Field specifies the field used to sort queries. Valid values: Time, User, Host, and DB.
  • Type specifies the sorting sequence. Valid values: Desc and Asc.
[ { "Field":"Time","Type":"Desc" }, { "Field":"User", "Type":"Asc" }]
PageSizeintegerNo

The number of entries to return on each page. Default value: 30. Valid values:

  • 30
  • 50
  • 100
30
PageNumberintegerNo

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

1

Response parameters

ParameterTypeDescriptionExample
object
TotalCountstring

The total number of entries returned.

1
PageSizestring

The total number of pages returned.

30
RequestIdstring

The ID of the request.

1AD222E9-E606-4A42-BF6D-8A4442913CEF
PageNumberstring

The page number of the returned page.

1
Itemsobject []

Details of the queries.

StartTimestring

The start time of the query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2020-11-19T02:48:15Z
Timeinteger

The amount of time that has elapsed from the start time of the query. Unit: seconds.

11
ProcessIdstring

The unique ID of the query. You must specify this parameter when you use the KILL PROCESS statement.

202011191048151921681492420315100****
Hoststring

The IP address from which the query was initiated.

192.168.XX.XX:12308
DBstring

The name of the database.

adb_demo
Commandstring

The type of the statement. Only SELECT can be returned.

SELECT
Userstring

The username.

test
Idinteger

The ID of the worker thread.

49104
Infostring

The SQL statement that is being executed. By default, the first 100 characters of the SQL statement are returned. If the ShowFull parameter is set to True, the complete SQL statement is returned.

select * from sbtest1,sbtest2,sbtest3,sbtest4

Examples

Sample success responses

JSONformat

{
  "TotalCount": "1",
  "PageSize": "30",
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "PageNumber": "1",
  "Items": {
    "Process": [
      {
        "StartTime": "2020-11-19T02:48:15Z",
        "Time": 11,
        "ProcessId": "202011191048151921681492420315100****",
        "Host": "192.168.XX.XX:12308",
        "DB": "adb_demo",
        "Command": "SELECT",
        "User": "test",
        "Id": 49104,
        "Info": "select * from sbtest1,sbtest2,sbtest3,sbtest4"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400IncorrectModuleVersionThe specified module version does not support this operation.The specified module version does not support this operation.
400AnalyticDBKernelErrorCalling AnalyticDB Kernel error-
404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist. Make sure that the DBClusterId value is valid.

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

Change history

Change timeSummary of changesOperation
2023-04-06The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 404