listModelCustomizationJobs method
Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.
For more information, see Custom models in the Amazon Bedrock User Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter creationTimeAfter :
Return customization jobs created after the specified time.
Parameter creationTimeBefore :
Return customization jobs created before the specified time.
Parameter maxResults :
The maximum number of results to return in the response. If the total
number of results is greater than this value, use the token returned in
the response in the nextToken field when making another
request to return the next batch of results.
Parameter nameContains :
Return customization jobs only if the job name contains these characters.
Parameter nextToken :
If the total number of results is greater than the maxResults
value provided in the request, enter the token returned in the
nextToken field in the response in this field to return the
next batch of results.
Parameter sortBy :
The field to sort by in the returned list of jobs.
Parameter sortOrder :
The sort order of the results.
Parameter statusEquals :
Return customization jobs with the specified status.
Implementation
Future<ListModelCustomizationJobsResponse> listModelCustomizationJobs({
DateTime? creationTimeAfter,
DateTime? creationTimeBefore,
int? maxResults,
String? nameContains,
String? nextToken,
SortJobsBy? sortBy,
SortOrder? sortOrder,
FineTuningJobStatus? statusEquals,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (creationTimeAfter != null)
'creationTimeAfter': [_s.iso8601ToJson(creationTimeAfter).toString()],
if (creationTimeBefore != null)
'creationTimeBefore': [_s.iso8601ToJson(creationTimeBefore).toString()],
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],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/model-customization-jobs',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListModelCustomizationJobsResponse.fromJson(response);
}