getEvent method

Future<GetEventOutput> getEvent({
  1. required String actorId,
  2. required String eventId,
  3. required String memoryId,
  4. required String sessionId,
})

Retrieves information about a specific event in an AgentCore Memory resource.

To use this operation, you must have the bedrock-agentcore:GetEvent permission.

May throw AccessDeniedException. May throw InvalidInputException. May throw ResourceNotFoundException. May throw ServiceException. May throw ServiceQuotaExceededException. May throw ThrottledException. May throw ValidationException.

Parameter actorId : The identifier of the actor associated with the event.

Parameter eventId : The identifier of the event to retrieve.

Parameter memoryId : The identifier of the AgentCore Memory resource containing the event.

Parameter sessionId : The identifier of the session containing the event.

Implementation

Future<GetEventOutput> getEvent({
  required String actorId,
  required String eventId,
  required String memoryId,
  required String sessionId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/memories/${Uri.encodeComponent(memoryId)}/actor/${Uri.encodeComponent(actorId)}/sessions/${Uri.encodeComponent(sessionId)}/events/${Uri.encodeComponent(eventId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetEventOutput.fromJson(response);
}