listModelCopyJobs method
Returns a list of model copy jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter creationTimeAfter :
Filters for model copy jobs created after the specified time.
Parameter creationTimeBefore :
Filters for model copy 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 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 model copy jobs.
Parameter sortOrder :
Specifies whether to sort the results in ascending or descending order.
Parameter sourceAccountEquals :
Filters for model copy jobs in which the account that the source model
belongs to is equal to the value that you specify.
Parameter sourceModelArnEquals :
Filters for model copy jobs in which the Amazon Resource Name (ARN) of the
source model to is equal to the value that you specify.
Parameter statusEquals :
Filters for model copy jobs whose status matches the value that you
specify.
Parameter targetModelNameContains :
Filters for model copy jobs in which the name of the copied model contains
the string that you specify.
Implementation
Future<ListModelCopyJobsResponse> listModelCopyJobs({
DateTime? creationTimeAfter,
DateTime? creationTimeBefore,
int? maxResults,
String? nextToken,
SortJobsBy? sortBy,
SortOrder? sortOrder,
String? sourceAccountEquals,
String? sourceModelArnEquals,
ModelCopyJobStatus? statusEquals,
String? targetModelNameContains,
}) 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 (nextToken != null) 'nextToken': [nextToken],
if (sortBy != null) 'sortBy': [sortBy.value],
if (sortOrder != null) 'sortOrder': [sortOrder.value],
if (sourceAccountEquals != null)
'sourceAccountEquals': [sourceAccountEquals],
if (sourceModelArnEquals != null)
'sourceModelArnEquals': [sourceModelArnEquals],
if (statusEquals != null) 'statusEquals': [statusEquals.value],
if (targetModelNameContains != null)
'outputModelNameContains': [targetModelNameContains],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/model-copy-jobs',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListModelCopyJobsResponse.fromJson(response);
}