destinations
Creates, updates, deletes, gets or lists a destinations resource.
Overview
| Name | destinations |
| Type | Resource |
| Id | aws.iotwireless.destinations |
Fields
The following fields are returned by SELECT queries:
- get_destination
- list_destinations
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name of the resource. |
description | string | The description of the new resource. |
expression | string | The rule name or topic rule to send messages to. |
expression_type | string | The type of value in Expression. (RuleName, MqttTopic) |
name | string | The name of the resource. (pattern: <code>[a-zA-Z0-9-_]+</code>) |
role_arn | string | The ARN of the IAM Role that authorizes the destination. |
| Name | Datatype | Description |
|---|---|---|
destination_list | array | The list of destinations. |
next_token | string | The token to use to get the next set of results, or null if there are no additional results. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_destination | select | name, region | Gets information about a destination. | |
list_destinations | select | region | maxResults, nextToken | Lists the destinations registered to your AWS account. |
create_destination | insert | region, ExpressionType, RoleArn | Creates a new destination that maps a device message to an AWS IoT rule. | |
update_destination | update | name, region | Updates properties of a destination. | |
delete_destination | delete | name, region | Deletes a destination. | |
start_single_wireless_device_import_task | exec | region, DestinationName, Sidewalk | Start 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.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the resource to delete. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return in this operation. |
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_destination
- list_destinations
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
;
Lists the destinations registered to your AWS account.
SELECT
destination_list,
next_token
FROM aws.iotwireless.destinations
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_destination
- Manifest
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
;
# Description fields are for documentation purposes
- name: destinations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the destinations resource.
- name: Name
value: "{{ Name }}"
- name: ExpressionType
value: "{{ ExpressionType }}"
valid_values: ['RuleName', 'MqttTopic']
- name: Expression
value: "{{ Expression }}"
- name: Description
value: "{{ Description }}"
description: |
The description of the new resource.
- name: RoleArn
value: "{{ RoleArn }}"
- 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: 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.
UPDATE examples
- update_destination
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
- delete_destination
Deletes a destination.
DELETE FROM aws.iotwireless.destinations
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- start_single_wireless_device_import_task
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 }}"
}'
;