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 = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all wireless_devices in a region.
SELECT
region,
id
FROM awscc.iotwireless.wireless_devices_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.iotwireless.wireless_devices
WHERE
Identifier = '{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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