listPortals method

Future<ListPortalsResponse> listPortals({
  1. int? maxResults,
  2. String? nextToken,
})

Retrieves a paginated list of IoT SiteWise Monitor portals.

May throw InternalFailureException. May throw InvalidRequestException. May throw ThrottlingException.

Parameter maxResults : The maximum number of results to return for each paginated request.

Default: 50

Parameter nextToken : The token to be used for the next set of paginated results.

Implementation

Future<ListPortalsResponse> listPortals({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/portals',
    queryParams: $query,
    hostPrefix: 'monitor.',
    exceptionFnMap: _exceptionFns,
  );
  return ListPortalsResponse.fromJson(response);
}