listProjects method

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

Lists the AWS IoT 1-Click project(s) associated with your AWS account and region.

May throw InternalFailureException. May throw InvalidRequestException.

Parameter maxResults : The maximum number of results to return per request. If not set, a default value of 100 is used.

Parameter nextToken : The token to retrieve the next set of results.

Implementation

Future<ListProjectsResponse> listProjects({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1024,
  );
  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: '/projects',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListProjectsResponse.fromJson(response);
}