Skip to main content

destinations

Creates, updates, deletes, gets or lists a destinations resource.

Overview

Namedestinations
TypeResource
Idaws.iotwireless.destinations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name of the resource.
descriptionstringThe description of the new resource.
expressionstringThe rule name or topic rule to send messages to.
expression_typestringThe type of value in Expression. (RuleName, MqttTopic)
namestringThe name of the resource. (pattern: <code>[a-zA-Z0-9-_]+</code>)
role_arnstringThe ARN of the IAM Role that authorizes the destination.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_destinationselectname, regionGets information about a destination.
list_destinationsselectregionmaxResults, nextTokenLists the destinations registered to your AWS account.
create_destinationinsertregion, ExpressionType, RoleArnCreates a new destination that maps a device message to an AWS IoT rule.
update_destinationupdatename, regionUpdates properties of a destination.
delete_destinationdeletename, regionDeletes a destination.
start_single_wireless_device_import_taskexecregion, DestinationName, SidewalkStart import task for a single wireless device.

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
namestringThe name of the resource to delete.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return in this operation.
nextTokenstringTo retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

SELECT examples

Gets information about a destination.

SELECT
arn,
description,
expression,
expression_type,
name,
role_arn
FROM aws.iotwireless.destinations
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new destination that maps a device message to an AWS IoT rule.

INSERT INTO aws.iotwireless.destinations (
Name,
ExpressionType,
Expression,
Description,
RoleArn,
Tags,
ClientRequestToken,
region
)
SELECT
'{{ Name }}',
'{{ ExpressionType }}' /* required */,
'{{ Expression }}',
'{{ Description }}',
'{{ RoleArn }}' /* required */,
'{{ Tags }}',
'{{ ClientRequestToken }}',
'{{ region }}'
RETURNING
arn,
name
;

UPDATE examples

Updates properties of a destination.

UPDATE aws.iotwireless.destinations
SET
ExpressionType = '{{ ExpressionType }}',
Expression = '{{ Expression }}',
Description = '{{ Description }}',
RoleArn = '{{ RoleArn }}'
WHERE
name = '{{ name }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes a destination.

DELETE FROM aws.iotwireless.destinations
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Start import task for a single wireless device.

EXEC aws.iotwireless.destinations.start_single_wireless_device_import_task
@region='{{ region }}' --required
@@json=
'{
"DestinationName": "{{ DestinationName }}",
"ClientRequestToken": "{{ ClientRequestToken }}",
"DeviceName": "{{ DeviceName }}",
"Tags": "{{ Tags }}",
"Positioning": "{{ Positioning }}",
"Sidewalk": "{{ Sidewalk }}"
}'
;