listDevicePositions method

Future<ListDevicePositionsResponse> listDevicePositions({
  1. required String trackerName,
  2. TrackingFilterGeometry? filterGeometry,
  3. int? maxResults,
  4. String? nextToken,
})

A batch request to retrieve all device positions.

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

Parameter trackerName : The tracker resource containing the requested devices.

Parameter filterGeometry : The geometry used to filter device positions.

Parameter maxResults : An optional limit for the number of entries returned in a single call.

Default value: 100

Parameter nextToken : The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

Default value: null

Implementation

Future<ListDevicePositionsResponse> listDevicePositions({
  required String trackerName,
  TrackingFilterGeometry? filterGeometry,
  int? maxResults,
  String? nextToken,
}) async {
  final $payload = <String, dynamic>{
    if (filterGeometry != null) 'FilterGeometry': filterGeometry,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/tracking/v0/trackers/${Uri.encodeComponent(trackerName)}/list-positions',
    exceptionFnMap: _exceptionFns,
  );
  return ListDevicePositionsResponse.fromJson(response);
}