Skip to content

list_report_jobs async

list_report_jobs(
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    by_report_plan_name: Optional[ReportPlanName] = None,
    by_creation_before: Optional[timestamp] = None,
    by_creation_after: Optional[timestamp] = None,
    by_status: Optional[string] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[string] = None,
) -> ListReportJobsOutput

Returns details about your report jobs.

Parameters:

  • by_report_plan_name (Optional[ReportPlanName], default: None ) –

    Returns only report jobs with the specified report plan name.

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

    Returns only report jobs that were created before the date and time specified in Unix format and Coordinated Universal Time (UTC). For example, the value 1516925490 represents Friday, January 26, 2018 12:11:30 AM.

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

    Returns only report jobs that were created after the date and time specified in Unix format and Coordinated Universal Time (UTC). For example, the value 1516925490 represents Friday, January 26, 2018 12:11:30 AM.

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

    Returns only report jobs that are in the specified status. The statuses are:

    CREATED | RUNNING | COMPLETED | FAILED | COMPLETED_WITH_ISSUES

    Please note that only scanning jobs finish with state completed with issues. For backup jobs this is a console interpretation of a job that finishes in completed state and has a status message.

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

    The number of desired results from 1 to 1000. Optional. If unspecified, the query will return 1 MB of data.

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

    An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def list_report_jobs(
    self,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    by_report_plan_name: Optional[
        "capo_backup.types.report_plan_name.ReportPlanName"
    ] = None,
    by_creation_before: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_creation_after: Optional["capo_backup.types.timestamp.timestamp"] = None,
    by_status: Optional["capo_backup.types.string.string"] = None,
    max_results: Optional["capo_backup.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_backup.types.string.string"] = None,
) -> "capo_backup.types.list_report_jobs_output.ListReportJobsOutput":
    """<p>Returns details about your report jobs.</p>

    Args:
        by_report_plan_name: <p>Returns only report jobs with the specified report plan name.</p>
        by_creation_before: <p>Returns only report jobs that were created before the date and time specified in Unix format and Coordinated Universal Time (UTC). For example, the value 1516925490 represents Friday, January 26, 2018 12:11:30 AM.</p>
        by_creation_after: <p>Returns only report jobs that were created after the date and time specified in Unix format and Coordinated Universal Time (UTC). For example, the value 1516925490 represents Friday, January 26, 2018 12:11:30 AM.</p>
        by_status: <p>Returns only report jobs that are in the specified status. The statuses are:</p> <p> <code>CREATED | RUNNING | COMPLETED | FAILED | COMPLETED_WITH_ISSUES</code> </p> <p> Please note that only scanning jobs finish with state completed with issues. For backup jobs this is a console interpretation of a job that finishes in completed state and has a status message.</p>
        max_results: <p>The number of desired results from 1 to 1000. Optional. If unspecified, the query will return 1 MB of data.</p>
        next_token: <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.</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.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_report_jobs_input.ListReportJobsInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.list_report_jobs_output.ListReportJobsOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_report_jobs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListReportJobs")
    )
    input_: capo_backup.types.list_report_jobs_input.ListReportJobsInput = {}
    if by_report_plan_name is not None:
        input_["by_report_plan_name"] = by_report_plan_name
    if by_creation_before is not None:
        input_["by_creation_before"] = by_creation_before
    if by_creation_after is not None:
        input_["by_creation_after"] = by_creation_after
    if by_status is not None:
        input_["by_status"] = by_status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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