listNamedShadowsForThing method

Future<ListNamedShadowsForThingResponse> listNamedShadowsForThing({
  1. required String thingName,
  2. String? nextToken,
  3. int? pageSize,
})

Lists the shadows for the specified thing.

May throw ResourceNotFoundException. May throw InvalidRequestException. May throw ThrottlingException. May throw UnauthorizedException. May throw ServiceUnavailableException. May throw InternalFailureException. May throw MethodNotAllowedException.

Parameter thingName : The name of the thing.

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

Parameter pageSize : The result page size.

Implementation

Future<ListNamedShadowsForThingResponse> listNamedShadowsForThing({
  required String thingName,
  String? nextToken,
  int? pageSize,
}) async {
  ArgumentError.checkNotNull(thingName, 'thingName');
  _s.validateStringLength(
    'thingName',
    thingName,
    1,
    128,
    isRequired: true,
  );
  _s.validateNumRange(
    'pageSize',
    pageSize,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (nextToken != null) 'nextToken': [nextToken],
    if (pageSize != null) 'pageSize': [pageSize.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/api/things/shadow/ListNamedShadowsForThing/${Uri.encodeComponent(thingName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListNamedShadowsForThingResponse.fromJson(response);
}