listModelQualityJobDefinitions method

Future<ListModelQualityJobDefinitionsResponse> listModelQualityJobDefinitions({
  1. DateTime? creationTimeAfter,
  2. DateTime? creationTimeBefore,
  3. String? endpointName,
  4. int? maxResults,
  5. String? nameContains,
  6. String? nextToken,
  7. MonitoringJobDefinitionSortKey? sortBy,
  8. SortOrder? sortOrder,
})

Gets a list of model quality monitoring job definitions in your account.

Parameter creationTimeAfter : A filter that returns only model quality monitoring job definitions created after the specified time.

Parameter creationTimeBefore : A filter that returns only model quality monitoring job definitions created before the specified time.

Parameter endpointName : A filter that returns only model quality monitoring job definitions that are associated with the specified endpoint.

Parameter maxResults : The maximum number of results to return in a call to ListModelQualityJobDefinitions.

Parameter nameContains : A string in the transform job name. This filter returns only model quality monitoring job definitions whose name contains the specified string.

Parameter nextToken : If the result of the previous ListModelQualityJobDefinitions request was truncated, the response includes a NextToken. To retrieve the next set of model quality monitoring job definitions, use the token in the next request.

Parameter sortBy : The field to sort results by. The default is CreationTime.

Parameter sortOrder : The sort order for results. The default is Descending.

Implementation

Future<ListModelQualityJobDefinitionsResponse>
    listModelQualityJobDefinitions({
  DateTime? creationTimeAfter,
  DateTime? creationTimeBefore,
  String? endpointName,
  int? maxResults,
  String? nameContains,
  String? nextToken,
  MonitoringJobDefinitionSortKey? sortBy,
  SortOrder? sortOrder,
}) async {
  _s.validateStringLength(
    'endpointName',
    endpointName,
    0,
    63,
  );
  _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.ListModelQualityJobDefinitions'
  };
  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 (endpointName != null) 'EndpointName': endpointName,
      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 ListModelQualityJobDefinitionsResponse.fromJson(jsonResponse.body);
}