fuota_tasks
Creates, updates, deletes, gets or lists a fuota_tasks resource.
Overview
| Name | fuota_tasks |
| Type | Resource |
| Id | aws.iotwireless.fuota_tasks |
Fields
The following fields are returned by SELECT queries:
- get_fuota_task
- list_fuota_tasks
| Name | Datatype | Description |
|---|---|---|
arn | string | The arn of a FUOTA task. |
created_at | string (date-time) | Created at timestamp for the resource. |
description | string | The description of the new resource. |
descriptor | string | The descriptor is the metadata about the file that is transferred to the device using FUOTA, such as the software version. It is a binary field encoded in base64. (pattern: <code>^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$</code>) |
firmware_update_image | string | The S3 URI points to a firmware update image that is to be used with a FUOTA task. |
firmware_update_role | string | The firmware update role that is to be used with a FUOTA task. |
fragment_interval_ms | integer | The interval for sending fragments in milliseconds, rounded to the nearest second. This interval only determines the timing for when the Cloud sends down the fragments to yor device. There can be a delay for when your device will receive these fragments. This delay depends on the device's class and the communication delay with the cloud. |
fragment_size_bytes | integer | The size of each fragment in bytes. This parameter is supported only for FUOTA tasks with multicast groups. |
id | string | The ID of a FUOTA task. |
lo_ra_wan | object | The LoRaWAN information returned from getting a FUOTA task. |
name | string | The name of a FUOTA task. |
redundancy_percent | integer | The percentage of the added fragments that are redundant. For example, if the size of the firmware image file is 100 bytes and the fragment size is 10 bytes, with RedundancyPercent set to 50(%), the final number of encoded fragments is (100 / 10) + (100 / 10 * 50%) = 15. |
status | string | The status of a FUOTA task. (Pending, FuotaSession_Waiting, In_FuotaSession, FuotaDone, Delete_Waiting) |
| Name | Datatype | Description |
|---|---|---|
fuota_task_list | array | Lists the FUOTA tasks registered to your AWS account. |
next_token | string | To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_fuota_task | select | id, region | Gets information about a FUOTA task. | |
list_fuota_tasks | select | region | nextToken, maxResults | Lists the FUOTA tasks registered to your AWS account. |
create_fuota_task | insert | region, FirmwareUpdateImage, FirmwareUpdateRole | Creates a FUOTA task. | |
associate_multicast_group_with_fuota_task | update | id, region, MulticastGroupId | Associate a multicast group with a FUOTA task. | |
associate_wireless_device_with_fuota_task | update | id, region, WirelessDeviceId | Associate a wireless device with a FUOTA task. | |
disassociate_multicast_group_from_fuota_task | update | id, multicast_group_id, region | Disassociates a multicast group from a FUOTA task. | |
disassociate_wireless_device_from_fuota_task | update | id, wireless_device_id, region | Disassociates a wireless device from a FUOTA task. | |
update_fuota_task | update | id, region | Updates properties of a FUOTA task. | |
delete_fuota_task | delete | id, region | Deletes a FUOTA task. |
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 |
|---|---|---|
id | string | |
multicast_group_id | string | |
region | string | AWS region (default: us-east-1) |
wireless_device_id | string | |
maxResults | integer | |
nextToken | string | To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results. |
SELECT examples
- get_fuota_task
- list_fuota_tasks
Gets information about a FUOTA task.
SELECT
arn,
created_at,
description,
descriptor,
firmware_update_image,
firmware_update_role,
fragment_interval_ms,
fragment_size_bytes,
id,
lo_ra_wan,
name,
redundancy_percent,
status
FROM aws.iotwireless.fuota_tasks
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the FUOTA tasks registered to your AWS account.
SELECT
fuota_task_list,
next_token
FROM aws.iotwireless.fuota_tasks
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_fuota_task
- Manifest
Creates a FUOTA task.
INSERT INTO aws.iotwireless.fuota_tasks (
Name,
Description,
ClientRequestToken,
LoRaWAN,
FirmwareUpdateImage,
FirmwareUpdateRole,
Tags,
RedundancyPercent,
FragmentSizeBytes,
FragmentIntervalMS,
Descriptor,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ClientRequestToken }}',
'{{ LoRaWAN }}',
'{{ FirmwareUpdateImage }}' /* required */,
'{{ FirmwareUpdateRole }}' /* required */,
'{{ Tags }}',
{{ RedundancyPercent }},
{{ FragmentSizeBytes }},
{{ FragmentIntervalMS }},
'{{ Descriptor }}',
'{{ region }}'
RETURNING
arn,
id
;
# Description fields are for documentation purposes
- name: fuota_tasks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the fuota_tasks resource.
- name: Name
value: "{{ Name }}"
description: |
The name of a FUOTA task.
- name: Description
value: "{{ Description }}"
description: |
The description of the new resource.
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
description: |
Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see Ensuring idempotency in Amazon EC2 API requests.
- name: LoRaWAN
description: |
The LoRaWAN information used with a FUOTA task.
value:
RfRegion: "{{ RfRegion }}"
- name: FirmwareUpdateImage
value: "{{ FirmwareUpdateImage }}"
description: |
The S3 URI points to a firmware update image that is to be used with a FUOTA task.
- name: FirmwareUpdateRole
value: "{{ FirmwareUpdateRole }}"
description: |
The firmware update role that is to be used with a FUOTA task.
- name: Tags
description: |
The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: RedundancyPercent
value: {{ RedundancyPercent }}
description: |
The percentage of the added fragments that are redundant. For example, if the size of the firmware image file is 100 bytes and the fragment size is 10 bytes, with RedundancyPercent set to 50(%), the final number of encoded fragments is (100 / 10) + (100 / 10 * 50%) = 15.
- name: FragmentSizeBytes
value: {{ FragmentSizeBytes }}
description: |
The size of each fragment in bytes. This parameter is supported only for FUOTA tasks with multicast groups.
- name: FragmentIntervalMS
value: {{ FragmentIntervalMS }}
description: |
The interval for sending fragments in milliseconds, rounded to the nearest second. This interval only determines the timing for when the Cloud sends down the fragments to yor device. There can be a delay for when your device will receive these fragments. This delay depends on the device's class and the communication delay with the cloud.
- name: Descriptor
value: "{{ Descriptor }}"
description: |
The descriptor is the metadata about the file that is transferred to the device using FUOTA, such as the software version. It is a binary field encoded in base64.
UPDATE examples
- associate_multicast_group_with_fuota_task
- associate_wireless_device_with_fuota_task
- disassociate_multicast_group_from_fuota_task
- disassociate_wireless_device_from_fuota_task
- update_fuota_task
Associate a multicast group with a FUOTA task.
UPDATE aws.iotwireless.fuota_tasks
SET
MulticastGroupId = '{{ MulticastGroupId }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND MulticastGroupId = '{{ MulticastGroupId }}' --required;
Associate a wireless device with a FUOTA task.
UPDATE aws.iotwireless.fuota_tasks
SET
WirelessDeviceId = '{{ WirelessDeviceId }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND WirelessDeviceId = '{{ WirelessDeviceId }}' --required;
Disassociates a multicast group from a FUOTA task.
UPDATE aws.iotwireless.fuota_tasks
SET
-- No updatable properties
WHERE
id = '{{ id }}' --required
AND multicast_group_id = '{{ multicast_group_id }}' --required
AND region = '{{ region }}' --required;
Disassociates a wireless device from a FUOTA task.
UPDATE aws.iotwireless.fuota_tasks
SET
-- No updatable properties
WHERE
id = '{{ id }}' --required
AND wireless_device_id = '{{ wireless_device_id }}' --required
AND region = '{{ region }}' --required;
Updates properties of a FUOTA task.
UPDATE aws.iotwireless.fuota_tasks
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
LoRaWAN = '{{ LoRaWAN }}',
FirmwareUpdateImage = '{{ FirmwareUpdateImage }}',
FirmwareUpdateRole = '{{ FirmwareUpdateRole }}',
RedundancyPercent = {{ RedundancyPercent }},
FragmentSizeBytes = {{ FragmentSizeBytes }},
FragmentIntervalMS = {{ FragmentIntervalMS }},
Descriptor = '{{ Descriptor }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_fuota_task
Deletes a FUOTA task.
DELETE FROM aws.iotwireless.fuota_tasks
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;