list_service_jobs
¶
list_service_jobs(
*,
config_overrides: Optional[BatchClientConfig] = None,
job_queue: Optional[String] = None,
job_status: Optional[ServiceJobStatus] = None,
max_results: Optional[Integer] = None,
next_token: Optional[String] = None,
filters: Optional[ListJobsFilterList] = None,
) -> ListServiceJobsResponse
Returns a list of service jobs for a specified job queue.
Parameters:
-
job_queue(Optional[String], default:None) –The name or ARN of the job queue with which to list service jobs.
-
job_status(Optional[ServiceJobStatus], default:None) –The job status used to filter service jobs in the specified queue. If the
filtersparameter is specified, thejobStatusparameter is ignored and jobs with any status are returned. The exceptions are theSHARE_IDENTIFIERfilter andQUOTA_SHARE_NAMEfilter, which can be used withjobStatus. If you don't specify a status, onlyRUNNINGjobs are returned.The
SHARE_IDENTIFIERfilter orQUOTA_SHARE_NAMEfilter can be used with thejobStatusfield to filter results. -
max_results(Optional[Integer], default:None) –The maximum number of results returned by
ListServiceJobsin paginated output. When this parameter is used,ListServiceJobsonly returnsmaxResultsresults in a single page and anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListServiceJobsrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn't used, thenListServiceJobsreturns up to 100 results and anextTokenvalue if applicable. -
next_token(Optional[String], default:None) –The
nextTokenvalue returned from a previous paginatedListServiceJobsrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. This value isnullwhen there are no more results to return.Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.
-
filters(Optional[ListJobsFilterList], default:None) –The filter to apply to the query. Only one filter can be used at a time. When the filter is used,
jobStatusis ignored with the exception thatSHARE_IDENTIFIERorQUOTA_SHARE_NAMEandjobStatuscan be used together. The results are sorted by thecreatedAtfield, with the most recent jobs being first.The
SHARE_IDENTIFIERorQUOTA_SHARE_NAMEfilter and thejobStatusfield can be used together to filter results.- JOB_NAME
-
The value of the filter is a case-insensitive match for the job name. If the value ends with an asterisk (*), the filter matches any job name that begins with the string before the '*'. This corresponds to the
jobNamevalue. For example,test1matches bothTest1andtest1, andtest1*matches bothtest1andTest10. When theJOB_NAMEfilter is used, the results are grouped by the job name and version. - BEFORE_CREATED_AT
-
The value for the filter is the time that's before the job was created. This corresponds to the
createdAtvalue. The value is a string representation of the number of milliseconds since 00:00:00 UTC (midnight) on January 1, 1970. - AFTER_CREATED_AT
-
The value for the filter is the time that's after the job was created. This corresponds to the
createdAtvalue. The value is a string representation of the number of milliseconds since 00:00:00 UTC (midnight) on January 1, 1970. - SHARE_IDENTIFIER
-
The value for the filter is the fairshare scheduling share identifier.
- QUOTA_SHARE_NAME
-
The value for the filter is the quota management share name.
Raises:
-
ClientException–These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.
-
ServerException–These errors are usually caused by a server issue.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_batch/_services/batch.py
2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 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 | |