Queries the logs of a specified cluster within a specific time range.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ehpc:ListCommonLogs |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
No |
The cluster ID. |
ehpc-hz-FYUr32**** |
| From |
integer |
Yes |
The beginning of the time range to query. Specify a UNIX timestamp in seconds. |
1703821542 |
| To |
integer |
Yes |
The end of the time range to query. Specify a UNIX timestamp in seconds. |
1703821666 |
| ActionName |
array |
No |
The action types. |
|
|
string |
No |
The action type to filter logs by. |
CreateCluster |
|
| OperatorUid |
string |
No |
The account ID of the operator. |
137*** |
| LogRequestId |
string |
No |
The request ID of the action to filter logs by. |
04F0F334-1335-436C-A1D7-6C044FE7**** |
| ActionStatus |
string |
No |
The action status to filter logs by. Valid values:
Valid values:
|
Finished |
| LogType |
string |
No |
The log type to filter logs by. |
Operation |
| Resource |
string |
No |
The resource name to filter logs by. This parameter is not recommended. |
i-abc*** |
| PageNumber |
integer |
No |
The page number of the page to return. Pages start from page 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Default value: 20. |
10 |
| IsReverse |
boolean |
No |
Whether to display results in reverse chronological order. Default value: true |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
464E9919-D04F-4D1D-B375-15989492**** |
| Uid |
string |
The ID of the Alibaba Cloud account. |
137*** |
| PageNumber |
integer |
The page number of the returned page. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| TotalCount |
integer |
The total number of returned entries. |
15 |
| Logs |
array<object> |
The operation log entries. |
|
|
object |
The log entry details. |
||
| RequestId |
string |
The request ID of the action that generated this log entry. |
04F0F334-1335-436C-A1D7-6C044FE7**** |
| Time |
string |
The time when the log was generated. |
2024-08-22 14:21:54 |
| ClusterId |
string |
The cluster ID. |
ehpc-hz-9T3xPNezoS |
| OperatorUid |
string |
The account ID of the operator. |
137*** |
| Action |
string |
The action name recorded in the log entry. |
CreaterCluster |
| Status |
string |
The action status. Valid values:
|
Finished |
| LogType |
string |
The log type. |
Operation |
| Target |
string |
The resource involved in the action. |
i-abc*** |
| Message |
string |
The log message. |
ok |
Examples
Success response
JSON format
{
"RequestId": "464E9919-D04F-4D1D-B375-15989492****",
"Uid": "137***",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 15,
"Logs": [
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE7****",
"Time": "2024-08-22 14:21:54",
"ClusterId": "ehpc-hz-9T3xPNezoS",
"OperatorUid": "137***",
"Action": "CreaterCluster",
"Status": "Finished",
"LogType": "Operation",
"Target": "i-abc***",
"Message": "ok"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
| 404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.