Skip to content

describe_jobs async

describe_jobs(
    *,
    config_overrides: Optional[AsyncdrsClientConfig] = None,
    filters: Optional[DescribeJobsRequestFilters] = None,
    max_results: Optional[StrictlyPositiveInteger] = None,
    next_token: Optional[PaginationToken] = None,
) -> DescribeJobsResponse

Returns a list of Jobs. Use the JobsID and fromDate and toDate filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are created by the StartRecovery, TerminateRecoveryInstances and StartFailbackLaunch APIs. Jobs are also created by DiagnosticLaunch and TerminateDiagnosticInstances, which are APIs available only to *Support* and only used in response to relevant support tickets.

Parameters:

Raises:

Source code in docs_src/capo_drs/_services/async_drs.py
async def describe_jobs(
    self,
    *,
    config_overrides: Optional[AsyncdrsClientConfig] = None,
    filters: Optional[
        "capo_drs.types.describe_jobs_request_filters.DescribeJobsRequestFilters"
    ] = None,
    max_results: Optional[
        "capo_drs.types.strictly_positive_integer.StrictlyPositiveInteger"
    ] = None,
    next_token: Optional["capo_drs.types.pagination_token.PaginationToken"] = None,
) -> "capo_drs.types.describe_jobs_response.DescribeJobsResponse":
    """<p>Returns a list of Jobs. Use the JobsID and fromDate and toDate filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are created by the StartRecovery, TerminateRecoveryInstances and StartFailbackLaunch APIs. Jobs are also created by DiagnosticLaunch and TerminateDiagnosticInstances, which are APIs available only to *Support* and only used in response to relevant support tickets.</p>

    Args:
        filters: <p>A set of filters by which to return Jobs.</p>
        max_results: <p>Maximum number of Jobs to retrieve.</p>
        next_token: <p>The token of the next Job to retrieve.</p>

    Raises:
        capo_drs.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_drs.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_drs.errors.uninitialized_account_exception.UninitializedAccountException: <p>The account performing the request has not been initialized.</p>
        capo_drs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the AWS service.</p>
        capo_drs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_drs.types.describe_jobs_request.DescribeJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_drs.types.describe_jobs_response.DescribeJobsResponse"
    ]:
        import capo_drs._operations.elastic_disaster_recovery_service.describe_jobs

        (
            output,
            http_response,
        ) = await capo_drs._operations.elastic_disaster_recovery_service.describe_jobs.async_describe_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_drs.types.describe_jobs_response.DescribeJobsResponse",
    ) -> dict[str, Any]:
        import capo_drs.types.describe_jobs_response

        return capo_drs.types.describe_jobs_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeJobs", redact_output=_redact_output),
    )
    input_: capo_drs.types.describe_jobs_request.DescribeJobsRequest = {}
    if filters is not None:
        input_["filters"] = filters
    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