listInferenceSchedulers method

Future<ListInferenceSchedulersResponse> listInferenceSchedulers({
  1. String? inferenceSchedulerNameBeginsWith,
  2. int? maxResults,
  3. String? modelName,
  4. String? nextToken,
  5. InferenceSchedulerStatus? status,
})

Retrieves a list of all inference schedulers currently available for your account.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter inferenceSchedulerNameBeginsWith : The beginning of the name of the inference schedulers to be listed.

Parameter maxResults : Specifies the maximum number of inference schedulers to list.

Parameter modelName : The name of the machine learning model used by the inference scheduler to be listed.

Parameter nextToken : An opaque pagination token indicating where to continue the listing of inference schedulers.

Parameter status : Specifies the current status of the inference schedulers.

Implementation

Future<ListInferenceSchedulersResponse> listInferenceSchedulers({
  String? inferenceSchedulerNameBeginsWith,
  int? maxResults,
  String? modelName,
  String? nextToken,
  InferenceSchedulerStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'AWSLookoutEquipmentFrontendService.ListInferenceSchedulers'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (inferenceSchedulerNameBeginsWith != null)
        'InferenceSchedulerNameBeginsWith': inferenceSchedulerNameBeginsWith,
      if (maxResults != null) 'MaxResults': maxResults,
      if (modelName != null) 'ModelName': modelName,
      if (nextToken != null) 'NextToken': nextToken,
      if (status != null) 'Status': status.value,
    },
  );

  return ListInferenceSchedulersResponse.fromJson(jsonResponse.body);
}