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 10,000. The default value is 100. |
100 |
| Body |
object |
Yes |
The request body. |
|
| 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 |
An array of column names to use as dimensions for splitting the dataset. |
|
|
string |
No |
The name of the column to use as a dimension for splitting. |
source |
|
| Calculations |
array<object> |
No |
The calculations to perform on specified columns. |
|
|
object |
No |
|||
| Op |
string |
No |
The operator. |
COUNT_DISTINCT |
| Column |
string |
No |
The column name. |
source |
| Filters |
array<object> |
No |
A list of 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 |
The logical operator for combining nested filters. |
AND |
| NestedFilters |
array<object> |
No |
A list of nested filters. |
|
|
object |
No |
|||
| Column |
string |
No |
The column name. |
|
| Op |
string |
No |
The operator. |
|
| Values |
array |
No |
A list of values to use with the operator. |
|
|
string |
No |
|||
| FilterCombination |
string |
No |
The logical operator for combining filter conditions. |
AND |
| Granularity |
integer |
No |
The time granularity, in seconds, for querying time series data. The minimum value is 1. This is a suggested value; the actual granularity is returned in the response. |
30 |
| Orders |
array<object> |
No |
The sort order for the query results. This parameter applies 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 10,000. |
100 |
| TimeRange |
integer |
No |
The time range. Unit: milliseconds. The minimum value is 1,000. |
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 schema. |
||
| Message |
string |
The error message. |
Specified parameter Limit is not valid. |
| RequestId |
string |
The request ID. |
5DAF96FB-A4B6-548C-B999-XXXXXXXX |
| Data |
object |
The returned data. |
|
| NextToken |
string |
The token used to retrieve the next page of results. If this parameter is empty, all results have been returned. |
100 |
| MaxResults |
integer |
The maximum number of entries to return. |
100 |
| TotalCount |
integer |
The total number of entries that meet the filter conditions. This parameter is optional and is not returned by default. |
76 |
| TimeSeries |
array<object> |
The query results for the |
|
|
array<object> |
|||
| RowData |
object |
A query result entry, represented as a key-value pair. |
{ "id":"xxx", "source":"acs.ecs" } |
| Time |
string |
The timestamp. |
1683561600000 |
| Table |
array<object> |
The query results for the |
|
|
array<object> |
|||
| RowData |
object |
A query result entry, represented as a key-value pair. |
{ "id":"xxx", "source":"acs.ecs" } |
| Code |
string |
The status of the API call, which can be Success or a POP error code. |
Success |
| Success |
boolean |
Indicates whether the call was successful. |
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.