delete_event
async
¶
delete_event(
space_id: SpaceId,
event_id: EventId,
*,
config_overrides: Optional[AsyncOpenSearchMemoryClientConfig] = None,
actor_id: Optional[ActorId] = None,
session_id: Optional[SessionId] = None,
) -> DeleteEventOutput
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.
Parameters:
-
space_id(SpaceId) –The ID of the space.
-
event_id(EventId) –The ID of the event to delete.
-
actor_id(Optional[ActorId], default:None) –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. -
session_id(Optional[SessionId], default:None) –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.
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.