AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::IoT::TopicRule

CfnTopicRule

Use the `AWS::IoT::TopicRule` resource to declare an AWS IoT rule. For information about working with AWS IoT rules, see [Rules for AWS IoT](https://docs.aws.amazon.com/iot/latest/developerguide/iot-rules.html) in the *AWS IoT Developer Guide* .

Import

import { CfnTopicRule } from 'aws-cdk-lib/aws-iot';

Or use the module namespace:

import * as iot from 'aws-cdk-lib/aws-iot';
// iot.CfnTopicRule

Properties

Configuration passed to the constructor as CfnTopicRuleProps.

topicRulePayloadRequired
IResolvable | TopicRulePayloadProperty

The rule payload.

ruleNameOptional
string

The name of the rule.

tagsOptional
CfnTag[]

Metadata which can be used to manage the topic rule. > For URI Request parameters use format: ...key1=value1&key2=value2... > > For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..." > > For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter