listMarketplaceModelEndpoints method

Future<ListMarketplaceModelEndpointsResponse> listMarketplaceModelEndpoints({
  1. int? maxResults,
  2. String? modelSourceEquals,
  3. String? nextToken,
})

Lists the endpoints for models from Amazon Bedrock Marketplace in your Amazon Web Services account.

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

Parameter maxResults : The maximum number of results to return in a single call. If more results are available, the operation returns a NextToken value.

Parameter modelSourceEquals : If specified, only endpoints for the given model source identifier are returned.

Parameter nextToken : The token for the next set of results. You receive this token from a previous ListMarketplaceModelEndpoints call.

Implementation

Future<ListMarketplaceModelEndpointsResponse> listMarketplaceModelEndpoints({
  int? maxResults,
  String? modelSourceEquals,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (modelSourceEquals != null)
      'modelSourceIdentifier': [modelSourceEquals],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/marketplace-model/endpoints',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListMarketplaceModelEndpointsResponse.fromJson(response);
}