list_events
async
¶
list_events(
space_id: SpaceId,
actor_id: ActorId,
session_id: SessionId,
*,
config_overrides: Optional[AsyncOpenSearchMemoryClientConfig] = None,
event_timestamp_before: Optional[EventTimestamp] = None,
event_timestamp_after: Optional[EventTimestamp] = None,
sort_order: Optional[SortOrder] = None,
metadata_filters: Optional[MetadataMap] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[PaginationToken] = None,
) -> ListEventsOutput
Lists the events in a session, sorted by time. Optionally limit the results to events whose eventTimestamp falls between eventTimestampAfter and eventTimestampBefore. Returns event metadata only. Call GetEvent for the payload. For full-text or relevance search, use SearchEvents.
If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.
Parameters:
-
space_id(SpaceId) –The ID of the space.
-
actor_id(ActorId) –The actor whose events to list.
-
session_id(SessionId) –The session whose events to list. To find events across sessions, use
SearchEvents. -
event_timestamp_before(Optional[EventTimestamp], default:None) –Inclusive upper bound on
eventTimestamp: only events at or before this time are returned. Omit for no upper bound. -
event_timestamp_after(Optional[EventTimestamp], default:None) –Inclusive lower bound on
eventTimestamp: only events at or after this time are returned. Omit for no lower bound.If it's later than
eventTimestampBefore, the request fails withValidationException. -
sort_order(Optional[SortOrder], default:None) –The order of the results by
eventTimestamp:ASCorDESC. The default isDESC, most recent first. -
metadata_filters(Optional[MetadataMap], default:None) –Returns only events whose metadata contains every one of these key-value pairs. Omit, or leave empty, for no metadata filter. The service applies the filter after it reads events, so a page can hold fewer than
maxResultsevents, or none, and still return anextToken. Keep paging untilnextTokenis absent. -
max_results(Optional[MaxResults], default:None) –The maximum number of events to return, from 1 to 100. The default is 20.
-
next_token(Optional[PaginationToken], default:None) –The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
-
InternalServerException–The service couldn't process the request because of an internal error. Retry the request.
-
ResourceNotFoundException–The specified resource doesn't exist. Check the IDs in the request.
-
ThrottlingException–The service throttled the request. Retry the request with exponential backoff.
-
ValidationException–The request isn't valid. The
reason,message, andfieldListmembers describe the problem. Fix the request, and then try again. -
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_opensearchmemory/_services/async_open_search_memory.py
1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 | |