Skip to content

list_async_invokes async

list_async_invokes(
    *,
    config_overrides: Optional[AsyncBedrockRuntimeClientConfig] = None,
    submit_time_after: Optional[Timestamp] = None,
    submit_time_before: Optional[Timestamp] = None,
    status_equals: Optional[AsyncInvokeStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
    sort_by: Optional[SortAsyncInvocationBy] = None,
    sort_order: Optional[SortOrder] = None,
) -> ListAsyncInvokesResponse

Lists asynchronous invocations.

Parameters:

  • submit_time_after (Optional[Timestamp], default: None ) –

    Include invocations submitted after this time.

  • submit_time_before (Optional[Timestamp], default: None ) –

    Include invocations submitted before this time.

  • status_equals (Optional[AsyncInvokeStatus], default: None ) –

    Filter invocations by status.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of invocations to return in one page of results.

  • next_token (Optional[PaginationToken], default: None ) –

    Specify the pagination token from a previous request to retrieve the next page of results.

  • sort_by (Optional[SortAsyncInvocationBy], default: None ) –

    How to sort the response.

  • sort_order (Optional[SortOrder], default: None ) –

    The sorting order for the response.

Raises:

Source code in docs_src/capo_bedrock_runtime/_services/async_bedrock_runtime.py
async def list_async_invokes(
    self,
    *,
    config_overrides: Optional[AsyncBedrockRuntimeClientConfig] = None,
    submit_time_after: Optional[
        "capo_bedrock_runtime.types.timestamp.Timestamp"
    ] = None,
    submit_time_before: Optional[
        "capo_bedrock_runtime.types.timestamp.Timestamp"
    ] = None,
    status_equals: Optional[
        "capo_bedrock_runtime.types.async_invoke_status.AsyncInvokeStatus"
    ] = None,
    max_results: Optional[
        "capo_bedrock_runtime.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_bedrock_runtime.types.pagination_token.PaginationToken"
    ] = None,
    sort_by: Optional[
        "capo_bedrock_runtime.types.sort_async_invocation_by.SortAsyncInvocationBy"
    ] = None,
    sort_order: Optional["capo_bedrock_runtime.types.sort_order.SortOrder"] = None,
) -> "capo_bedrock_runtime.types.list_async_invokes_response.ListAsyncInvokesResponse":
    """<p>Lists asynchronous invocations.</p>

    Args:
        submit_time_after: <p>Include invocations submitted after this time.</p>
        submit_time_before: <p>Include invocations submitted before this time.</p>
        status_equals: <p>Filter invocations by status.</p>
        max_results: <p>The maximum number of invocations to return in one page of results.</p>
        next_token: <p>Specify the pagination token from a previous request to retrieve the next page of results.</p>
        sort_by: <p>How to sort the response.</p>
        sort_order: <p>The sorting order for the response.</p>

    Raises:
        capo_bedrock_runtime.errors.access_denied_exception.AccessDeniedException: <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
        capo_bedrock_runtime.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
        capo_bedrock_runtime.errors.throttling_exception.ThrottlingException: <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
        capo_bedrock_runtime.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
        capo_bedrock_runtime.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock_runtime.types.list_async_invokes_request.ListAsyncInvokesRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_runtime.types.list_async_invokes_response.ListAsyncInvokesResponse"
    ]:
        import capo_bedrock_runtime._operations.amazon_bedrock_frontend_service.list_async_invokes

        (
            output,
            http_response,
        ) = await capo_bedrock_runtime._operations.amazon_bedrock_frontend_service.list_async_invokes.async_list_async_invokes(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_bedrock_runtime.types.list_async_invokes_response.ListAsyncInvokesResponse",
    ) -> dict[str, Any]:
        import capo_bedrock_runtime.types.list_async_invokes_response

        return (
            capo_bedrock_runtime.types.list_async_invokes_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListAsyncInvokes", redact_output=_redact_output),
    )
    input_: capo_bedrock_runtime.types.list_async_invokes_request.ListAsyncInvokesRequest = {}
    if submit_time_after is not None:
        input_["submit_time_after"] = submit_time_after
    if submit_time_before is not None:
        input_["submit_time_before"] = submit_time_before
    if status_equals is not None:
        input_["status_equals"] = status_equals
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order

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