Skip to content

list_restore_jobs async

list_restore_jobs(
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    next_token: Optional[string] = None,
    max_results: Optional[MaxResults] = None,
    by_account_id: Optional[AccountId] = None,
    by_resource_type: Optional[ResourceType] = None,
    by_created_before: Optional[timestamp] = None,
    by_created_after: Optional[timestamp] = None,
    by_status: Optional[RestoreJobStatus] = None,
    by_complete_before: Optional[timestamp] = None,
    by_complete_after: Optional[timestamp] = None,
    by_restore_testing_plan_arn: Optional[ARN] = None,
    by_parent_job_id: Optional[string] = None,
) -> ListRestoreJobsOutput

Returns a list of jobs that Backup initiated to restore a saved resource, including details about the recovery process.

Parameters:

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

    The next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

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

    The maximum number of items to be returned.

  • by_account_id (Optional[AccountId], default: None ) –

    The account ID to list the jobs from. Returns only restore jobs associated with the specified account ID.

  • by_resource_type (Optional[ResourceType], default: None ) –

    Include this parameter to return only restore jobs for the specified resources:

    • Aurora for Amazon Aurora

    • CloudFormation for CloudFormation

    • DocumentDB for Amazon DocumentDB (with MongoDB compatibility)

    • DynamoDB for Amazon DynamoDB

    • EBS for Amazon Elastic Block Store

    • EC2 for Amazon Elastic Compute Cloud

    • EFS for Amazon Elastic File System

    • EKS for Amazon Elastic Kubernetes Service

    • FSx for Amazon FSx

    • Neptune for Amazon Neptune

    • RDS for Amazon Relational Database Service

    • Redshift for Amazon Redshift

    • S3 for Amazon Simple Storage Service (Amazon S3)

    • SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute Cloud instances

    • Storage Gateway for Storage Gateway

    • Timestream for Amazon Timestream

    • VirtualMachine for VMware virtual machines

  • by_created_before (Optional[timestamp], default: None ) –

    Returns only restore jobs that were created before the specified date.

  • by_created_after (Optional[timestamp], default: None ) –

    Returns only restore jobs that were created after the specified date.

  • by_status (Optional[RestoreJobStatus], default: None ) –

    Returns only restore jobs associated with the specified job status.

  • by_complete_before (Optional[timestamp], default: None ) –

    Returns only copy jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC).

  • by_complete_after (Optional[timestamp], default: None ) –

    Returns only copy jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC).

  • by_restore_testing_plan_arn (Optional[ARN], default: None ) –

    This returns only restore testing jobs that match the specified resource Amazon Resource Name (ARN).

  • by_parent_job_id (Optional[string], default: None ) –

    This is a filter to list child (nested) restore jobs based on parent restore job ID.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def list_restore_jobs(
    self,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    next_token: Optional["capo_backup.types.string.string"] = None,
    max_results: Optional["capo_backup.types.max_results.MaxResults"] = None,
    by_account_id: Optional["capo_backup.types.account_id.AccountId"] = None,
    by_resource_type: Optional[
        "capo_backup.types.resource_type.ResourceType"
    ] = None,
    by_created_before: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_created_after: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_status: Optional[
        "capo_backup.types.restore_job_status.RestoreJobStatus"
    ] = None,
    by_complete_before: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_complete_after: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_restore_testing_plan_arn: Optional["capo_backup.types.arn.ARN"] = None,
    by_parent_job_id: Optional["capo_backup.types.string.string"] = None,
) -> "capo_backup.types.list_restore_jobs_output.ListRestoreJobsOutput":
    """<p>Returns a list of jobs that Backup initiated to restore a saved resource, including details about the recovery process.</p>

    Args:
        next_token: <p>The next item following a partial list of returned items. For example, if a request is made to return <code>MaxResults</code> number of items, <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 items to be returned.</p>
        by_account_id: <p>The account ID to list the jobs from. Returns only restore jobs associated with the specified account ID.</p>
        by_resource_type: <p>Include this parameter to return only restore jobs for the specified resources:</p> <ul> <li> <p> <code>Aurora</code> for Amazon Aurora</p> </li> <li> <p> <code>CloudFormation</code> for CloudFormation</p> </li> <li> <p> <code>DocumentDB</code> for Amazon DocumentDB (with MongoDB compatibility)</p> </li> <li> <p> <code>DynamoDB</code> for Amazon DynamoDB</p> </li> <li> <p> <code>EBS</code> for Amazon Elastic Block Store</p> </li> <li> <p> <code>EC2</code> for Amazon Elastic Compute Cloud</p> </li> <li> <p> <code>EFS</code> for Amazon Elastic File System</p> </li> <li> <p> <code>EKS</code> for Amazon Elastic Kubernetes Service</p> </li> <li> <p> <code>FSx</code> for Amazon FSx</p> </li> <li> <p> <code>Neptune</code> for Amazon Neptune</p> </li> <li> <p> <code>RDS</code> for Amazon Relational Database Service</p> </li> <li> <p> <code>Redshift</code> for Amazon Redshift</p> </li> <li> <p> <code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p> </li> <li> <p> <code>SAP HANA on Amazon EC2</code> for SAP HANA databases on Amazon Elastic Compute Cloud instances</p> </li> <li> <p> <code>Storage Gateway</code> for Storage Gateway</p> </li> <li> <p> <code>Timestream</code> for Amazon Timestream</p> </li> <li> <p> <code>VirtualMachine</code> for VMware virtual machines</p> </li> </ul>
        by_created_before: <p>Returns only restore jobs that were created before the specified date.</p>
        by_created_after: <p>Returns only restore jobs that were created after the specified date.</p>
        by_status: <p>Returns only restore jobs associated with the specified job status.</p>
        by_complete_before: <p>Returns only copy jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC).</p>
        by_complete_after: <p>Returns only copy jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC).</p>
        by_restore_testing_plan_arn: <p>This returns only restore testing jobs that match the specified resource Amazon Resource Name (ARN).</p>
        by_parent_job_id: <p>This is a filter to list child (nested) restore jobs based on parent restore job ID.</p>

    Raises:
        capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
        capo_backup.errors.missing_parameter_value_exception.MissingParameterValueException: <p>Indicates that a required parameter is missing.</p>
        capo_backup.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action doesn't exist.</p>
        capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
        capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup.types.list_restore_jobs_input.ListRestoreJobsInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.list_restore_jobs_output.ListRestoreJobsOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_restore_jobs

        (
            output,
            http_response,
        ) = await capo_backup._operations.cryo_controller_user_manager.list_restore_jobs.async_list_restore_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListRestoreJobs")
    )
    input_: capo_backup.types.list_restore_jobs_input.ListRestoreJobsInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if by_account_id is not None:
        input_["by_account_id"] = by_account_id
    if by_resource_type is not None:
        input_["by_resource_type"] = by_resource_type
    if by_created_before is not None:
        input_["by_created_before"] = by_created_before
    if by_created_after is not None:
        input_["by_created_after"] = by_created_after
    if by_status is not None:
        input_["by_status"] = by_status
    if by_complete_before is not None:
        input_["by_complete_before"] = by_complete_before
    if by_complete_after is not None:
        input_["by_complete_after"] = by_complete_after
    if by_restore_testing_plan_arn is not None:
        input_["by_restore_testing_plan_arn"] = by_restore_testing_plan_arn
    if by_parent_job_id is not None:
        input_["by_parent_job_id"] = by_parent_job_id

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