device_profiles
Creates, updates, deletes or gets a device_profile resource or lists device_profiles in a region
Overview
| Name | device_profiles |
| Type | Resource |
| Description | Device Profile's resource schema demonstrating some basic constructs and validation rules. |
| Id | awscc.iotwireless.device_profiles |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | Name of service profile |
lo_ra_wan | object | LoRaWANDeviceProfile supports all LoRa specific attributes for service profile for CreateDeviceProfile operation |
tags | array | A list of key-value pairs that contain metadata for the device profile. |
arn | string | Service profile Arn. Returned after successful create. |
id | string | Service profile Id. Returned after successful create. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | Service profile Id. Returned after successful create. |
region | string | AWS region. |
For more information, see AWS::IoTWireless::DeviceProfile.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | device_profiles | INSERT | , region |
delete_resource | device_profiles | DELETE | Identifier, region |
update_resource | device_profiles | UPDATE | Identifier, PatchDocument, region |
list_resources | device_profiles_list_only | SELECT | region |
get_resource | device_profiles | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual device_profile.
SELECT
region,
name,
lo_ra_wan,
tags,
arn,
id
FROM awscc.iotwireless.device_profiles
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all device_profiles in a region.
SELECT
region,
id
FROM awscc.iotwireless.device_profiles_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new device_profile resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iotwireless.device_profiles (
,
region
)
SELECT
'{{ }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.iotwireless.device_profiles (
Name,
LoRaWAN,
Tags,
region
)
SELECT
'{{ name }}',
'{{ lo_ra_wan }}',
'{{ tags }}',
'{{ 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: device_profile
props:
- name: name
value: '{{ name }}'
- name: lo_ra_wan
value:
supports_class_b: '{{ supports_class_b }}'
class_btimeout: '{{ class_btimeout }}'
ping_slot_period: '{{ ping_slot_period }}'
ping_slot_dr: '{{ ping_slot_dr }}'
ping_slot_freq: '{{ ping_slot_freq }}'
supports_class_c: '{{ supports_class_c }}'
class_ctimeout: '{{ class_ctimeout }}'
mac_version: '{{ mac_version }}'
reg_params_revision: '{{ reg_params_revision }}'
rx_delay1: '{{ rx_delay1 }}'
rx_dr_offset1: '{{ rx_dr_offset1 }}'
rx_freq2: '{{ rx_freq2 }}'
rx_data_rate2: '{{ rx_data_rate2 }}'
factory_preset_freqs_list:
- '{{ factory_preset_freqs_list[0] }}'
max_eirp: '{{ max_eirp }}'
max_duty_cycle: '{{ max_duty_cycle }}'
supports_join: '{{ supports_join }}'
rf_region: '{{ rf_region }}'
supports32_bit_fcnt: '{{ supports32_bit_fcnt }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a device_profile resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotwireless.device_profiles
SET PatchDocument = string('{{ {
"Tags": tags
} | 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.device_profiles
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 device_profiles resource, the following permissions are required:
- Create
- Update
- Read
- Delete
- List
iotwireless:CreateDeviceProfile,
iotwireless:TagResource
iotwireless:GetDeviceProfile,
iotwireless:TagResource,
iotwireless:UntagResource
iotwireless:GetDeviceProfile,
iotwireless:ListTagsForResource
iotwireless:DeleteDeviceProfile
iotwireless:ListDeviceProfiles,
iotwireless:ListTagsForResource