listModelInvocationJobs method
Lists all batch inference jobs in the account. For more information, see View details about a batch inference job.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results to return. If there are more results than
the number that you specify, a nextToken value is returned.
Use the nextToken in a request to return the next batch of
results.
Parameter nameContains :
Specify a string to filter for batch inference jobs whose names contain
the string.
Parameter nextToken :
If there were more results than the value you specified in the
maxResults field in a previous
ListModelInvocationJobs request, the response would have
returned a nextToken value. To see the next batch of results,
send the nextToken value in another request.
Parameter sortBy :
An attribute by which to sort the results.
Parameter sortOrder :
Specifies whether to sort the results by ascending or descending order.
Parameter statusEquals :
Specify a status to filter for batch inference jobs whose statuses match
the string you specify.
The following statuses are possible:
- Submitted – This job has been submitted to a queue for validation.
-
Validating – This job is being validated for the requirements described in
Format
and upload your batch inference data. The criteria include the
following:
- Your IAM service role has access to the Amazon S3 buckets containing your files.
-
Your files are .jsonl files and each individual record is a JSON object in
the correct format. Note that validation doesn't check if the
modelInputvalue matches the request body for the model. - Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock.
- Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn.
- Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request.
- InProgress – This job has begun. You can start viewing the results in the output S3 location.
- Completed – This job has successfully completed. View the output files in the output S3 location.
- PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location.
- Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web Services Support Center.
- Stopped – This job was stopped by a user.
- Stopping – This job is being stopped by a user.
Parameter submitTimeAfter :
Specify a time to filter for batch inference jobs that were submitted
after the time you specify.
Parameter submitTimeBefore :
Specify a time to filter for batch inference jobs that were submitted
before the time you specify.
Implementation
Future<ListModelInvocationJobsResponse> listModelInvocationJobs({
int? maxResults,
String? nameContains,
String? nextToken,
SortJobsBy? sortBy,
SortOrder? sortOrder,
ModelInvocationJobStatus? statusEquals,
DateTime? submitTimeAfter,
DateTime? submitTimeBefore,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nameContains != null) 'nameContains': [nameContains],
if (nextToken != null) 'nextToken': [nextToken],
if (sortBy != null) 'sortBy': [sortBy.value],
if (sortOrder != null) 'sortOrder': [sortOrder.value],
if (statusEquals != null) 'statusEquals': [statusEquals.value],
if (submitTimeAfter != null)
'submitTimeAfter': [_s.iso8601ToJson(submitTimeAfter).toString()],
if (submitTimeBefore != null)
'submitTimeBefore': [_s.iso8601ToJson(submitTimeBefore).toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/model-invocation-jobs',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListModelInvocationJobsResponse.fromJson(response);
}