The Amazon Location Service Geofences API contains several data types that various actions use. This section describes each data type in detail.
Note
The order of each element in a data type structure is not guaranteed. Applications should not assume a particular order.
The following data types are supported:
• BatchDeleteGeofenceError (p. 38)
• BatchEvaluateGeofencesError (p. 39)
• BatchItemError (p. 40)
• BatchPutGeofenceError (p. 41)
• BatchPutGeofenceRequestEntry (p. 42)
• BatchPutGeofenceSuccess (p. 43)
• DevicePositionUpdate (p. 44)
• GeofenceGeometry (p. 46)
• ListGeofenceCollectionsResponseEntry (p. 47)
• ListGeofenceResponseEntry (p. 49)
• PositionalAccuracy (p. 51)
• ValidationExceptionField (p. 52)
BatchDeleteGeofenceError
BatchDeleteGeofenceError
Contains error details for each geofence that failed to delete from the geofence collection.
Contents
Error
Contains details associated to the batch error.
Type: BatchItemError (p. 40) object Required: Yes
GeofenceId
The geofence associated with the error message.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern: ^[-._\p{L}\p{N}]+$
Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
BatchEvaluateGeofencesError
BatchEvaluateGeofencesError
Contains error details for each device that failed to evaluate its position against the geofences in a given geofence collection.
Contents
DeviceId
The device associated with the position evaluation error.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern: ^[-._\p{L}\p{N}]+$
Required: Yes Error
Contains details associated to the batch error.
Type: BatchItemError (p. 40) object Required: Yes
SampleTime
Specifies a timestamp for when the error occurred in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ
Type: Timestamp Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
BatchItemError
BatchItemError
Contains the batch request error details associated with the request.
Contents
Code
The error code associated with the batch request error.
Type: String
Valid Values: AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError
Required: No Message
A message with the reason for the batch request error.
Type: String Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
BatchPutGeofenceError
BatchPutGeofenceError
Contains error details for each geofence that failed to be stored in a given geofence collection.
Contents
Error
Contains details associated to the batch error.
Type: BatchItemError (p. 40) object Required: Yes
GeofenceId
The geofence associated with the error message.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern: ^[-._\p{L}\p{N}]+$
Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
BatchPutGeofenceRequestEntry
BatchPutGeofenceRequestEntry
Contains geofence geometry details.
Contents
GeofenceId
The identifier for the geofence to be stored in a given geofence collection.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern: ^[-._\p{L}\p{N}]+$
Required: Yes Geometry
Contains the polygon details to specify the position of the geofence.
Note
Each geofence polygon can have a maximum of 1,000 vertices.
Type: GeofenceGeometry (p. 46) object Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
BatchPutGeofenceSuccess
BatchPutGeofenceSuccess
Contains a summary of each geofence that was successfully stored in a given geofence collection.
Contents
CreateTime
The timestamp for when the geofence was stored in a geofence collection in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ Type: Timestamp
Required: Yes GeofenceId
The geofence successfully stored in a geofence collection.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern: ^[-._\p{L}\p{N}]+$
Required: Yes UpdateTime
The timestamp for when the geofence was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ
Type: Timestamp Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
DevicePositionUpdate
DevicePositionUpdate
Contains the position update details for a device.
Contents
Accuracy
The accuracy of the device position.
Type: PositionalAccuracy (p. 51) object Required: No
DeviceId
The device associated to the position update.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern: ^[-._\p{L}\p{N}]+$
Required: Yes Position
The latest device position defined in WGS 84 format: [X or longitude, Y or latitude].
Type: Array of doubles
Array Members: Fixed number of 2 items.
Required: Yes PositionProperties
Associates one of more properties with the position update. A property is a key-value pair stored with the position update and added to any geofence event the update may trigger.
Format: "key" : "value"
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 3 items.
Key Length Constraints: Minimum length of 1. Maximum length of 20.
Value Length Constraints: Minimum length of 1. Maximum length of 40.
Required: No SampleTime
The timestamp at which the device's position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ
Type: Timestamp Required: Yes
See Also
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
GeofenceGeometry
GeofenceGeometry
Contains the geofence geometry details.
NoteAmazon Location doesn't currently support polygons with holes, multipolygons, polygons that are wound clockwise, or that cross the antimeridian.
Contents
Polygon
An array of 1 or more linear rings. A linear ring is an array of 4 or more vertices, where the first and last vertex are the same to form a closed boundary. Each vertex is a 2-dimensional point of the form:
[longitude, latitude].
The first linear ring is an outer ring, describing the polygon's boundary. Subsequent linear rings may be inner or outer rings to describe holes and islands. Outer rings must list their vertices in counter-clockwise order around the ring's center, where the left side is the polygon's exterior. Inner rings must list their vertices in clockwise order, where the left side is the polygon's interior.
Type: Array of arrays of arrays of doubles Array Members: Minimum number of 1 item.
Array Members: Minimum number of 4 items.
Array Members: Fixed number of 2 items.
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
ListGeofenceCollectionsResponseEntry
ListGeofenceCollectionsResponseEntry
Contains the geofence collection details.
Contents
CollectionName
The name of the geofence collection.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern: ^[-._\w]+$
Required: Yes CreateTime
The timestamp for when the geofence collection was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ
Type: Timestamp Required: Yes Description
The description for the geofence collection Type: String
Length Constraints: Minimum length of 0. Maximum length of 1000.
Required: Yes PricingPlan
This member has been deprecated.
No longer used. Always returns RequestBasedUsage.
Type: String
Valid Values: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement Required: No
PricingPlanDataSource
This member has been deprecated.
No longer used. Always returns an empty string.
Type: String Required: No UpdateTime
Specifies a timestamp for when the resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ
See Also
Type: Timestamp Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
ListGeofenceResponseEntry
ListGeofenceResponseEntry
Contains a list of geofences stored in a given geofence collection.
Contents
CreateTime
The timestamp for when the geofence was stored in a geofence collection in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ Type: Timestamp
Required: Yes GeofenceId
The geofence identifier.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern: ^[-._\p{L}\p{N}]+$
Required: Yes Geometry
Contains the geofence geometry details describing a polygon.
Type: GeofenceGeometry (p. 46) object Required: Yes
Status
Identifies the state of the geofence. A geofence will hold one of the following states:
• ACTIVE — The geofence has been indexed by the system.
• PENDING — The geofence is being processed by the system.
• FAILED — The geofence failed to be indexed by the system.
• DELETED — The geofence has been deleted from the system index.
• DELETING — The geofence is being deleted from the system index.
Type: String Required: Yes UpdateTime
The timestamp for when the geofence was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ
Type: Timestamp Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
See Also
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
PositionalAccuracy
PositionalAccuracy
Defines the level of certainty of the position.
Contents
Horizontal
Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth's surface.
Type: Double
Valid Range: Minimum value of 0. Maximum value of 10000.
Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
ValidationExceptionField
ValidationExceptionField
The input failed to meet the constraints specified by the AWS service in a specified field.
Contents
message
A message with the reason for the validation exception error.
Type: String Required: Yes name
The field name where the invalid entry was detected.
Type: String Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3