Skip to content

list_harvest_jobs async

list_harvest_jobs(
    *,
    config_overrides: Optional[AsyncMediaPackageClientConfig] = None,
    include_channel_id: Optional[__string] = None,
    include_status: Optional[__string] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[__string] = None,
) -> ListHarvestJobsResponse

Returns a collection of HarvestJob records.

Parameters:

  • include_channel_id (Optional[__string], default: None ) –

    When specified, the request will return only HarvestJobs associated with the given Channel ID.

  • include_status (Optional[__string], default: None ) –

    When specified, the request will return only HarvestJobs in the given status.

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

    The upper bound on the number of records to return.

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

    A token used to resume pagination from the end of a previous request.

Raises:

Source code in docs_src/capo_mediapackage/_services/async_media_package.py
async def list_harvest_jobs(
    self,
    *,
    config_overrides: Optional[AsyncMediaPackageClientConfig] = None,
    include_channel_id: Optional[
        "capo_mediapackage.types.__string.__string"
    ] = None,
    include_status: Optional["capo_mediapackage.types.__string.__string"] = None,
    max_results: Optional["capo_mediapackage.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_mediapackage.types.__string.__string"] = None,
) -> "capo_mediapackage.types.list_harvest_jobs_response.ListHarvestJobsResponse":
    """Returns a collection of HarvestJob records.

    Args:
        include_channel_id: When specified, the request will return only HarvestJobs associated with the given Channel ID.
        include_status: When specified, the request will return only HarvestJobs in the given status.
        max_results: The upper bound on the number of records to return.
        next_token: A token used to resume pagination from the end of a previous request.

    Raises:
        capo_mediapackage.errors.forbidden_exception.ForbiddenException: The client is not authorized to access the requested resource.
        capo_mediapackage.errors.internal_server_error_exception.InternalServerErrorException: An unexpected error occurred.
        capo_mediapackage.errors.not_found_exception.NotFoundException: The requested resource does not exist.
        capo_mediapackage.errors.service_unavailable_exception.ServiceUnavailableException: An unexpected error occurred.
        capo_mediapackage.errors.too_many_requests_exception.TooManyRequestsException: The client has exceeded their resource or throttling limits.
        capo_mediapackage.errors.unprocessable_entity_exception.UnprocessableEntityException: The parameters sent in the request are not valid.
        capo_mediapackage.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediapackage.types.list_harvest_jobs_request.ListHarvestJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediapackage.types.list_harvest_jobs_response.ListHarvestJobsResponse"
    ]:
        import capo_mediapackage._operations.media_package.list_harvest_jobs

        (
            output,
            http_response,
        ) = await capo_mediapackage._operations.media_package.list_harvest_jobs.async_list_harvest_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListHarvestJobs")
    )
    input_: capo_mediapackage.types.list_harvest_jobs_request.ListHarvestJobsRequest = {}
    if include_channel_id is not None:
        input_["include_channel_id"] = include_channel_id
    if include_status is not None:
        input_["include_status"] = include_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