Skip to main content

ota_tasks

Creates, updates, deletes, gets or lists an ota_tasks resource.

Overview

Nameota_tasks
TypeResource
Idaws.iot_managed_integrations.ota_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The timestamp value of when the over-the-air (OTA) task was created.
descriptionstringThe description of the over-the-air (OTA) task. (pattern: <code>[0-9A-Za-z_- ]+</code>)
last_updated_atstring (date-time)The timestamp value of when the over-the-air (OTA) task was last updated at.
ota_mechanismstringThe deployment mechanism for the over-the-air (OTA) task. (PUSH)
ota_scheduling_configobjectOver-the-air (OTA) task scheduling config.
ota_target_query_stringstringThe query string to add things to the thing group.
ota_task_execution_retry_configobjectOver-the-air (OTA) task retry config.
ota_typestringThe frequency type for the over-the-air (OTA) task. (ONE_TIME, CONTINUOUS)
protocolstringThe connection protocol the over-the-air (OTA) task uses to update the device. (HTTP)
s3_urlstringThe URL to the Amazon S3 bucket where the over-the-air (OTA) task is stored.
statusstringThe status of the over-the-air (OTA) task. (IN_PROGRESS, CANCELED, COMPLETED, DELETION_IN_PROGRESS, SCHEDULED)
tagsobjectA set of key/value pairs that are used to manage the over-the-air (OTA) task.
targetarrayThe device targeted for the over-the-air (OTA) task.
task_arnstringThe 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_idstringThe identifier for the over-the-air (OTA) task configuration. (pattern: <code>[a-zA-Z0-9]*</code>)
task_idstringThe id of the over-the-air (OTA) task. (pattern: <code>[A-Za-z0-9]+</code>)
task_processing_detailsobjectThe processing details of all over-the-air (OTA) tasks.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_ota_taskselectidentifier, regionGet details of the over-the-air (OTA) task by its task id.
list_ota_tasksselectregionNextToken, MaxResultsList all of the over-the-air (OTA) tasks.
create_ota_taskinsertregion, S3Url, OtaTypeCreate an over-the-air (OTA) task to target a device.
update_ota_taskupdateidentifier, regionUpdate an over-the-air (OTA) task.
delete_ota_taskdeleteidentifier, regionDelete 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.

NameDatatypeDescription
identifierstringThe identifier of the over-the-air (OTA) task.
regionstringAWS region (default: us-east-1)
MaxResultsintegerThe maximum number of results to return at one time.
NextTokenstringA token that can be used to retrieve the next set of results.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 the over-the-air (OTA) task.

DELETE FROM aws.iot_managed_integrations.ota_tasks
WHERE identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;