resource_positions
Creates, updates, deletes, gets or lists a resource_positions resource.
Overview
| Name | resource_positions |
| Type | Resource |
| Id | aws.iotwireless.resource_positions |
Fields
The following fields are returned by SELECT queries:
- get_resource_position
| Name | Datatype | Description |
|---|---|---|
geo_json_payload | string (byte) | The position information of the resource, displayed as a JSON payload. The payload uses the GeoJSON format, which a format that's used to encode geographic data structures. For more information, see GeoJSON. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_position | select | resource_identifier, resourceType, region | Get the position information for a given wireless device or a wireless gateway resource. The position information uses the World Geodetic System (WGS84). | |
update_resource_position | update | resource_identifier, resourceType, region | Update the position information of a given wireless device or a wireless gateway resource. The position coordinates are based on the World Geodetic System (WGS84). |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resourceType | string | The type of resource for which position information is updated, which can be a wireless device or a wireless gateway. |
resource_identifier | string | The identifier of the resource for which position information is updated. It can be the wireless device ID or the wireless gateway ID, depending on the resource type. |
SELECT examples
- get_resource_position
Get the position information for a given wireless device or a wireless gateway resource. The position information uses the World Geodetic System (WGS84).
SELECT
geo_json_payload
FROM aws.iotwireless.resource_positions
WHERE resource_identifier = '{{ resource_identifier }}' -- required
AND resourceType = '{{ resourceType }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- update_resource_position
Update the position information of a given wireless device or a wireless gateway resource. The position coordinates are based on the World Geodetic System (WGS84).
UPDATE aws.iotwireless.resource_positions
SET
GeoJsonPayload = '{{ GeoJsonPayload }}'
WHERE
resource_identifier = '{{ resource_identifier }}' --required
AND resourceType = '{{ resourceType }}' --required
AND region = '{{ region }}' --required;