Class: AWSCDK::KinesisFirehose::DestinationS3BackupProps

Inherits:
CommonDestinationS3Props
  • Object
show all
Defined in:
kinesis_firehose/destination_s3_backup_props.rb

Overview

Properties for defining an S3 backup destination.

S3 backup is available for all destinations, regardless of whether the final destination is S3 or not.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(buffering_interval: nil, buffering_size: nil, compression: nil, data_output_prefix: nil, encryption_key: nil, error_output_prefix: nil, bucket: nil, logging_config: nil, mode: nil) ⇒ DestinationS3BackupProps

Returns a new instance of DestinationS3BackupProps.

Parameters:

  • buffering_interval (AWSCDK::Duration, nil) (defaults to: nil)

    The length of time that Firehose buffers incoming data before delivering it to the S3 bucket.

  • buffering_size (AWSCDK::Size, nil) (defaults to: nil)

    The size of the buffer that Amazon Data Firehose uses for incoming data before delivering it to the S3 bucket.

  • compression (AWSCDK::KinesisFirehose::Compression, nil) (defaults to: nil)

    The type of compression that Amazon Data Firehose uses to compress the data that it delivers to the Amazon S3 bucket.

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

    A prefix that Amazon Data Firehose evaluates and adds to records before writing them to S3.

  • encryption_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    The AWS KMS key used to encrypt the data that it delivers to your Amazon S3 bucket.

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

    A prefix that Amazon Data Firehose evaluates and adds to failed records before writing them to S3.

  • bucket (AWSCDK::S3::IBucket, nil) (defaults to: nil)

    The S3 bucket that will store data and failed records.

  • logging_config (AWSCDK::KinesisFirehose::ILoggingConfig, nil) (defaults to: nil)

    Configuration that determines whether to log errors during data transformation or delivery failures, and specifies the CloudWatch log group for storing error logs.

  • mode (AWSCDK::KinesisFirehose::BackupMode, nil) (defaults to: nil)

    Indicates the mode by which incoming records should be backed up to S3, if any.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 18

def initialize(buffering_interval: nil, buffering_size: nil, compression: nil, data_output_prefix: nil, encryption_key: nil, error_output_prefix: nil, bucket: nil, logging_config: nil, mode: nil)
  @buffering_interval = buffering_interval
  Jsii::Type.check_type(@buffering_interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "bufferingInterval") unless @buffering_interval.nil?
  @buffering_size = buffering_size
  Jsii::Type.check_type(@buffering_size, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "bufferingSize") unless @buffering_size.nil?
  @compression = compression
  Jsii::Type.check_type(@compression, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpc2ZpcmVob3NlLkNvbXByZXNzaW9uIn0=")), "compression") unless @compression.nil?
  @data_output_prefix = data_output_prefix
  Jsii::Type.check_type(@data_output_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataOutputPrefix") unless @data_output_prefix.nil?
  @encryption_key = encryption_key
  Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil?
  @error_output_prefix = error_output_prefix
  Jsii::Type.check_type(@error_output_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "errorOutputPrefix") unless @error_output_prefix.nil?
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") unless @bucket.nil?
  @logging_config = logging_config
  Jsii::Type.check_type(@logging_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpc2ZpcmVob3NlLklMb2dnaW5nQ29uZmlnIn0=")), "loggingConfig") unless @logging_config.nil?
  @mode = mode
  Jsii::Type.check_type(@mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpc2ZpcmVob3NlLkJhY2t1cE1vZGUifQ==")), "mode") unless @mode.nil?
end

Instance Attribute Details

#bucketAWSCDK::S3::IBucket? (readonly)

Note:

Default: - If mode is set to BackupMode.ALL or BackupMode.FAILED, a bucket will be created for you.

The S3 bucket that will store data and failed records.

Returns:



89
90
91
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 89

def bucket
  @bucket
end

#buffering_intervalAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(300)

The length of time that Firehose buffers incoming data before delivering it to the S3 bucket.

Minimum: Duration.seconds(0) when dynamic partitioning is disabled, Duration.seconds(60) when it is enabled Maximum: Duration.seconds(900)

Returns:



46
47
48
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 46

def buffering_interval
  @buffering_interval
end

#buffering_sizeAWSCDK::Size? (readonly)

Note:

Default: Size.mebibytes(5) when record data format conversion or dynamic partitioning is disabled, Size.mebibytes(128) when it is enabled

The size of the buffer that Amazon Data Firehose uses for incoming data before delivering it to the S3 bucket.

Minimum: Size.mebibytes(1) when record data format conversion or dynamic partitioning is disabled, Size.mebibytes(64) when it is enabled Maximum: Size.mebibytes(128)

Returns:



54
55
56
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 54

def buffering_size
  @buffering_size
end

#compressionAWSCDK::KinesisFirehose::Compression? (readonly)

Note:

Default: - UNCOMPRESSED

The type of compression that Amazon Data Firehose uses to compress the data that it delivers to the Amazon S3 bucket.

The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift destinations because they are not supported by the Amazon Redshift COPY operation that reads from the S3 bucket.



63
64
65
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 63

def compression
  @compression
end

#data_output_prefixString? (readonly)

Note:

Default: - "YYYY/MM/DD/HH/"

A prefix that Amazon Data Firehose evaluates and adds to records before writing them to S3.

This prefix appears immediately following the bucket name.



71
72
73
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 71

def data_output_prefix
  @data_output_prefix
end

#encryption_keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: - Data is not encrypted.

The AWS KMS key used to encrypt the data that it delivers to your Amazon S3 bucket.

Returns:



76
77
78
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 76

def encryption_key
  @encryption_key
end

#error_output_prefixString? (readonly)

Note:

Default: - See the documentation above

A prefix that Amazon Data Firehose evaluates and adds to failed records before writing them to S3.

This prefix appears immediately following the bucket name.



84
85
86
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 84

def error_output_prefix
  @error_output_prefix
end

#logging_configAWSCDK::KinesisFirehose::ILoggingConfig? (readonly)

Note:

Default: - errors will be logged and a log group will be created for you.

Configuration that determines whether to log errors during data transformation or delivery failures, and specifies the CloudWatch log group for storing error logs.



94
95
96
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 94

def logging_config
  @logging_config
end

#modeAWSCDK::KinesisFirehose::BackupMode? (readonly)

Note:

Default: - If bucket is provided, the default will be BackupMode.ALL. Otherwise, source records are not backed up to S3.

Indicates the mode by which incoming records should be backed up to S3, if any.

If bucket is provided, this will be implicitly set to BackupMode.ALL.



101
102
103
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 101

def mode
  @mode
end

Class Method Details

.jsii_propertiesObject



103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 103

def self.jsii_properties
  {
    :buffering_interval => "bufferingInterval",
    :buffering_size => "bufferingSize",
    :compression => "compression",
    :data_output_prefix => "dataOutputPrefix",
    :encryption_key => "encryptionKey",
    :error_output_prefix => "errorOutputPrefix",
    :bucket => "bucket",
    :logging_config => "loggingConfig",
    :mode => "mode",
  }
end

Instance Method Details

#to_jsiiObject



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'kinesis_firehose/destination_s3_backup_props.rb', line 117

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "bufferingInterval" => @buffering_interval,
    "bufferingSize" => @buffering_size,
    "compression" => @compression,
    "dataOutputPrefix" => @data_output_prefix,
    "encryptionKey" => @encryption_key,
    "errorOutputPrefix" => @error_output_prefix,
    "bucket" => @bucket,
    "loggingConfig" => @logging_config,
    "mode" => @mode,
  })
  result.compact
end