destinations
Creates, updates, deletes or gets a destination
resource or lists destinations
in a region
Overview
Name | destinations |
Type | Resource |
Description | Destination's resource schema demonstrating some basic constructs and validation rules. |
Id | aws.iotwireless.destinations |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Unique name of destination |
expression | string | Destination expression |
expression_type | string | Must be RuleName |
description | string | Destination description |
tags | array | A list of key-value pairs that contain metadata for the destination. |
role_arn | string | AWS role ARN that grants access |
arn | string | Destination arn. Returned after successful create. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, Expression, ExpressionType, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all destinations
in a region.
SELECT
region,
name,
expression,
expression_type,
description,
tags,
role_arn,
arn
FROM aws.iotwireless.destinations
WHERE region = 'us-east-1';
Gets all properties from an individual destination
.
SELECT
region,
name,
expression,
expression_type,
description,
tags,
role_arn,
arn
FROM aws.iotwireless.destinations
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';
INSERT
example
Use the following StackQL query and manifest file to create a new destination
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iotwireless.destinations (
Name,
Expression,
ExpressionType,
region
)
SELECT
'{{ Name }}',
'{{ Expression }}',
'{{ ExpressionType }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iotwireless.destinations (
Name,
Expression,
ExpressionType,
Description,
Tags,
RoleArn,
region
)
SELECT
'{{ Name }}',
'{{ Expression }}',
'{{ ExpressionType }}',
'{{ Description }}',
'{{ Tags }}',
'{{ RoleArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: destination
props:
- name: Name
value: '{{ Name }}'
- name: Expression
value: '{{ Expression }}'
- name: ExpressionType
value: '{{ ExpressionType }}'
- name: Description
value: '{{ Description }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: RoleArn
value: '{{ RoleArn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iotwireless.destinations
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';
Permissions
To operate on the destinations
resource, the following permissions are required:
Create
iam:PassRole,
iotwireless:CreateDestination,
iotwireless:TagResource,
iotwireless:ListTagsForResource
Read
iotwireless:GetDestination,
iotwireless:ListTagsForResource
Update
iam:PassRole,
iotwireless:UpdateDestination,
iotwireless:UntagResource,
iotwireless:ListTagsForResource
Delete
iotwireless:DeleteDestination
List
iotwireless:ListDestinations,
iotwireless:ListTagsForResource