Tutorial: Delete geofences - Amazon Location Service

Tutorial: Delete geofences

You can delete geofences from a geofence collection using the Amazon Location console, the AWS CLI, or the Amazon Location APIs.

Console

To delete a geofence using the Amazon Location console

Warning

This operation deletes the resource permanently.

  1. Open the Amazon Location console at https://console.aws.amazon.com/location/.

  2. Choose Geofence collections from the left navigation pane.

  3. Under My geofence collection, select the name link of the target geofence collection.

  4. Under Geofences, select the target geofence.

  5. Choose Delete geofence.

API

Use the BatchDeleteGeofence operation from the Amazon Location Geofences APIs.

The following example is an API request to delete geofences from the geofence collection ExampleCollection.

POST /geofencing/v0/collections/ExampleCollection/delete-geofences Content-type: application/json { "GeofenceIds": [ "ExampleGeofence11" ] }

The following is an example success response for BatchDeleteGeofence.

HTTP/1.1 200
CLI

Use the batch-delete-geofence command.

The following example is an AWS CLI command to delete geofences from the geofence collection ExampleCollection.

aws location batch-delete-geofence \ --collection-name "ExampleCollection" \ --geofence-ids "ExampleGeofence11"