ota_tasks
Creates, updates, deletes, gets or lists an ota_tasks resource.
Overview
| Name | ota_tasks |
| Type | Resource |
| Id | aws.iot_managed_integrations.ota_tasks |
Fields
The following fields are returned by SELECT queries:
- get_ota_task
- list_ota_tasks
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The timestamp value of when the over-the-air (OTA) task was created. |
description | string | The description of the over-the-air (OTA) task. (pattern: <code>[0-9A-Za-z_- ]+</code>) |
last_updated_at | string (date-time) | The timestamp value of when the over-the-air (OTA) task was last updated at. |
ota_mechanism | string | The deployment mechanism for the over-the-air (OTA) task. (PUSH) |
ota_scheduling_config | object | Over-the-air (OTA) task scheduling config. |
ota_target_query_string | string | The query string to add things to the thing group. |
ota_task_execution_retry_config | object | Over-the-air (OTA) task retry config. |
ota_type | string | The frequency type for the over-the-air (OTA) task. (ONE_TIME, CONTINUOUS) |
protocol | string | The connection protocol the over-the-air (OTA) task uses to update the device. (HTTP) |
s3_url | string | The URL to the Amazon S3 bucket where the over-the-air (OTA) task is stored. |
status | string | The status of the over-the-air (OTA) task. (IN_PROGRESS, CANCELED, COMPLETED, DELETION_IN_PROGRESS, SCHEDULED) |
tags | object | A set of key/value pairs that are used to manage the over-the-air (OTA) task. |
target | array | The device targeted for the over-the-air (OTA) task. |
task_arn | string | The Amazon Resource Name (ARN) of the over-the-air (OTA) task (pattern: <code>arn:aws:iotmanagedintegrations:[0-9a-zA-Z-]+:[0-9]+:ota-task/[0-9a-zA-Z]+</code>) |
task_configuration_id | string | The identifier for the over-the-air (OTA) task configuration. (pattern: <code>[a-zA-Z0-9]*</code>) |
task_id | string | The id of the over-the-air (OTA) task. (pattern: <code>[A-Za-z0-9]+</code>) |
task_processing_details | object | The processing details of all over-the-air (OTA) tasks. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The timestamp value of when the over-the-air (OTA) task was created at. |
last_updated_at | string (date-time) | The timestamp value of when the over-the-air (OTA) task was last updated at. |
status | string | The status of the over-the-air (OTA) task summary. (IN_PROGRESS, CANCELED, COMPLETED, DELETION_IN_PROGRESS, SCHEDULED) |
task_arn | string | The Amazon Resource Name (ARN) of the over-the-air (OTA) task. (pattern: <code>arn:aws:iotmanagedintegrations:[0-9a-zA-Z-]+:[0-9]+:ota-task/[0-9a-zA-Z]+</code>) |
task_configuration_id | string | The identifier for the over-the-air (OTA) task configuration. (pattern: <code>[a-zA-Z0-9]*</code>) |
task_id | string | The id of the over-the-air (OTA) task. (pattern: <code>[A-Za-z0-9]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_ota_task | select | identifier, region | Get details of the over-the-air (OTA) task by its task id. | |
list_ota_tasks | select | region | NextToken, MaxResults | List all of the over-the-air (OTA) tasks. |
create_ota_task | insert | region, S3Url, OtaType | Create an over-the-air (OTA) task to target a device. | |
update_ota_task | update | identifier, region | Update an over-the-air (OTA) task. | |
delete_ota_task | delete | identifier, region | Delete the over-the-air (OTA) 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 |
|---|---|---|
identifier | string | The identifier of the over-the-air (OTA) task. |
region | string | AWS region (default: us-east-1) |
MaxResults | integer | The maximum number of results to return at one time. |
NextToken | string | A token that can be used to retrieve the next set of results. |
SELECT examples
- get_ota_task
- list_ota_tasks
Get details of the over-the-air (OTA) task by its task id.
SELECT
created_at,
description,
last_updated_at,
ota_mechanism,
ota_scheduling_config,
ota_target_query_string,
ota_task_execution_retry_config,
ota_type,
protocol,
s3_url,
status,
tags,
target,
task_arn,
task_configuration_id,
task_id,
task_processing_details
FROM aws.iot_managed_integrations.ota_tasks
WHERE identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
List all of the over-the-air (OTA) tasks.
SELECT
created_at,
last_updated_at,
status,
task_arn,
task_configuration_id,
task_id
FROM aws.iot_managed_integrations.ota_tasks
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;
INSERT examples
- create_ota_task
- Manifest
Create an over-the-air (OTA) task to target a device.
INSERT INTO aws.iot_managed_integrations.ota_tasks (
Description,
S3Url,
Protocol,
Target,
TaskConfigurationId,
OtaMechanism,
OtaType,
OtaTargetQueryString,
ClientToken,
OtaSchedulingConfig,
OtaTaskExecutionRetryConfig,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ S3Url }}' /* required */,
'{{ Protocol }}',
'{{ Target }}',
'{{ TaskConfigurationId }}',
'{{ OtaMechanism }}',
'{{ OtaType }}' /* required */,
'{{ OtaTargetQueryString }}',
'{{ ClientToken }}',
'{{ OtaSchedulingConfig }}',
'{{ OtaTaskExecutionRetryConfig }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
description,
task_arn,
task_id
;
# Description fields are for documentation purposes
- name: ota_tasks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the ota_tasks resource.
- name: Description
value: "{{ Description }}"
- name: S3Url
value: "{{ S3Url }}"
- name: Protocol
value: "{{ Protocol }}"
valid_values: ['HTTP']
- name: Target
value:
- "{{ Target }}"
- name: TaskConfigurationId
value: "{{ TaskConfigurationId }}"
- name: OtaMechanism
value: "{{ OtaMechanism }}"
valid_values: ['PUSH']
- name: OtaType
value: "{{ OtaType }}"
valid_values: ['ONE_TIME', 'CONTINUOUS']
- name: OtaTargetQueryString
value: "{{ OtaTargetQueryString }}"
- name: ClientToken
value: "{{ ClientToken }}"
- name: OtaSchedulingConfig
description: |
Over-the-air (OTA) task scheduling config.
value:
EndBehavior: "{{ EndBehavior }}"
EndTime: "{{ EndTime }}"
MaintenanceWindows:
- DurationInMinutes: {{ DurationInMinutes }}
StartTime: "{{ StartTime }}"
StartTime: "{{ StartTime }}"
- name: OtaTaskExecutionRetryConfig
description: |
Over-the-air (OTA) task retry config.
value:
RetryConfigCriteria:
- FailureType: "{{ FailureType }}"
MinNumberOfRetries: {{ MinNumberOfRetries }}
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_ota_task
Update an over-the-air (OTA) task.
UPDATE aws.iot_managed_integrations.ota_tasks
SET
Description = '{{ Description }}',
TaskConfigurationId = '{{ TaskConfigurationId }}'
WHERE
identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_ota_task
Delete the over-the-air (OTA) task.
DELETE FROM aws.iot_managed_integrations.ota_tasks
WHERE identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;