listProjects method
Retrieves a paginated list of projects for an IoT SiteWise Monitor portal.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ThrottlingException.
Parameter portalId :
The ID of the portal.
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<ListProjectsResponse> listProjects({
required String portalId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
'portalId': [portalId],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/projects',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListProjectsResponse.fromJson(response);
}