listImages method
- DateTime? creationTimeAfter,
- DateTime? creationTimeBefore,
- DateTime? lastModifiedTimeAfter,
- DateTime? lastModifiedTimeBefore,
- int? maxResults,
- String? nameContains,
- String? nextToken,
- ImageSortBy? sortBy,
- ImageSortOrder? sortOrder,
Lists the images in your account and their properties. The list can be filtered by creation time or modified time, and whether the image name contains a specified string.
Parameter creationTimeAfter
:
A filter that returns only images created on or after the specified time.
Parameter creationTimeBefore
:
A filter that returns only images created on or before the specified time.
Parameter lastModifiedTimeAfter
:
A filter that returns only images modified on or after the specified time.
Parameter lastModifiedTimeBefore
:
A filter that returns only images modified on or before the specified
time.
Parameter maxResults
:
The maximum number of images to return in the response. The default value
is 10.
Parameter nameContains
:
A filter that returns only images whose name contains the specified
string.
Parameter nextToken
:
If the previous call to ListImages
didn't return the full set
of images, the call returns a token for getting the next set of images.
Parameter sortBy
:
The property used to sort results. The default value is
CREATION_TIME
.
Parameter sortOrder
:
The sort order. The default value is DESCENDING
.
Implementation
Future<ListImagesResponse> listImages({
DateTime? creationTimeAfter,
DateTime? creationTimeBefore,
DateTime? lastModifiedTimeAfter,
DateTime? lastModifiedTimeBefore,
int? maxResults,
String? nameContains,
String? nextToken,
ImageSortBy? sortBy,
ImageSortOrder? sortOrder,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nameContains',
nameContains,
0,
63,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
8192,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.ListImages'
};
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 (sortBy != null) 'SortBy': sortBy.toValue(),
if (sortOrder != null) 'SortOrder': sortOrder.toValue(),
},
);
return ListImagesResponse.fromJson(jsonResponse.body);
}