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 | awscc.iotwireless.wireless_devices |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
id | string | Wireless device Id. Returned after successful create. |
region | string | AWS region. |
For more information, see AWS::IoTWireless::WirelessDevice.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | wireless_devices | INSERT | Type, DestinationName, region |
delete_resource | wireless_devices | DELETE | Identifier, region |
update_resource | wireless_devices | UPDATE | Identifier, PatchDocument, region |
list_resources | wireless_devices_list_only | SELECT | region |
get_resource | wireless_devices | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.iotwireless.wireless_devices
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all wireless_devices in a region.
SELECT
region,
id
FROM awscc.iotwireless.wireless_devices_list_only
WHERE
region = 'us-east-1';
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 awscc.iotwireless.wireless_devices (
Type,
DestinationName,
region
)
SELECT
'{{ type }}',
'{{ destination_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotwireless.wireless_devices (
Type,
Name,
Description,
DestinationName,
LoRaWAN,
Tags,
ThingArn,
LastUplinkReceivedAt,
Positioning,
region
)
SELECT
'{{ type }}',
'{{ name }}',
'{{ description }}',
'{{ destination_name }}',
'{{ lo_ra_wan }}',
'{{ tags }}',
'{{ thing_arn }}',
'{{ last_uplink_received_at }}',
'{{ 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: destination_name
value: '{{ destination_name }}'
- name: lo_ra_wan
value:
dev_eui: '{{ dev_eui }}'
device_profile_id: '{{ device_profile_id }}'
service_profile_id: '{{ service_profile_id }}'
otaa_v11:
app_key: '{{ app_key }}'
nwk_key: '{{ nwk_key }}'
join_eui: '{{ join_eui }}'
otaa_v10x:
app_key: '{{ app_key }}'
app_eui: '{{ app_eui }}'
abp_v11:
dev_addr: '{{ dev_addr }}'
session_keys:
f_nwk_sint_key: '{{ f_nwk_sint_key }}'
s_nwk_sint_key: '{{ s_nwk_sint_key }}'
nwk_senc_key: '{{ nwk_senc_key }}'
app_skey: '{{ app_skey }}'
abp_v10x:
dev_addr: '{{ dev_addr }}'
session_keys:
nwk_skey: '{{ nwk_skey }}'
app_skey: '{{ app_skey }}'
f_ports:
applications:
- destination_name: '{{ destination_name }}'
f_port: '{{ f_port }}'
type: '{{ type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: thing_arn
value: '{{ thing_arn }}'
- name: last_uplink_received_at
value: '{{ last_uplink_received_at }}'
- name: positioning
value: '{{ positioning }}'
UPDATE example
Use the following StackQL query and manifest file to update a wireless_device resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotwireless.wireless_devices
SET PatchDocument = string('{{ {
"Type": type,
"Name": name,
"Description": description,
"DestinationName": destination_name,
"LoRaWAN": lo_ra_wan,
"Tags": tags,
"ThingArn": thing_arn,
"LastUplinkReceivedAt": last_uplink_received_at,
"Positioning": positioning
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotwireless.wireless_devices
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the wireless_devices resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iotwireless:CreateWirelessDevice,
iotwireless:TagResource
iotwireless:GetWirelessDevice,
iotwireless:ListTagsForResource
iotwireless:UpdateWirelessDevice,
iotwireless:GetWirelessDevice,
iotwireless:AssociateWirelessDeviceWithThing,
iotwireless:TagResource,
iotwireless:UntagResource
iotwireless:DeleteWirelessDevice,
iotwireless:DisassociateWirelessDeviceFromThing
iotwireless:ListWirelessDevices,
iotwireless:ListTagsForResource