listDiscoveredDevices method

Future<ListDiscoveredDevicesResponse> listDiscoveredDevices({
  1. required String identifier,
  2. int? maxResults,
  3. String? nextToken,
})

Lists all devices discovered during a specific device discovery task.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedException. May throw ValidationException.

Parameter identifier : The identifier of the device discovery job to list discovered devices for.

Parameter maxResults : The maximum number of discovered devices to return in a single response.

Parameter nextToken : A token used for pagination of results.

Implementation

Future<ListDiscoveredDevicesResponse> listDiscoveredDevices({
  required String identifier,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  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:
        '/device-discoveries/${Uri.encodeComponent(identifier)}/devices',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDiscoveredDevicesResponse.fromJson(response);
}