Skip to content

list_copy_jobs async

list_copy_jobs(
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    next_token: Optional[string] = None,
    max_results: Optional[MaxResults] = None,
    by_resource_arn: Optional[ARN] = None,
    by_state: Optional[CopyJobState] = None,
    by_created_before: Optional[timestamp] = None,
    by_created_after: Optional[timestamp] = None,
    by_resource_type: Optional[ResourceType] = None,
    by_destination_vault_arn: Optional[string] = None,
    by_account_id: Optional[AccountId] = None,
    by_complete_before: Optional[timestamp] = None,
    by_complete_after: Optional[timestamp] = None,
    by_parent_job_id: Optional[string] = None,
    by_message_category: Optional[string] = None,
    by_source_recovery_point_arn: Optional[string] = None,
) -> ListCopyJobsOutput

Returns metadata about your copy jobs.

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_resource_arn (Optional[ARN], default: None ) –

    Returns only copy jobs that match the specified resource Amazon Resource Name (ARN).

  • by_state (Optional[CopyJobState], default: None ) –

    Returns only copy jobs that are in the specified state.

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

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

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

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

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

    Returns only backup 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_destination_vault_arn (Optional[string], default: None ) –

    An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault.

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

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

  • 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_parent_job_id (Optional[string], default: None ) –

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

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

    This is an optional parameter that can be used to filter out jobs with a MessageCategory which matches the value you input.

    Example strings may include AccessDenied, SUCCESS, AGGREGATE_ALL, and INVALIDPARAMETERS.

    View Monitoring for a list of accepted strings.

    The the value ANY returns count of all message categories.

    AGGREGATE_ALL aggregates job counts for all message categories and returns the sum.

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

    Filters copy jobs by the specified source recovery point ARN.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def list_copy_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_resource_arn: Optional["capo_backup.types.arn.ARN"] = None,
    by_state: Optional["capo_backup.types.copy_job_state.CopyJobState"] = None,
    by_created_before: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_created_after: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_resource_type: Optional[
        "capo_backup.types.resource_type.ResourceType"
    ] = None,
    by_destination_vault_arn: Optional["capo_backup.types.string.string"] = None,
    by_account_id: Optional["capo_backup.types.account_id.AccountId"] = None,
    by_complete_before: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_complete_after: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_parent_job_id: Optional["capo_backup.types.string.string"] = None,
    by_message_category: Optional["capo_backup.types.string.string"] = None,
    by_source_recovery_point_arn: Optional[
        "capo_backup.types.string.string"
    ] = None,
) -> "capo_backup.types.list_copy_jobs_output.ListCopyJobsOutput":
    """<p>Returns metadata about your copy jobs.</p>

    Args:
        next_token: <p>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. </p>
        max_results: <p>The maximum number of items to be returned.</p>
        by_resource_arn: <p>Returns only copy jobs that match the specified resource Amazon Resource Name (ARN). </p>
        by_state: <p>Returns only copy jobs that are in the specified state.</p>
        by_created_before: <p>Returns only copy jobs that were created before the specified date.</p>
        by_created_after: <p>Returns only copy jobs that were created after the specified date.</p>
        by_resource_type: <p>Returns only backup 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_destination_vault_arn: <p>An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, <code>arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault</code>. </p>
        by_account_id: <p>The account ID to list the jobs from. Returns only copy jobs associated with the specified account ID.</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_parent_job_id: <p>This is a filter to list child (nested) jobs based on parent job ID.</p>
        by_message_category: <p>This is an optional parameter that can be used to filter out jobs with a MessageCategory which matches the value you input.</p> <p>Example strings may include <code>AccessDenied</code>, <code>SUCCESS</code>, <code>AGGREGATE_ALL</code>, and <code>INVALIDPARAMETERS</code>.</p> <p>View <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html">Monitoring</a> for a list of accepted strings.</p> <p>The the value ANY returns count of all message categories.</p> <p> <code>AGGREGATE_ALL</code> aggregates job counts for all message categories and returns the sum.</p>
        by_source_recovery_point_arn: <p>Filters copy jobs by the specified source recovery point ARN.</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.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_copy_jobs_input.ListCopyJobsInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.list_copy_jobs_output.ListCopyJobsOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_copy_jobs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCopyJobs")
    )
    input_: capo_backup.types.list_copy_jobs_input.ListCopyJobsInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if by_resource_arn is not None:
        input_["by_resource_arn"] = by_resource_arn
    if by_state is not None:
        input_["by_state"] = by_state
    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_resource_type is not None:
        input_["by_resource_type"] = by_resource_type
    if by_destination_vault_arn is not None:
        input_["by_destination_vault_arn"] = by_destination_vault_arn
    if by_account_id is not None:
        input_["by_account_id"] = by_account_id
    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_parent_job_id is not None:
        input_["by_parent_job_id"] = by_parent_job_id
    if by_message_category is not None:
        input_["by_message_category"] = by_message_category
    if by_source_recovery_point_arn is not None:
        input_["by_source_recovery_point_arn"] = by_source_recovery_point_arn

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