listDevices method

Future<ListDevicesOutput> listDevices({
  1. String? jobId,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of all devices on your Amazon Web Services account that have Amazon Web Services Snow Device Management enabled in the Amazon Web Services Region where the command is run.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter jobId : The ID of the job used to order the device.

Parameter maxResults : The maximum number of devices to list per page.

Parameter nextToken : A pagination token to continue to the next page of results.

Implementation

Future<ListDevicesOutput> listDevices({
  String? jobId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (jobId != null) 'jobId': [jobId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/managed-devices',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDevicesOutput.fromJson(response);
}