listModelCards method
List existing model cards.
Parameter creationTimeAfter :
Only list model cards that were created after the time specified.
Parameter creationTimeBefore :
Only list model cards that were created before the time specified.
Parameter maxResults :
The maximum number of model cards to list.
Parameter modelCardStatus :
Only list model cards with the specified approval status.
Parameter nameContains :
Only list model cards with names that contain the specified string.
Parameter nextToken :
If the response to a previous ListModelCards request was
truncated, the response includes a NextToken. To retrieve the
next set of model cards, use the token in the next request.
Parameter sortBy :
Sort model cards by either name or creation time. Sorts by creation time
by default.
Parameter sortOrder :
Sort model cards by ascending or descending order.
Implementation
Future<ListModelCardsResponse> listModelCards({
DateTime? creationTimeAfter,
DateTime? creationTimeBefore,
int? maxResults,
ModelCardStatus? modelCardStatus,
String? nameContains,
String? nextToken,
ModelCardSortBy? sortBy,
ModelCardSortOrder? sortOrder,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.ListModelCards'
};
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 (maxResults != null) 'MaxResults': maxResults,
if (modelCardStatus != null) 'ModelCardStatus': modelCardStatus.value,
if (nameContains != null) 'NameContains': nameContains,
if (nextToken != null) 'NextToken': nextToken,
if (sortBy != null) 'SortBy': sortBy.value,
if (sortOrder != null) 'SortOrder': sortOrder.value,
},
);
return ListModelCardsResponse.fromJson(jsonResponse.body);
}