Class: AWSCDK::IoT::CfnTopicRule::RepublishActionProperty

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

Overview

Describes an action to republish to another topic.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role_arn:, topic:, headers: nil, qos: nil) ⇒ RepublishActionProperty

Returns a new instance of RepublishActionProperty.

Parameters:

  • role_arn (String)

    The ARN of the IAM role that grants access.

  • topic (String)

    The name of the MQTT topic.

  • headers (AWSCDK::IResolvable, AWSCDK::IoT::CfnTopicRule::RepublishActionHeadersProperty, nil) (defaults to: nil)

    MQTT Version 5.0 headers information. For more information, see MQTT in the IoT Core Developer Guide.

  • qos (Numeric, nil) (defaults to: nil)

    The Quality of Service (QoS) level to use when republishing messages.



2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'io_t/cfn_topic_rule.rb', line 2504

def initialize(role_arn:, topic:, headers: nil, qos: nil)
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @topic = topic
  Jsii::Type.check_type(@topic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topic")
  @headers = headers.is_a?(Hash) ? ::AWSCDK::IoT::CfnTopicRule::RepublishActionHeadersProperty.new(**headers.transform_keys(&:to_sym)) : headers
  Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVG9waWNSdWxlLlJlcHVibGlzaEFjdGlvbkhlYWRlcnNQcm9wZXJ0eSJ9XX19")), "headers") unless @headers.nil?
  @qos = qos
  Jsii::Type.check_type(@qos, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "qos") unless @qos.nil?
end

Instance Attribute Details

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

MQTT Version 5.0 headers information. For more information, see MQTT in the IoT Core Developer Guide.



2529
2530
2531
# File 'io_t/cfn_topic_rule.rb', line 2529

def headers
  @headers
end

#qosNumeric? (readonly)

The Quality of Service (QoS) level to use when republishing messages.

The default value is 0.



2536
2537
2538
# File 'io_t/cfn_topic_rule.rb', line 2536

def qos
  @qos
end

#role_arnString (readonly)

The ARN of the IAM role that grants access.



2519
2520
2521
# File 'io_t/cfn_topic_rule.rb', line 2519

def role_arn
  @role_arn
end

#topicString (readonly)

The name of the MQTT topic.



2524
2525
2526
# File 'io_t/cfn_topic_rule.rb', line 2524

def topic
  @topic
end

Class Method Details

.jsii_propertiesObject



2538
2539
2540
2541
2542
2543
2544
2545
# File 'io_t/cfn_topic_rule.rb', line 2538

def self.jsii_properties
  {
    :role_arn => "roleArn",
    :topic => "topic",
    :headers => "headers",
    :qos => "qos",
  }
end

Instance Method Details

#to_jsiiObject



2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
# File 'io_t/cfn_topic_rule.rb', line 2547

def to_jsii
  result = {}
  result.merge!({
    "roleArn" => @role_arn,
    "topic" => @topic,
    "headers" => @headers,
    "qos" => @qos,
  })
  result.compact
end