Class: AWSCDK::IoT::CfnTopicRuleProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoT::CfnTopicRuleProps
- Defined in:
- io_t/cfn_topic_rule_props.rb
Overview
Properties for defining a CfnTopicRule.
Instance Attribute Summary collapse
-
#rule_name ⇒ String?
readonly
The name of the rule.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Metadata which can be used to manage the topic rule.
-
#topic_rule_payload ⇒ AWSCDK::IResolvable, AWSCDK::IoT::CfnTopicRule::TopicRulePayloadProperty
readonly
The rule payload.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(topic_rule_payload:, rule_name: nil, tags: nil) ⇒ CfnTopicRuleProps
constructor
A new instance of CfnTopicRuleProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(topic_rule_payload:, rule_name: nil, tags: nil) ⇒ CfnTopicRuleProps
Returns a new instance of CfnTopicRuleProps.
12 13 14 15 16 17 18 19 |
# File 'io_t/cfn_topic_rule_props.rb', line 12 def initialize(topic_rule_payload:, rule_name: nil, tags: nil) @topic_rule_payload = topic_rule_payload.is_a?(Hash) ? ::AWSCDK::IoT::CfnTopicRule::TopicRulePayloadProperty.new(**topic_rule_payload.transform_keys(&:to_sym)) : topic_rule_payload Jsii::Type.check_type(@topic_rule_payload, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVG9waWNSdWxlLlRvcGljUnVsZVBheWxvYWRQcm9wZXJ0eSJ9XX19")), "topicRulePayload") @rule_name = rule_name Jsii::Type.check_type(@rule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleName") unless @rule_name.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#rule_name ⇒ String? (readonly)
The name of the rule.
30 31 32 |
# File 'io_t/cfn_topic_rule_props.rb', line 30 def rule_name @rule_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
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..."
41 42 43 |
# File 'io_t/cfn_topic_rule_props.rb', line 41 def @tags end |
#topic_rule_payload ⇒ AWSCDK::IResolvable, AWSCDK::IoT::CfnTopicRule::TopicRulePayloadProperty (readonly)
The rule payload.
25 26 27 |
# File 'io_t/cfn_topic_rule_props.rb', line 25 def topic_rule_payload @topic_rule_payload end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 |
# File 'io_t/cfn_topic_rule_props.rb', line 43 def self.jsii_properties { :topic_rule_payload => "topicRulePayload", :rule_name => "ruleName", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'io_t/cfn_topic_rule_props.rb', line 51 def to_jsii result = {} result.merge!({ "topicRulePayload" => @topic_rule_payload, "ruleName" => @rule_name, "tags" => @tags, }) result.compact end |