Skip to content

list_search_job_results async

list_search_job_results(
    search_job_identifier: GenericId,
    *,
    config_overrides: Optional[AsyncBackupSearchClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> ListSearchJobResultsOutput

This operation returns a list of a specified search job.

Parameters:

  • search_job_identifier (GenericId) –

    The unique string that specifies the search job.

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

    The next item following a partial list of returned search job results.

    For example, if a request is made to return MaxResults number of search job results, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

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

    The maximum number of resource list items to be returned.

Raises:

Source code in docs_src/capo_backupsearch/_services/async_backup_search.py
async def list_search_job_results(
    self,
    search_job_identifier: "capo_backupsearch.types.generic_id.GenericId",
    *,
    config_overrides: Optional[AsyncBackupSearchClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> "capo_backupsearch.types.list_search_job_results_output.ListSearchJobResultsOutput":
    """<p>This operation returns a list of a specified search job.</p>

    Args:
        search_job_identifier: <p>The unique string that specifies the search job.</p>
        next_token: <p>The next item following a partial list of returned search job results.</p> <p>For example, if a request is made to return <code>MaxResults</code> number of search job results, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
        max_results: <p>The maximum number of resource list items to be returned.</p>

    Raises:
        capo_backupsearch.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_backupsearch.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_backupsearch.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_backupsearch.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_backupsearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource was not found for this request.</p> <p>Confirm the resource information, such as the ARN or type is correct and exists, then retry the request.</p>
        capo_backupsearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backupsearch.types.list_search_job_results_input.ListSearchJobResultsInput]",
    ) -> AsyncOperationResponse[
        "capo_backupsearch.types.list_search_job_results_output.ListSearchJobResultsOutput"
    ]:
        import capo_backupsearch._operations.cryo_backup_search_service.list_search_job_results

        (
            output,
            http_response,
        ) = await capo_backupsearch._operations.cryo_backup_search_service.list_search_job_results.async_list_search_job_results(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_backupsearch.types.list_search_job_results_output.ListSearchJobResultsOutput",
    ) -> dict[str, Any]:
        import capo_backupsearch.types.list_search_job_results_output

        return (
            capo_backupsearch.types.list_search_job_results_output.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListSearchJobResults", redact_output=_redact_output),
    )
    input_: capo_backupsearch.types.list_search_job_results_input.ListSearchJobResultsInput = {
        "search_job_identifier": search_job_identifier
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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