Class: AWSCDK::IoT::CfnTopicRule::FirehoseActionProperty

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

Overview

Describes an action that writes data to an Amazon Kinesis Firehose stream.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delivery_stream_name:, role_arn:, batch_mode: nil, separator: nil) ⇒ FirehoseActionProperty

Returns a new instance of FirehoseActionProperty.

Parameters:

  • delivery_stream_name (String)

    The delivery stream name.

  • role_arn (String)

    The IAM role that grants access to the Amazon Kinesis Firehose stream.

  • batch_mode (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Whether to deliver the Kinesis Data Firehose stream as a batch by using PutRecordBatch . The default value is false .

  • separator (String, nil) (defaults to: nil)

    A character separator that will be used to separate records written to the Firehose stream.



1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
# File 'io_t/cfn_topic_rule.rb', line 1506

def initialize(delivery_stream_name:, role_arn:, batch_mode: nil, separator: nil)
  @delivery_stream_name = delivery_stream_name
  Jsii::Type.check_type(@delivery_stream_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliveryStreamName")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @batch_mode = batch_mode
  Jsii::Type.check_type(@batch_mode, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "batchMode") unless @batch_mode.nil?
  @separator = separator
  Jsii::Type.check_type(@separator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "separator") unless @separator.nil?
end

Instance Attribute Details

#batch_modeBoolean, ... (readonly)

Whether to deliver the Kinesis Data Firehose stream as a batch by using PutRecordBatch . The default value is false .

When batch_mode is true and the rule's SQL statement evaluates to an Array, each Array element forms one record in the PutRecordBatch request. The resulting array can't have more than 500 records.



1533
1534
1535
# File 'io_t/cfn_topic_rule.rb', line 1533

def batch_mode
  @batch_mode
end

#delivery_stream_nameString (readonly)

The delivery stream name.



1521
1522
1523
# File 'io_t/cfn_topic_rule.rb', line 1521

def delivery_stream_name
  @delivery_stream_name
end

#role_arnString (readonly)

The IAM role that grants access to the Amazon Kinesis Firehose stream.



1526
1527
1528
# File 'io_t/cfn_topic_rule.rb', line 1526

def role_arn
  @role_arn
end

#separatorString? (readonly)

A character separator that will be used to separate records written to the Firehose stream.

Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).



1540
1541
1542
# File 'io_t/cfn_topic_rule.rb', line 1540

def separator
  @separator
end

Class Method Details

.jsii_propertiesObject



1542
1543
1544
1545
1546
1547
1548
1549
# File 'io_t/cfn_topic_rule.rb', line 1542

def self.jsii_properties
  {
    :delivery_stream_name => "deliveryStreamName",
    :role_arn => "roleArn",
    :batch_mode => "batchMode",
    :separator => "separator",
  }
end

Instance Method Details

#to_jsiiObject



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
# File 'io_t/cfn_topic_rule.rb', line 1551

def to_jsii
  result = {}
  result.merge!({
    "deliveryStreamName" => @delivery_stream_name,
    "roleArn" => @role_arn,
    "batchMode" => @batch_mode,
    "separator" => @separator,
  })
  result.compact
end