wireless_devices
Creates, updates, deletes or gets a wireless_device
resource or lists wireless_devices
in a region
Overview
Name | wireless_devices |
Type | Resource |
Description | Create and manage wireless gateways, including LoRa gateways. |
Id | aws.iotwireless.wireless_devices |
Fields
Name | Datatype | Description |
---|---|---|
type | string | Wireless device type, currently only Sidewalk and LoRa |
name | string | Wireless device name |
description | string | Wireless device description |
destination_name | string | Wireless device destination name |
lo_ra_wan | object | The combination of Package, Station and Model which represents the version of the LoRaWAN Wireless Device. |
tags | array | A list of key-value pairs that contain metadata for the device. Currently not supported, will not create if tags are passed. |
arn | string | Wireless device arn. Returned after successful create. |
id | string | Wireless device Id. Returned after successful create. |
thing_arn | string | Thing arn. Passed into update to associate Thing with Wireless device. |
thing_name | string | Thing Arn. If there is a Thing created, this can be returned with a Get call. |
last_uplink_received_at | string | The date and time when the most recent uplink was received. |
positioning | string | FPort values for the GNSS, stream, and ClockSync functions of the positioning information. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Type, DestinationName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all wireless_devices
in a region.
SELECT
region,
type,
name,
description,
destination_name,
lo_ra_wan,
tags,
arn,
id,
thing_arn,
thing_name,
last_uplink_received_at,
positioning
FROM aws.iotwireless.wireless_devices
WHERE region = 'us-east-1';
Gets all properties from an individual wireless_device
.
SELECT
region,
type,
name,
description,
destination_name,
lo_ra_wan,
tags,
arn,
id,
thing_arn,
thing_name,
last_uplink_received_at,
positioning
FROM aws.iotwireless.wireless_devices
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new wireless_device
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iotwireless.wireless_devices (
Type,
DestinationName,
region
)
SELECT
'{{ Type }}',
'{{ DestinationName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iotwireless.wireless_devices (
Type,
Name,
Description,
DestinationName,
LoRaWAN,
Tags,
ThingArn,
LastUplinkReceivedAt,
Positioning,
region
)
SELECT
'{{ Type }}',
'{{ Name }}',
'{{ Description }}',
'{{ DestinationName }}',
'{{ LoRaWAN }}',
'{{ Tags }}',
'{{ ThingArn }}',
'{{ LastUplinkReceivedAt }}',
'{{ Positioning }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: wireless_device
props:
- name: Type
value: '{{ Type }}'
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: DestinationName
value: '{{ DestinationName }}'
- name: LoRaWAN
value:
DevEui: '{{ DevEui }}'
DeviceProfileId: '{{ DeviceProfileId }}'
ServiceProfileId: '{{ ServiceProfileId }}'
OtaaV11:
AppKey: '{{ AppKey }}'
NwkKey: '{{ NwkKey }}'
JoinEui: '{{ JoinEui }}'
OtaaV10x:
AppKey: '{{ AppKey }}'
AppEui: '{{ AppEui }}'
AbpV11:
DevAddr: '{{ DevAddr }}'
SessionKeys:
FNwkSIntKey: '{{ FNwkSIntKey }}'
SNwkSIntKey: '{{ SNwkSIntKey }}'
NwkSEncKey: '{{ NwkSEncKey }}'
AppSKey: '{{ AppSKey }}'
AbpV10x:
DevAddr: '{{ DevAddr }}'
SessionKeys:
NwkSKey: '{{ NwkSKey }}'
AppSKey: '{{ AppSKey }}'
FPorts:
Applications:
- DestinationName: '{{ DestinationName }}'
FPort: '{{ FPort }}'
Type: '{{ Type }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: ThingArn
value: '{{ ThingArn }}'
- name: LastUplinkReceivedAt
value: '{{ LastUplinkReceivedAt }}'
- name: Positioning
value: '{{ Positioning }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iotwireless.wireless_devices
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the wireless_devices
resource, the following permissions are required:
Create
iotwireless:CreateWirelessDevice,
iotwireless:TagResource,
iotwireless:ListTagsForResource
Read
iotwireless:GetWirelessDevice,
iotwireless:ListTagsForResource
Update
iotwireless:UpdateWirelessDevice,
iotwireless:UntagResource,
iotwireless:ListTagsForResource,
iotwireless:AssociateWirelessDeviceWithThing
Delete
iotwireless:DeleteWirelessDevice,
iotwireless:DisassociateWirelessDeviceFromThing
List
iotwireless:ListWirelessDevices,
iotwireless:ListTagsForResource