Class: AWSCDK::IoT::CfnTopicRule::TopicRulePayloadProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_topic_rule.rb

Overview

Describes a rule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actions:, sql:, aws_iot_sql_version: nil, description: nil, error_action: nil, rule_disabled: nil) ⇒ TopicRulePayloadProperty

Returns a new instance of TopicRulePayloadProperty.

Parameters:



3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
# File 'io_t/cfn_topic_rule.rb', line 3062

def initialize(actions:, sql:, aws_iot_sql_version: nil, description: nil, error_action: nil, rule_disabled: nil)
  @actions = actions
  Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90LkNmblRvcGljUnVsZS5BY3Rpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "actions")
  @sql = sql
  Jsii::Type.check_type(@sql, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sql")
  @aws_iot_sql_version = aws_iot_sql_version
  Jsii::Type.check_type(@aws_iot_sql_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "awsIotSqlVersion") unless @aws_iot_sql_version.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @error_action = error_action.is_a?(Hash) ? ::AWSCDK::IoT::CfnTopicRule::ActionProperty.new(**error_action.transform_keys(&:to_sym)) : error_action
  Jsii::Type.check_type(@error_action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVG9waWNSdWxlLkFjdGlvblByb3BlcnR5In1dfX0=")), "errorAction") unless @error_action.nil?
  @rule_disabled = rule_disabled
  Jsii::Type.check_type(@rule_disabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "ruleDisabled") unless @rule_disabled.nil?
end

Instance Attribute Details

#aws_iot_sql_versionString? (readonly)

The version of the SQL rules engine to use when evaluating the rule.

The default value is 2015-10-08.



3095
3096
3097
# File 'io_t/cfn_topic_rule.rb', line 3095

def aws_iot_sql_version
  @aws_iot_sql_version
end

#descriptionString? (readonly)

The description of the rule.



3100
3101
3102
# File 'io_t/cfn_topic_rule.rb', line 3100

def description
  @description
end

#error_actionAWSCDK::IResolvable, ... (readonly)

The action to take when an error occurs.



3105
3106
3107
# File 'io_t/cfn_topic_rule.rb', line 3105

def error_action
  @error_action
end

#rule_disabledBoolean, ... (readonly)

Specifies whether the rule is disabled.



3110
3111
3112
# File 'io_t/cfn_topic_rule.rb', line 3110

def rule_disabled
  @rule_disabled
end

#sqlString (readonly)

The SQL statement used to query the topic.

For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide .



3088
3089
3090
# File 'io_t/cfn_topic_rule.rb', line 3088

def sql
  @sql
end

Class Method Details

.jsii_propertiesObject



3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
# File 'io_t/cfn_topic_rule.rb', line 3112

def self.jsii_properties
  {
    :actions => "actions",
    :sql => "sql",
    :aws_iot_sql_version => "awsIotSqlVersion",
    :description => "description",
    :error_action => "errorAction",
    :rule_disabled => "ruleDisabled",
  }
end

Instance Method Details

#to_jsiiObject



3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
# File 'io_t/cfn_topic_rule.rb', line 3123

def to_jsii
  result = {}
  result.merge!({
    "actions" => @actions,
    "sql" => @sql,
    "awsIotSqlVersion" => @aws_iot_sql_version,
    "description" => @description,
    "errorAction" => @error_action,
    "ruleDisabled" => @rule_disabled,
  })
  result.compact
end