listNamedShadowsForThing method

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

Lists the shadows for the specified thing.

Requires permission to access the ListNamedShadowsForThing action.

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

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 {
  _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);
}