Interface CfnTopicRule.ITopicRulePayloadProperty
Describes a rule.
Namespace: Amazon.CDK.AWS.IoT
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ITopicRulePayloadProperty
Syntax (vb)
Public Interface ITopicRulePayloadProperty
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;
var topicRulePayloadProperty = new TopicRulePayloadProperty {
Actions = new [] { new ActionProperty {
CloudwatchAlarm = new CloudwatchAlarmActionProperty {
AlarmName = "alarmName",
RoleArn = "roleArn",
StateReason = "stateReason",
StateValue = "stateValue"
},
CloudwatchLogs = new CloudwatchLogsActionProperty {
LogGroupName = "logGroupName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false
},
CloudwatchMetric = new CloudwatchMetricActionProperty {
MetricName = "metricName",
MetricNamespace = "metricNamespace",
MetricUnit = "metricUnit",
MetricValue = "metricValue",
RoleArn = "roleArn",
// the properties below are optional
MetricTimestamp = "metricTimestamp"
},
DynamoDb = new DynamoDBActionProperty {
HashKeyField = "hashKeyField",
HashKeyValue = "hashKeyValue",
RoleArn = "roleArn",
TableName = "tableName",
// the properties below are optional
HashKeyType = "hashKeyType",
PayloadField = "payloadField",
RangeKeyField = "rangeKeyField",
RangeKeyType = "rangeKeyType",
RangeKeyValue = "rangeKeyValue"
},
DynamoDBv2 = new DynamoDBv2ActionProperty {
PutItem = new PutItemInputProperty {
TableName = "tableName"
},
RoleArn = "roleArn"
},
Elasticsearch = new ElasticsearchActionProperty {
Endpoint = "endpoint",
Id = "id",
Index = "index",
RoleArn = "roleArn",
Type = "type"
},
Firehose = new FirehoseActionProperty {
DeliveryStreamName = "deliveryStreamName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false,
Separator = "separator"
},
Http = new HttpActionProperty {
Url = "url",
// the properties below are optional
Auth = new HttpAuthorizationProperty {
Sigv4 = new SigV4AuthorizationProperty {
RoleArn = "roleArn",
ServiceName = "serviceName",
SigningRegion = "signingRegion"
}
},
ConfirmationUrl = "confirmationUrl",
Headers = new [] { new HttpActionHeaderProperty {
Key = "key",
Value = "value"
} }
},
IotAnalytics = new IotAnalyticsActionProperty {
ChannelName = "channelName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false
},
IotEvents = new IotEventsActionProperty {
InputName = "inputName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false,
MessageId = "messageId"
},
IotSiteWise = new IotSiteWiseActionProperty {
PutAssetPropertyValueEntries = new [] { new PutAssetPropertyValueEntryProperty {
PropertyValues = new [] { new AssetPropertyValueProperty {
Timestamp = new AssetPropertyTimestampProperty {
TimeInSeconds = "timeInSeconds",
// the properties below are optional
OffsetInNanos = "offsetInNanos"
},
Value = new AssetPropertyVariantProperty {
BooleanValue = "booleanValue",
DoubleValue = "doubleValue",
IntegerValue = "integerValue",
StringValue = "stringValue"
},
// the properties below are optional
Quality = "quality"
} },
// the properties below are optional
AssetId = "assetId",
EntryId = "entryId",
PropertyAlias = "propertyAlias",
PropertyId = "propertyId"
} },
RoleArn = "roleArn"
},
Kafka = new KafkaActionProperty {
ClientProperties = new Dictionary<string, string> {
{ "clientPropertiesKey", "clientProperties" }
},
DestinationArn = "destinationArn",
Topic = "topic",
// the properties below are optional
Headers = new [] { new KafkaActionHeaderProperty {
Key = "key",
Value = "value"
} },
Key = "key",
Partition = "partition"
},
Kinesis = new KinesisActionProperty {
RoleArn = "roleArn",
StreamName = "streamName",
// the properties below are optional
PartitionKey = "partitionKey"
},
Lambda = new LambdaActionProperty {
FunctionArn = "functionArn"
},
Location = new LocationActionProperty {
DeviceId = "deviceId",
Latitude = "latitude",
Longitude = "longitude",
RoleArn = "roleArn",
TrackerName = "trackerName",
// the properties below are optional
Timestamp = new TimestampProperty {
Value = "value",
// the properties below are optional
Unit = "unit"
}
},
OpenSearch = new OpenSearchActionProperty {
Endpoint = "endpoint",
Id = "id",
Index = "index",
RoleArn = "roleArn",
Type = "type"
},
Republish = new RepublishActionProperty {
RoleArn = "roleArn",
Topic = "topic",
// the properties below are optional
Headers = new RepublishActionHeadersProperty {
ContentType = "contentType",
CorrelationData = "correlationData",
MessageExpiry = "messageExpiry",
PayloadFormatIndicator = "payloadFormatIndicator",
ResponseTopic = "responseTopic",
UserProperties = new [] { new UserPropertyProperty {
Key = "key",
Value = "value"
} }
},
Qos = 123
},
S3 = new S3ActionProperty {
BucketName = "bucketName",
Key = "key",
RoleArn = "roleArn",
// the properties below are optional
CannedAcl = "cannedAcl"
},
Sns = new SnsActionProperty {
RoleArn = "roleArn",
TargetArn = "targetArn",
// the properties below are optional
MessageFormat = "messageFormat"
},
Sqs = new SqsActionProperty {
QueueUrl = "queueUrl",
RoleArn = "roleArn",
// the properties below are optional
UseBase64 = false
},
StepFunctions = new StepFunctionsActionProperty {
RoleArn = "roleArn",
StateMachineName = "stateMachineName",
// the properties below are optional
ExecutionNamePrefix = "executionNamePrefix"
},
Timestream = new TimestreamActionProperty {
DatabaseName = "databaseName",
Dimensions = new [] { new TimestreamDimensionProperty {
Name = "name",
Value = "value"
} },
RoleArn = "roleArn",
TableName = "tableName",
// the properties below are optional
Timestamp = new TimestreamTimestampProperty {
Unit = "unit",
Value = "value"
}
}
} },
Sql = "sql",
// the properties below are optional
AwsIotSqlVersion = "awsIotSqlVersion",
Description = "description",
ErrorAction = new ActionProperty {
CloudwatchAlarm = new CloudwatchAlarmActionProperty {
AlarmName = "alarmName",
RoleArn = "roleArn",
StateReason = "stateReason",
StateValue = "stateValue"
},
CloudwatchLogs = new CloudwatchLogsActionProperty {
LogGroupName = "logGroupName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false
},
CloudwatchMetric = new CloudwatchMetricActionProperty {
MetricName = "metricName",
MetricNamespace = "metricNamespace",
MetricUnit = "metricUnit",
MetricValue = "metricValue",
RoleArn = "roleArn",
// the properties below are optional
MetricTimestamp = "metricTimestamp"
},
DynamoDb = new DynamoDBActionProperty {
HashKeyField = "hashKeyField",
HashKeyValue = "hashKeyValue",
RoleArn = "roleArn",
TableName = "tableName",
// the properties below are optional
HashKeyType = "hashKeyType",
PayloadField = "payloadField",
RangeKeyField = "rangeKeyField",
RangeKeyType = "rangeKeyType",
RangeKeyValue = "rangeKeyValue"
},
DynamoDBv2 = new DynamoDBv2ActionProperty {
PutItem = new PutItemInputProperty {
TableName = "tableName"
},
RoleArn = "roleArn"
},
Elasticsearch = new ElasticsearchActionProperty {
Endpoint = "endpoint",
Id = "id",
Index = "index",
RoleArn = "roleArn",
Type = "type"
},
Firehose = new FirehoseActionProperty {
DeliveryStreamName = "deliveryStreamName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false,
Separator = "separator"
},
Http = new HttpActionProperty {
Url = "url",
// the properties below are optional
Auth = new HttpAuthorizationProperty {
Sigv4 = new SigV4AuthorizationProperty {
RoleArn = "roleArn",
ServiceName = "serviceName",
SigningRegion = "signingRegion"
}
},
ConfirmationUrl = "confirmationUrl",
Headers = new [] { new HttpActionHeaderProperty {
Key = "key",
Value = "value"
} }
},
IotAnalytics = new IotAnalyticsActionProperty {
ChannelName = "channelName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false
},
IotEvents = new IotEventsActionProperty {
InputName = "inputName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false,
MessageId = "messageId"
},
IotSiteWise = new IotSiteWiseActionProperty {
PutAssetPropertyValueEntries = new [] { new PutAssetPropertyValueEntryProperty {
PropertyValues = new [] { new AssetPropertyValueProperty {
Timestamp = new AssetPropertyTimestampProperty {
TimeInSeconds = "timeInSeconds",
// the properties below are optional
OffsetInNanos = "offsetInNanos"
},
Value = new AssetPropertyVariantProperty {
BooleanValue = "booleanValue",
DoubleValue = "doubleValue",
IntegerValue = "integerValue",
StringValue = "stringValue"
},
// the properties below are optional
Quality = "quality"
} },
// the properties below are optional
AssetId = "assetId",
EntryId = "entryId",
PropertyAlias = "propertyAlias",
PropertyId = "propertyId"
} },
RoleArn = "roleArn"
},
Kafka = new KafkaActionProperty {
ClientProperties = new Dictionary<string, string> {
{ "clientPropertiesKey", "clientProperties" }
},
DestinationArn = "destinationArn",
Topic = "topic",
// the properties below are optional
Headers = new [] { new KafkaActionHeaderProperty {
Key = "key",
Value = "value"
} },
Key = "key",
Partition = "partition"
},
Kinesis = new KinesisActionProperty {
RoleArn = "roleArn",
StreamName = "streamName",
// the properties below are optional
PartitionKey = "partitionKey"
},
Lambda = new LambdaActionProperty {
FunctionArn = "functionArn"
},
Location = new LocationActionProperty {
DeviceId = "deviceId",
Latitude = "latitude",
Longitude = "longitude",
RoleArn = "roleArn",
TrackerName = "trackerName",
// the properties below are optional
Timestamp = new TimestampProperty {
Value = "value",
// the properties below are optional
Unit = "unit"
}
},
OpenSearch = new OpenSearchActionProperty {
Endpoint = "endpoint",
Id = "id",
Index = "index",
RoleArn = "roleArn",
Type = "type"
},
Republish = new RepublishActionProperty {
RoleArn = "roleArn",
Topic = "topic",
// the properties below are optional
Headers = new RepublishActionHeadersProperty {
ContentType = "contentType",
CorrelationData = "correlationData",
MessageExpiry = "messageExpiry",
PayloadFormatIndicator = "payloadFormatIndicator",
ResponseTopic = "responseTopic",
UserProperties = new [] { new UserPropertyProperty {
Key = "key",
Value = "value"
} }
},
Qos = 123
},
S3 = new S3ActionProperty {
BucketName = "bucketName",
Key = "key",
RoleArn = "roleArn",
// the properties below are optional
CannedAcl = "cannedAcl"
},
Sns = new SnsActionProperty {
RoleArn = "roleArn",
TargetArn = "targetArn",
// the properties below are optional
MessageFormat = "messageFormat"
},
Sqs = new SqsActionProperty {
QueueUrl = "queueUrl",
RoleArn = "roleArn",
// the properties below are optional
UseBase64 = false
},
StepFunctions = new StepFunctionsActionProperty {
RoleArn = "roleArn",
StateMachineName = "stateMachineName",
// the properties below are optional
ExecutionNamePrefix = "executionNamePrefix"
},
Timestream = new TimestreamActionProperty {
DatabaseName = "databaseName",
Dimensions = new [] { new TimestreamDimensionProperty {
Name = "name",
Value = "value"
} },
RoleArn = "roleArn",
TableName = "tableName",
// the properties below are optional
Timestamp = new TimestreamTimestampProperty {
Unit = "unit",
Value = "value"
}
}
},
RuleDisabled = false
};
Synopsis
Properties
Actions | The actions associated with the rule. |
AwsIotSqlVersion | The version of the SQL rules engine to use when evaluating the rule. |
Description | The description of the rule. |
ErrorAction | The action to take when an error occurs. |
RuleDisabled | Specifies whether the rule is disabled. |
Sql | The SQL statement used to query the topic. |
Properties
Actions
The actions associated with the rule.
object Actions { get; }
Property Value
System.Object
Remarks
AwsIotSqlVersion
The version of the SQL rules engine to use when evaluating the rule.
virtual string AwsIotSqlVersion { get; }
Property Value
System.String
Remarks
Description
The description of the rule.
virtual string Description { get; }
Property Value
System.String
Remarks
ErrorAction
The action to take when an error occurs.
virtual object ErrorAction { get; }
Property Value
System.Object
Remarks
RuleDisabled
Specifies whether the rule is disabled.
virtual object RuleDisabled { get; }
Property Value
System.Object
Remarks
Sql
The SQL statement used to query the topic.
string Sql { get; }
Property Value
System.String
Remarks
For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide .