listModelCardExportJobs method

Future<ListModelCardExportJobsResponse> listModelCardExportJobs({
  1. required String modelCardName,
  2. DateTime? creationTimeAfter,
  3. DateTime? creationTimeBefore,
  4. int? maxResults,
  5. String? modelCardExportJobNameContains,
  6. int? modelCardVersion,
  7. String? nextToken,
  8. ModelCardExportJobSortBy? sortBy,
  9. ModelCardExportJobSortOrder? sortOrder,
  10. ModelCardExportJobStatus? statusEquals,
})

List the export jobs for the Amazon SageMaker Model Card.

Parameter modelCardName : List export jobs for the model card with the specified name.

Parameter creationTimeAfter : Only list model card export jobs that were created after the time specified.

Parameter creationTimeBefore : Only list model card export jobs that were created before the time specified.

Parameter maxResults : The maximum number of model card export jobs to list.

Parameter modelCardExportJobNameContains : Only list model card export jobs with names that contain the specified string.

Parameter modelCardVersion : List export jobs for the model card with the specified version.

Parameter nextToken : If the response to a previous ListModelCardExportJobs request was truncated, the response includes a NextToken. To retrieve the next set of model card export jobs, use the token in the next request.

Parameter sortBy : Sort model card export jobs by either name or creation time. Sorts by creation time by default.

Parameter sortOrder : Sort model card export jobs by ascending or descending order.

Parameter statusEquals : Only list model card export jobs with the specified status.

Implementation

Future<ListModelCardExportJobsResponse> listModelCardExportJobs({
  required String modelCardName,
  DateTime? creationTimeAfter,
  DateTime? creationTimeBefore,
  int? maxResults,
  String? modelCardExportJobNameContains,
  int? modelCardVersion,
  String? nextToken,
  ModelCardExportJobSortBy? sortBy,
  ModelCardExportJobSortOrder? sortOrder,
  ModelCardExportJobStatus? statusEquals,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.ListModelCardExportJobs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ModelCardName': modelCardName,
      if (creationTimeAfter != null)
        'CreationTimeAfter': unixTimestampToJson(creationTimeAfter),
      if (creationTimeBefore != null)
        'CreationTimeBefore': unixTimestampToJson(creationTimeBefore),
      if (maxResults != null) 'MaxResults': maxResults,
      if (modelCardExportJobNameContains != null)
        'ModelCardExportJobNameContains': modelCardExportJobNameContains,
      if (modelCardVersion != null) 'ModelCardVersion': modelCardVersion,
      if (nextToken != null) 'NextToken': nextToken,
      if (sortBy != null) 'SortBy': sortBy.value,
      if (sortOrder != null) 'SortOrder': sortOrder.value,
      if (statusEquals != null) 'StatusEquals': statusEquals.value,
    },
  );

  return ListModelCardExportJobsResponse.fromJson(jsonResponse.body);
}