You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::IoT::Types::CreateTopicRuleRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb

Overview

Note:

When making an API call, you may pass CreateTopicRuleRequest data as a hash:

{
  rule_name: "RuleName", # required
  topic_rule_payload: { # required
    sql: "SQL", # required
    description: "Description",
    actions: [ # required
      {
        dynamo_db: {
          table_name: "TableName", # required
          role_arn: "AwsArn", # required
          operation: "DynamoOperation",
          hash_key_field: "HashKeyField", # required
          hash_key_value: "HashKeyValue", # required
          hash_key_type: "STRING", # accepts STRING, NUMBER
          range_key_field: "RangeKeyField",
          range_key_value: "RangeKeyValue",
          range_key_type: "STRING", # accepts STRING, NUMBER
          payload_field: "PayloadField",
        },
        dynamo_d_bv_2: {
          role_arn: "AwsArn",
          put_item: {
            table_name: "TableName", # required
          },
        },
        lambda: {
          function_arn: "FunctionArn", # required
        },
        sns: {
          target_arn: "AwsArn", # required
          role_arn: "AwsArn", # required
          message_format: "RAW", # accepts RAW, JSON
        },
        sqs: {
          role_arn: "AwsArn", # required
          queue_url: "QueueUrl", # required
          use_base_64: false,
        },
        kinesis: {
          role_arn: "AwsArn", # required
          stream_name: "StreamName", # required
          partition_key: "PartitionKey",
        },
        republish: {
          role_arn: "AwsArn", # required
          topic: "TopicPattern", # required
        },
        s3: {
          role_arn: "AwsArn", # required
          bucket_name: "BucketName", # required
          key: "Key", # required
          canned_acl: "private", # accepts private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control, log-delivery-write
        },
        firehose: {
          role_arn: "AwsArn", # required
          delivery_stream_name: "DeliveryStreamName", # required
          separator: "FirehoseSeparator",
        },
        cloudwatch_metric: {
          role_arn: "AwsArn", # required
          metric_namespace: "MetricNamespace", # required
          metric_name: "MetricName", # required
          metric_value: "MetricValue", # required
          metric_unit: "MetricUnit", # required
          metric_timestamp: "MetricTimestamp",
        },
        cloudwatch_alarm: {
          role_arn: "AwsArn", # required
          alarm_name: "AlarmName", # required
          state_reason: "StateReason", # required
          state_value: "StateValue", # required
        },
        elasticsearch: {
          role_arn: "AwsArn", # required
          endpoint: "ElasticsearchEndpoint", # required
          index: "ElasticsearchIndex", # required
          type: "ElasticsearchType", # required
          id: "ElasticsearchId", # required
        },
        salesforce: {
          token: "SalesforceToken", # required
          url: "SalesforceEndpoint", # required
        },
      },
    ],
    rule_disabled: false,
    aws_iot_sql_version: "AwsIotSqlVersion",
  },
}

The input for the CreateTopicRule operation.

Instance Attribute Summary collapse

Instance Attribute Details

#rule_nameString

The name of the rule.

Returns:

  • (String)


955
956
957
958
959
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 955

class CreateTopicRuleRequest < Struct.new(
  :rule_name,
  :topic_rule_payload)
  include Aws::Structure
end

#topic_rule_payloadTypes::TopicRulePayload

The rule payload.



955
956
957
958
959
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 955

class CreateTopicRuleRequest < Struct.new(
  :rule_name,
  :topic_rule_payload)
  include Aws::Structure
end