class CfnTopicRulePropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.IoT.Mixins.CfnTopicRulePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsiot/mixins#CfnTopicRulePropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.iot.mixins.CfnTopicRulePropsMixin |
Python | aws_cdk.mixins_preview.aws_iot.mixins.CfnTopicRulePropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_iot » mixins » CfnTopicRulePropsMixin |
Implements
IMixin
Extends
Mixin
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 in the AWS IoT Developer Guide .
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicrule.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as iot_mixins } from '@aws-cdk/mixins-preview/aws-iot';
const cfnTopicRulePropsMixin = new iot_mixins.CfnTopicRulePropsMixin({
ruleName: 'ruleName',
tags: [{
key: 'key',
value: 'value',
}],
topicRulePayload: {
actions: [{
cloudwatchAlarm: {
alarmName: 'alarmName',
roleArn: 'roleArn',
stateReason: 'stateReason',
stateValue: 'stateValue',
},
cloudwatchLogs: {
batchMode: false,
logGroupName: 'logGroupName',
roleArn: 'roleArn',
},
cloudwatchMetric: {
metricName: 'metricName',
metricNamespace: 'metricNamespace',
metricTimestamp: 'metricTimestamp',
metricUnit: 'metricUnit',
metricValue: 'metricValue',
roleArn: 'roleArn',
},
dynamoDb: {
hashKeyField: 'hashKeyField',
hashKeyType: 'hashKeyType',
hashKeyValue: 'hashKeyValue',
payloadField: 'payloadField',
rangeKeyField: 'rangeKeyField',
rangeKeyType: 'rangeKeyType',
rangeKeyValue: 'rangeKeyValue',
roleArn: 'roleArn',
tableName: 'tableName',
},
dynamoDBv2: {
putItem: {
tableName: 'tableName',
},
roleArn: 'roleArn',
},
elasticsearch: {
endpoint: 'endpoint',
id: 'id',
index: 'index',
roleArn: 'roleArn',
type: 'type',
},
firehose: {
batchMode: false,
deliveryStreamName: 'deliveryStreamName',
roleArn: 'roleArn',
separator: 'separator',
},
http: {
auth: {
sigv4: {
roleArn: 'roleArn',
serviceName: 'serviceName',
signingRegion: 'signingRegion',
},
},
confirmationUrl: 'confirmationUrl',
headers: [{
key: 'key',
value: 'value',
}],
url: 'url',
},
iotAnalytics: {
batchMode: false,
channelName: 'channelName',
roleArn: 'roleArn',
},
iotEvents: {
batchMode: false,
inputName: 'inputName',
messageId: 'messageId',
roleArn: 'roleArn',
},
iotSiteWise: {
putAssetPropertyValueEntries: [{
assetId: 'assetId',
entryId: 'entryId',
propertyAlias: 'propertyAlias',
propertyId: 'propertyId',
propertyValues: [{
quality: 'quality',
timestamp: {
offsetInNanos: 'offsetInNanos',
timeInSeconds: 'timeInSeconds',
},
value: {
booleanValue: 'booleanValue',
doubleValue: 'doubleValue',
integerValue: 'integerValue',
stringValue: 'stringValue',
},
}],
}],
roleArn: 'roleArn',
},
kafka: {
clientProperties: {
clientPropertiesKey: 'clientProperties',
},
destinationArn: 'destinationArn',
headers: [{
key: 'key',
value: 'value',
}],
key: 'key',
partition: 'partition',
topic: 'topic',
},
kinesis: {
partitionKey: 'partitionKey',
roleArn: 'roleArn',
streamName: 'streamName',
},
lambda: {
functionArn: 'functionArn',
},
location: {
deviceId: 'deviceId',
latitude: 'latitude',
longitude: 'longitude',
roleArn: 'roleArn',
timestamp: {
unit: 'unit',
value: 'value',
},
trackerName: 'trackerName',
},
openSearch: {
endpoint: 'endpoint',
id: 'id',
index: 'index',
roleArn: 'roleArn',
type: 'type',
},
republish: {
headers: {
contentType: 'contentType',
correlationData: 'correlationData',
messageExpiry: 'messageExpiry',
payloadFormatIndicator: 'payloadFormatIndicator',
responseTopic: 'responseTopic',
userProperties: [{
key: 'key',
value: 'value',
}],
},
qos: 123,
roleArn: 'roleArn',
topic: 'topic',
},
s3: {
bucketName: 'bucketName',
cannedAcl: 'cannedAcl',
key: 'key',
roleArn: 'roleArn',
},
sns: {
messageFormat: 'messageFormat',
roleArn: 'roleArn',
targetArn: 'targetArn',
},
sqs: {
queueUrl: 'queueUrl',
roleArn: 'roleArn',
useBase64: false,
},
stepFunctions: {
executionNamePrefix: 'executionNamePrefix',
roleArn: 'roleArn',
stateMachineName: 'stateMachineName',
},
timestream: {
databaseName: 'databaseName',
dimensions: [{
name: 'name',
value: 'value',
}],
roleArn: 'roleArn',
tableName: 'tableName',
timestamp: {
unit: 'unit',
value: 'value',
},
},
}],
awsIotSqlVersion: 'awsIotSqlVersion',
description: 'description',
errorAction: {
cloudwatchAlarm: {
alarmName: 'alarmName',
roleArn: 'roleArn',
stateReason: 'stateReason',
stateValue: 'stateValue',
},
cloudwatchLogs: {
batchMode: false,
logGroupName: 'logGroupName',
roleArn: 'roleArn',
},
cloudwatchMetric: {
metricName: 'metricName',
metricNamespace: 'metricNamespace',
metricTimestamp: 'metricTimestamp',
metricUnit: 'metricUnit',
metricValue: 'metricValue',
roleArn: 'roleArn',
},
dynamoDb: {
hashKeyField: 'hashKeyField',
hashKeyType: 'hashKeyType',
hashKeyValue: 'hashKeyValue',
payloadField: 'payloadField',
rangeKeyField: 'rangeKeyField',
rangeKeyType: 'rangeKeyType',
rangeKeyValue: 'rangeKeyValue',
roleArn: 'roleArn',
tableName: 'tableName',
},
dynamoDBv2: {
putItem: {
tableName: 'tableName',
},
roleArn: 'roleArn',
},
elasticsearch: {
endpoint: 'endpoint',
id: 'id',
index: 'index',
roleArn: 'roleArn',
type: 'type',
},
firehose: {
batchMode: false,
deliveryStreamName: 'deliveryStreamName',
roleArn: 'roleArn',
separator: 'separator',
},
http: {
auth: {
sigv4: {
roleArn: 'roleArn',
serviceName: 'serviceName',
signingRegion: 'signingRegion',
},
},
confirmationUrl: 'confirmationUrl',
headers: [{
key: 'key',
value: 'value',
}],
url: 'url',
},
iotAnalytics: {
batchMode: false,
channelName: 'channelName',
roleArn: 'roleArn',
},
iotEvents: {
batchMode: false,
inputName: 'inputName',
messageId: 'messageId',
roleArn: 'roleArn',
},
iotSiteWise: {
putAssetPropertyValueEntries: [{
assetId: 'assetId',
entryId: 'entryId',
propertyAlias: 'propertyAlias',
propertyId: 'propertyId',
propertyValues: [{
quality: 'quality',
timestamp: {
offsetInNanos: 'offsetInNanos',
timeInSeconds: 'timeInSeconds',
},
value: {
booleanValue: 'booleanValue',
doubleValue: 'doubleValue',
integerValue: 'integerValue',
stringValue: 'stringValue',
},
}],
}],
roleArn: 'roleArn',
},
kafka: {
clientProperties: {
clientPropertiesKey: 'clientProperties',
},
destinationArn: 'destinationArn',
headers: [{
key: 'key',
value: 'value',
}],
key: 'key',
partition: 'partition',
topic: 'topic',
},
kinesis: {
partitionKey: 'partitionKey',
roleArn: 'roleArn',
streamName: 'streamName',
},
lambda: {
functionArn: 'functionArn',
},
location: {
deviceId: 'deviceId',
latitude: 'latitude',
longitude: 'longitude',
roleArn: 'roleArn',
timestamp: {
unit: 'unit',
value: 'value',
},
trackerName: 'trackerName',
},
openSearch: {
endpoint: 'endpoint',
id: 'id',
index: 'index',
roleArn: 'roleArn',
type: 'type',
},
republish: {
headers: {
contentType: 'contentType',
correlationData: 'correlationData',
messageExpiry: 'messageExpiry',
payloadFormatIndicator: 'payloadFormatIndicator',
responseTopic: 'responseTopic',
userProperties: [{
key: 'key',
value: 'value',
}],
},
qos: 123,
roleArn: 'roleArn',
topic: 'topic',
},
s3: {
bucketName: 'bucketName',
cannedAcl: 'cannedAcl',
key: 'key',
roleArn: 'roleArn',
},
sns: {
messageFormat: 'messageFormat',
roleArn: 'roleArn',
targetArn: 'targetArn',
},
sqs: {
queueUrl: 'queueUrl',
roleArn: 'roleArn',
useBase64: false,
},
stepFunctions: {
executionNamePrefix: 'executionNamePrefix',
roleArn: 'roleArn',
stateMachineName: 'stateMachineName',
},
timestream: {
databaseName: 'databaseName',
dimensions: [{
name: 'name',
value: 'value',
}],
roleArn: 'roleArn',
tableName: 'tableName',
timestamp: {
unit: 'unit',
value: 'value',
},
},
},
ruleDisabled: false,
sql: 'sql',
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnTopicRulePropsMixin(props: CfnTopicRuleMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Topic Rule Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::IoT::TopicRule.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript