list_harvest_jobs
async
¶
list_harvest_jobs(
channel_group_name: ResourceName,
*,
config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
channel_name: Optional[ResourceName] = None,
origin_endpoint_name: Optional[ResourceName] = None,
status: Optional[HarvestJobStatus] = None,
max_results: Optional[ListResourceMaxResults] = None,
next_token: Optional[str] = None,
) -> ListHarvestJobsResponse
Retrieves a list of harvest jobs that match the specified criteria.
Parameters:
-
channel_group_name(ResourceName) –The name of the channel group to filter the harvest jobs by. If specified, only harvest jobs associated with channels in this group will be returned.
-
channel_name(Optional[ResourceName], default:None) –The name of the channel to filter the harvest jobs by. If specified, only harvest jobs associated with this channel will be returned.
-
origin_endpoint_name(Optional[ResourceName], default:None) –The name of the origin endpoint to filter the harvest jobs by. If specified, only harvest jobs associated with this origin endpoint will be returned.
-
status(Optional[HarvestJobStatus], default:None) –The status to filter the harvest jobs by. If specified, only harvest jobs with this status will be returned.
-
max_results(Optional[ListResourceMaxResults], default:None) –The maximum number of harvest jobs to return in a single request. If not specified, a default value will be used.
-
next_token(Optional[str], default:None) –A token used for pagination. Provide this value in subsequent requests to retrieve the next set of results.
Raises:
-
AccessDeniedException–Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.
-
InternalServerException–Indicates that an error from the service occurred while trying to process a request.
-
ResourceNotFoundException–The specified resource doesn't exist.
-
ThrottlingException–The request throughput limit was exceeded.
-
ValidationException–The input failed to meet the constraints specified by the AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
ListHarvestJobs: Specify ChannelGroup only
>>> await client.list_harvest_jobs(channel_group_name='exampleChannelGroup')
ListHarvestJobs: Specify ChannelGroup, Channel only
>>> await client.list_harvest_jobs(channel_group_name='exampleChannelGroup', channel_name='exampleChannelName')
ListHarvestJobs: Specify ChannelGroup, Channel, OriginEndpoint
>>> await client.list_harvest_jobs(channel_group_name='exampleChannelGroup', channel_name='exampleChannelName', origin_endpoint_name='exampleOriginEndpointName')
ListHarvestJobs: Specify ChannelGroup, Channel, OriginEndpoint + Status filter
>>> await client.list_harvest_jobs(channel_group_name='exampleChannelGroup', channel_name='exampleChannelName', origin_endpoint_name='exampleOriginEndpointName', status='QUEUED')
ListHarvestJobs: Empty response
>>> await client.list_harvest_jobs(channel_group_name='exampleChannelGroup', channel_name='exampleChannelName', origin_endpoint_name='exampleOriginEndpointName')
Source code in docs_src/capo_mediapackagev2/_services/async_media_package_v2.py
2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 | |