Queries events from the event center.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:EventCenterQueryEvents |
get |
*EventBus
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| BusName |
string |
No |
The name of the event bus. |
default |
| NextToken |
string |
No |
The token to retrieve the next page of results. |
100 |
| MaxResults |
integer |
No |
The maximum number of results to return. Valid values: 0 to 10000. Default value: 100. |
100 |
| Body |
object |
Yes |
The body parameters. |
|
| SchemaId |
string |
Yes |
The schema ID. |
ecs:GeneralSchema |
| QueryType |
string |
Yes |
The query type. Valid values:
|
timeseries_and_table |
| Parameters |
object |
Yes |
The query parameters. |
|
| Breakdowns |
array |
No |
The dimension (column name) to split the dataset. |
|
|
string |
No |
The column name to use as a dimension for splitting. |
source |
|
| Calculations |
array |
No |
The calculation to perform on a specified column. |
|
|
object |
No |
|||
| Op |
string |
No |
The operator. |
COUNT_DISTINCT |
| Column |
string |
No |
The column name. |
source |
| Filters |
array |
No |
The filter conditions. |
|
|
array<object> |
No |
|||
| Column |
string |
No |
The column name. |
source |
| Op |
string |
No |
The operator. |
= |
| Values |
array |
No |
The values to use with the operator. |
|
|
string |
No |
If the value is a string, enclose it in single quotation marks ('). |
'acs.ecs' |
|
| NestedFilterCombination |
string |
No |
AND |
|
| NestedFilters |
array |
No |
||
|
object |
No |
|||
| Column |
string |
No |
||
| Op |
string |
No |
||
| Values |
array |
No |
||
|
string |
No |
|||
| FilterCombination |
string |
No |
The logical operator for combining filter conditions. |
AND |
| Granularity |
integer |
No |
The time granularity, which is the minimum time unit for querying time series data. Unit: seconds. The minimum value is 1. This is a suggested value. The actual granularity depends on the returned value. |
30 |
| Orders |
array |
No |
The sorting method for the query results. This parameter is valid only when QueryType is set to table. |
|
|
object |
No |
|||
| Op |
string |
No |
The operator. |
AVG |
| Column |
string |
No |
The column name. |
source |
| Desc |
boolean |
No |
Specifies whether to sort the results in descending order. |
true |
| Offset |
integer |
No |
The starting position of the query. The count starts from 0. |
0 |
| Limit |
integer |
No |
The maximum number of events to query. Valid values: 1 to 10000. |
100 |
| TimeRange |
integer |
No |
The time range. Unit: milliseconds. The minimum value is 1000. |
1000000 |
| StartTime |
integer |
No |
The start timestamp for the event query. Unit: milliseconds. |
1687860901814 |
| EndTime |
integer |
No |
The end timestamp for the event query. Unit: milliseconds. |
1687861201814 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| Message |
string |
Specified parameter Limit is not valid. |
|
| RequestId |
string |
5DAF96FB-A4B6-548C-B999-XXXXXXXX |
|
| Data |
object |
||
| NextToken |
string |
100 |
|
| MaxResults |
integer |
100 |
|
| TotalCount |
integer |
76 |
|
| TimeSeries |
array<object> |
||
|
object |
|||
| RowData |
object |
{ "id":"xxx", "source":"acs.ecs" } |
|
| Time |
string |
1683561600000 |
|
| Table |
array<object> |
||
|
object |
|||
| RowData |
object |
{ "id":"xxx", "source":"acs.ecs" } |
|
| Code |
string |
Success |
|
| Success |
boolean |
true |
Examples
Success response
JSON format
{
"Message": "Specified parameter Limit is not valid.",
"RequestId": "5DAF96FB-A4B6-548C-B999-XXXXXXXX",
"Data": {
"NextToken": "100",
"MaxResults": 100,
"TotalCount": 76,
"TimeSeries": [
{
"RowData": {
"id": "xxx",
"source": "acs.ecs"
},
"Time": "1683561600000"
}
],
"Table": [
{
"RowData": {
"id": "xxx",
"source": "acs.ecs"
}
}
]
},
"Code": "Success",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.