Skip to content

get_event async

get_event(
    memory_id: MemoryId,
    session_id: SessionId,
    actor_id: ActorId,
    event_id: EventId,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreClientConfig] = None,
) -> GetEventOutput

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

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

Parameters:

  • memory_id (MemoryId) –

    The identifier of the AgentCore Memory resource containing the event.

  • session_id (SessionId) –

    The identifier of the session containing the event.

  • actor_id (ActorId) –

    The identifier of the actor associated with the event.

  • event_id (EventId) –

    The identifier of the event to retrieve.

Raises:

  • AccessDeniedException –

    The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.

  • InvalidInputException –

    The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

  • ResourceNotFoundException –

    The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.

  • ServiceException –

    The service encountered an internal error. Try your request again later.

  • ServiceQuotaExceededException –

    The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.

  • ThrottledException –

    The request was denied due to request throttling. Reduce the frequency of requests and try again.

  • ValidationException –

    The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_bedrock_agentcore/_services/async_bedrock_agent_core.py
async def get_event(
    self,
    memory_id: "capo_bedrock_agentcore.types.memory_id.MemoryId",
    session_id: "capo_bedrock_agentcore.types.session_id.SessionId",
    actor_id: "capo_bedrock_agentcore.types.actor_id.ActorId",
    event_id: "capo_bedrock_agentcore.types.event_id.EventId",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreClientConfig] = None,
) -> "capo_bedrock_agentcore.types.get_event_output.GetEventOutput":
    """<p>Retrieves information about a specific event in an AgentCore Memory resource.</p> <p>To use this operation, you must have the <code>bedrock-agentcore:GetEvent</code> permission.</p>

    Args:
        memory_id: <p>The identifier of the AgentCore Memory resource containing the event.</p>
        session_id: <p>The identifier of the session containing the event.</p>
        actor_id: <p>The identifier of the actor associated with the event.</p>
        event_id: <p>The identifier of the event to retrieve.</p>

    Raises:
        capo_bedrock_agentcore.errors.access_denied_exception.AccessDeniedException: <p>The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.</p>
        capo_bedrock_agentcore.errors.invalid_input_exception.InvalidInputException: <p>The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.</p>
        capo_bedrock_agentcore.errors.resource_not_found_exception.ResourceNotFoundException: <p>The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.</p>
        capo_bedrock_agentcore.errors.service_exception.ServiceException: <p>The service encountered an internal error. Try your request again later.</p>
        capo_bedrock_agentcore.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.</p>
        capo_bedrock_agentcore.errors.throttled_exception.ThrottledException: <p>The request was denied due to request throttling. Reduce the frequency of requests and try again.</p>
        capo_bedrock_agentcore.errors.validation_exception.ValidationException: <p>The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.</p>
        capo_bedrock_agentcore.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock_agentcore.types.get_event_input.GetEventInput]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore.types.get_event_output.GetEventOutput"
    ]:
        import capo_bedrock_agentcore._operations.amazon_bedrock_agent_core.get_event

        (
            output,
            http_response,
        ) = await capo_bedrock_agentcore._operations.amazon_bedrock_agent_core.get_event.async_get_event(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_bedrock_agentcore.types.get_event_output.GetEventOutput",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore.types.get_event_output

        return capo_bedrock_agentcore.types.get_event_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetEvent", redact_output=_redact_output)
    )
    input_: capo_bedrock_agentcore.types.get_event_input.GetEventInput = {
        "memory_id": memory_id,
        "session_id": session_id,
        "actor_id": actor_id,
        "event_id": event_id,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output