Skip to content

list_search_job_backups async

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

This operation returns a list of all backups (recovery points) in a paginated format that were included in the search job.

If a search does not display an expected backup in the results, you can call this operation to display each backup included in the search. Any backups that were not included because they have a FAILED status from a permissions issue will be displayed, along with a status message.

Only recovery points with a backup index that has a status of ACTIVE will be included in search results. If the index has any other status, its status will be displayed along with a status message.

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 backups included in a search job.

    For example, if a request is made to return MaxResults number of backups, 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_backups(
    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_backups_output.ListSearchJobBackupsOutput":
    """<p>This operation returns a list of all backups (recovery points) in a paginated format that were included in the search job.</p> <p>If a search does not display an expected backup in the results, you can call this operation to display each backup included in the search. Any backups that were not included because they have a <code>FAILED</code> status from a permissions issue will be displayed, along with a status message.</p> <p>Only recovery points with a backup index that has a status of <code>ACTIVE</code> will be included in search results. If the index has any other status, its status will be displayed along with a status message.</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 backups included in a search job.</p> <p>For example, if a request is made to return <code>MaxResults</code> number of backups, <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_backups_input.ListSearchJobBackupsInput]",
    ) -> AsyncOperationResponse[
        "capo_backupsearch.types.list_search_job_backups_output.ListSearchJobBackupsOutput"
    ]:
        import capo_backupsearch._operations.cryo_backup_search_service.list_search_job_backups

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListSearchJobBackups")
    )
    input_: capo_backupsearch.types.list_search_job_backups_input.ListSearchJobBackupsInput = {
        "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