OpenSearchMemory / Client / delete_event

delete_event

OpenSearchMemory.Client.delete_event(**kwargs)

Deletes an event. Deletion can’t be undone. The event stops appearing in SearchEvents results shortly after you delete it. Deleting an event that doesn’t exist returns ResourceNotFoundException.

Deleting an event doesn’t delete the memories derived from it, because a memory can combine content from several events. To remove them, use DeleteMemory.

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_event(
    spaceId='string',
    eventId='string',
    actorId='string',
    sessionId='string'
)
Parameters:
  • spaceId (string) –

    [REQUIRED]

    The ID of the space.

  • eventId (string) –

    [REQUIRED]

    The ID of the event to delete.

  • actorId (string) – The actor that the event must belong to. Omit it to skip this check. If it doesn’t match the stored event, the call fails with ResourceNotFoundException, as if the event did not exist.

  • sessionId (string) – The session that the event must belong to. Omit it to skip this check. If it doesn’t match the stored event, the call fails with ResourceNotFoundException, as if the event did not exist.

Return type:

dict

Returns:

Response Syntax

{
    'eventId': 'string'
}

Response Structure

  • (dict) –

    • eventId (string) –

      The ID of the deleted event.

Exceptions