getExternalModels method

Future<GetExternalModelsResult> getExternalModels({
  1. int? maxResults,
  2. String? modelEndpoint,
  3. String? nextToken,
})

Gets the details for one or more Amazon SageMaker models that have been imported into the service. This is a paginated API. If you provide a null maxResults, this actions retrieves a maximum of 10 records per page. If you provide a maxResults, the value must be between 5 and 10. To get the next page results, provide the pagination token from the GetExternalModelsResult as part of your request. A null pagination token fetches the records from the beginning.

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

Parameter maxResults : The maximum number of objects to return for the request.

Parameter modelEndpoint : The Amazon SageMaker model endpoint.

Parameter nextToken : The next page token for the request.

Implementation

Future<GetExternalModelsResult> getExternalModels({
  int? maxResults,
  String? modelEndpoint,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    5,
    10,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.GetExternalModels'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'maxResults': maxResults,
      if (modelEndpoint != null) 'modelEndpoint': modelEndpoint,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return GetExternalModelsResult.fromJson(jsonResponse.body);
}