listGeofences method
Lists geofences stored in a given geofence collection.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter collectionName :
The name of the geofence collection storing the list of geofences.
Parameter maxResults :
An optional limit for the number of geofences 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<ListGeofencesResponse> listGeofences({
required String collectionName,
int? maxResults,
String? nextToken,
}) async {
final $payload = <String, dynamic>{
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/geofencing/v0/collections/${Uri.encodeComponent(collectionName)}/list-geofences',
hostPrefix: 'geofencing.',
exceptionFnMap: _exceptionFns,
);
return ListGeofencesResponse.fromJson(response);
}