Skip to content

list_earth_observation_jobs async

list_earth_observation_jobs(
    *,
    config_overrides: Optional[AsyncSageMakerGeospatialClientConfig] = None,
    status_equals: Optional[EarthObservationJobStatus] = None,
    sort_order: Optional[SortOrder] = None,
    sort_by: Optional[str] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[int] = None,
) -> ListEarthObservationJobOutput

Use this operation to get a list of the Earth Observation jobs associated with the calling Amazon Web Services account.

Parameters:

  • status_equals (Optional[EarthObservationJobStatus], default: None ) –

    A filter that retrieves only jobs with a specific status.

  • sort_order (Optional[SortOrder], default: None ) –

    An optional value that specifies whether you want the results sorted in Ascending or Descending order.

  • sort_by (Optional[str], default: None ) –

    The parameter by which to sort the results.

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

    If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results.

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

    The total number of items to return.

Raises:

Source code in docs_src/capo_sagemaker_geospatial/_services/async_sage_maker_geospatial.py
async def list_earth_observation_jobs(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerGeospatialClientConfig] = None,
    status_equals: Optional[
        "capo_sagemaker_geospatial.types.earth_observation_job_status.EarthObservationJobStatus"
    ] = None,
    sort_order: Optional[
        "capo_sagemaker_geospatial.types.sort_order.SortOrder"
    ] = None,
    sort_by: Optional[str] = None,
    next_token: Optional[
        "capo_sagemaker_geospatial.types.next_token.NextToken"
    ] = None,
    max_results: Optional[int] = None,
) -> "capo_sagemaker_geospatial.types.list_earth_observation_job_output.ListEarthObservationJobOutput":
    """<p>Use this operation to get a list of the Earth Observation jobs associated with the calling Amazon Web Services account.</p>

    Args:
        status_equals: <p>A filter that retrieves only jobs with a specific status.</p>
        sort_order: <p>An optional value that specifies whether you want the results sorted in <code>Ascending</code> or <code>Descending</code> order.</p>
        sort_by: <p>The parameter by which to sort the results.</p>
        next_token: <p>If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results.</p>
        max_results: <p>The total number of items to return.</p>

    Raises:
        capo_sagemaker_geospatial.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_sagemaker_geospatial.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
        capo_sagemaker_geospatial.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
        capo_sagemaker_geospatial.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_sagemaker_geospatial.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_sagemaker_geospatial.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker_geospatial.types.list_earth_observation_job_input.ListEarthObservationJobInput]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker_geospatial.types.list_earth_observation_job_output.ListEarthObservationJobOutput"
    ]:
        import capo_sagemaker_geospatial._operations.sage_maker_geospatial.list_earth_observation_jobs

        (
            output,
            http_response,
        ) = await capo_sagemaker_geospatial._operations.sage_maker_geospatial.list_earth_observation_jobs.async_list_earth_observation_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_sagemaker_geospatial.types.list_earth_observation_job_input.ListEarthObservationJobInput",
    ) -> dict[str, Any]:
        import capo_sagemaker_geospatial.types.list_earth_observation_job_input

        return capo_sagemaker_geospatial.types.list_earth_observation_job_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_sagemaker_geospatial.types.list_earth_observation_job_output.ListEarthObservationJobOutput",
    ) -> dict[str, Any]:
        import capo_sagemaker_geospatial.types.list_earth_observation_job_output

        return capo_sagemaker_geospatial.types.list_earth_observation_job_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListEarthObservationJobs",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_sagemaker_geospatial.types.list_earth_observation_job_input.ListEarthObservationJobInput = {}
    if status_equals is not None:
        input_["status_equals"] = status_equals
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if sort_by is not None:
        input_["sort_by"] = sort_by
    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