listOptimizationJobs method
- DateTime? creationTimeAfter,
- DateTime? creationTimeBefore,
- DateTime? lastModifiedTimeAfter,
- DateTime? lastModifiedTimeBefore,
- int? maxResults,
- String? nameContains,
- String? nextToken,
- String? optimizationContains,
- ListOptimizationJobsSortBy? sortBy,
- SortOrder? sortOrder,
- OptimizationJobStatus? statusEquals,
Lists the optimization jobs in your account and their properties.
Parameter creationTimeAfter :
Filters the results to only those optimization jobs that were created
after the specified time.
Parameter creationTimeBefore :
Filters the results to only those optimization jobs that were created
before the specified time.
Parameter lastModifiedTimeAfter :
Filters the results to only those optimization jobs that were updated
after the specified time.
Parameter lastModifiedTimeBefore :
Filters the results to only those optimization jobs that were updated
before the specified time.
Parameter maxResults :
The maximum number of optimization jobs to return in the response. The
default is 50.
Parameter nameContains :
Filters the results to only those optimization jobs with a name that
contains the specified string.
Parameter nextToken :
A token that you use to get the next set of results following a truncated
response. If the response to the previous request was truncated, that
response provides the value for this token.
Parameter optimizationContains :
Filters the results to only those optimization jobs that apply the
specified optimization techniques. You can specify either
Quantization or Compilation.
Parameter sortBy :
The field by which to sort the optimization jobs in the response. The
default is CreationTime
Parameter sortOrder :
The sort order for results. The default is Ascending
Parameter statusEquals :
Filters the results to only those optimization jobs with the specified
status.
Implementation
Future<ListOptimizationJobsResponse> listOptimizationJobs({
DateTime? creationTimeAfter,
DateTime? creationTimeBefore,
DateTime? lastModifiedTimeAfter,
DateTime? lastModifiedTimeBefore,
int? maxResults,
String? nameContains,
String? nextToken,
String? optimizationContains,
ListOptimizationJobsSortBy? sortBy,
SortOrder? sortOrder,
OptimizationJobStatus? statusEquals,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.ListOptimizationJobs'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (creationTimeAfter != null)
'CreationTimeAfter': unixTimestampToJson(creationTimeAfter),
if (creationTimeBefore != null)
'CreationTimeBefore': unixTimestampToJson(creationTimeBefore),
if (lastModifiedTimeAfter != null)
'LastModifiedTimeAfter': unixTimestampToJson(lastModifiedTimeAfter),
if (lastModifiedTimeBefore != null)
'LastModifiedTimeBefore': unixTimestampToJson(lastModifiedTimeBefore),
if (maxResults != null) 'MaxResults': maxResults,
if (nameContains != null) 'NameContains': nameContains,
if (nextToken != null) 'NextToken': nextToken,
if (optimizationContains != null)
'OptimizationContains': optimizationContains,
if (sortBy != null) 'SortBy': sortBy.value,
if (sortOrder != null) 'SortOrder': sortOrder.value,
if (statusEquals != null) 'StatusEquals': statusEquals.value,
},
);
return ListOptimizationJobsResponse.fromJson(jsonResponse.body);
}