topic_rule_destinations
Creates, updates, deletes or gets a topic_rule_destination resource or lists topic_rule_destinations in a region
Overview
| Name | topic_rule_destinations |
| Type | Resource |
| Description | Resource Type definition for AWS::IoT::TopicRuleDestination |
| Id | awscc.iot.topic_rule_destinations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon Resource Name (ARN). |
status | string | The status of the TopicRuleDestination. |
http_url_properties | object | HTTP URL destination properties. |
status_reason | string | The reasoning for the current status of the TopicRuleDestination. |
vpc_properties | object | VPC destination properties. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon Resource Name (ARN). |
region | string | AWS region. |
For more information, see AWS::IoT::TopicRuleDestination.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | topic_rule_destinations | INSERT | region |
delete_resource | topic_rule_destinations | DELETE | Identifier, region |
update_resource | topic_rule_destinations | UPDATE | Identifier, PatchDocument, region |
list_resources | topic_rule_destinations_list_only | SELECT | region |
get_resource | topic_rule_destinations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual topic_rule_destination.
SELECT
region,
arn,
status,
http_url_properties,
status_reason,
vpc_properties
FROM awscc.iot.topic_rule_destinations
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all topic_rule_destinations in a region.
SELECT
region,
arn
FROM awscc.iot.topic_rule_destinations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new topic_rule_destination resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iot.topic_rule_destinations (
Status,
HttpUrlProperties,
VpcProperties,
region
)
SELECT
'{{ status }}',
'{{ http_url_properties }}',
'{{ vpc_properties }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.iot.topic_rule_destinations (
Status,
HttpUrlProperties,
VpcProperties,
region
)
SELECT
'{{ status }}',
'{{ http_url_properties }}',
'{{ vpc_properties }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: topic_rule_destination
props:
- name: status
value: '{{ status }}'
- name: http_url_properties
value:
confirmation_url: '{{ confirmation_url }}'
- name: vpc_properties
value:
subnet_ids:
- '{{ subnet_ids[0] }}'
security_groups:
- '{{ security_groups[0] }}'
vpc_id: '{{ vpc_id }}'
role_arn: '{{ role_arn }}'
UPDATE example
Use the following StackQL query and manifest file to update a topic_rule_destination resource, using stack-deploy.
/*+ update */
UPDATE awscc.iot.topic_rule_destinations
SET PatchDocument = string('{{ {
"Status": status
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.iot.topic_rule_destinations
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the topic_rule_destinations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iam:PassRole,
iot:CreateTopicRuleDestination,
iot:GetTopicRuleDestination,
iot:UpdateTopicRuleDestination
iot:GetTopicRuleDestination
iam:PassRole,
iot:GetTopicRuleDestination,
iot:UpdateTopicRuleDestination
iot:GetTopicRuleDestination,
iot:DeleteTopicRuleDestination
iot:ListTopicRuleDestinations