listThingTypes method
Lists the existing thing types.
May throw InvalidRequestException. May throw ThrottlingException. May throw UnauthorizedException. May throw ServiceUnavailableException. May throw InternalFailureException.
Parameter maxResults
:
The maximum number of results to return in this operation.
Parameter nextToken
:
To retrieve the next set of results, the nextToken
value from
a previous response; otherwise null to receive the first set of
results.
Parameter thingTypeName
:
The name of the thing type.
Implementation
Future<ListThingTypesResponse> listThingTypes({
int? maxResults,
String? nextToken,
String? thingTypeName,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
_s.validateStringLength(
'thingTypeName',
thingTypeName,
1,
128,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (thingTypeName != null) 'thingTypeName': [thingTypeName],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/thing-types',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListThingTypesResponse.fromJson(response);
}