Skip to main content

topic_rule_destinations

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

Overview

Nametopic_rule_destinations
TypeResource
Idaws.iot.topic_rule_destinations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe topic rule destination URL.
created_atstring (date-time)The date and time when the topic rule destination was created.
http_url_propertiesobjectProperties of the HTTP URL.
last_updated_atstring (date-time)The date and time when the topic rule destination was last updated.
statusstringThe status of the topic rule destination. Valid values are: IN_PROGRESS A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint. ENABLED Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination. DISABLED Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination. ERROR Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint. (ENABLED, IN_PROGRESS, DISABLED, ERROR, DELETING)
status_reasonstringAdditional details or reason why the topic rule destination is in the current status.
vpc_propertiesobjectProperties of the virtual private cloud (VPC) connection.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_topic_rule_destinationselectarn, regionGets information about a topic rule destination. Requires permission to access the GetTopicRuleDestination action.
list_topic_rule_destinationsselectregionmaxResults, nextTokenLists all the topic rule destinations in your Amazon Web Services account. Requires permission to access the ListTopicRuleDestinations action.
create_topic_rule_destinationinsertregion, destinationConfigurationCreates a topic rule destination. The destination must be confirmed prior to use. Requires permission to access the CreateTopicRuleDestination action.
update_topic_rule_destinationupdateregion, arn, statusUpdates a topic rule destination. You use this to change the status, endpoint URL, or confirmation URL of the destination. Requires permission to access the UpdateTopicRuleDestination action.
delete_topic_rule_destinationdeletearn, regionDeletes a topic rule destination. Requires permission to access the DeleteTopicRuleDestination action.

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
arnstringThe ARN of the topic rule destination to delete.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return at one time.
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 topic rule destination. Requires permission to access the GetTopicRuleDestination action.

SELECT
arn,
created_at,
http_url_properties,
last_updated_at,
status,
status_reason,
vpc_properties
FROM aws.iot.topic_rule_destinations
WHERE arn = '{{ arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a topic rule destination. The destination must be confirmed prior to use. Requires permission to access the CreateTopicRuleDestination action.

INSERT INTO aws.iot.topic_rule_destinations (
destinationConfiguration,
region
)
SELECT
'{{ destinationConfiguration }}' /* required */,
'{{ region }}'
RETURNING
topic_rule_destination
;

UPDATE examples

Updates a topic rule destination. You use this to change the status, endpoint URL, or confirmation URL of the destination. Requires permission to access the UpdateTopicRuleDestination action.

UPDATE aws.iot.topic_rule_destinations
SET
arn = '{{ arn }}',
status = '{{ status }}'
WHERE
region = '{{ region }}' --required
AND arn = '{{ arn }}' --required
AND status = '{{ status }}' --required;

DELETE examples

Deletes a topic rule destination. Requires permission to access the DeleteTopicRuleDestination action.

DELETE FROM aws.iot.topic_rule_destinations
WHERE arn = '{{ arn }}' --required
AND region = '{{ region }}' --required
;