Class: AWSCDK::KinesisFirehose::CfnDeliveryStream::DocumentIdOptionsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kinesis_firehose/cfn_delivery_stream.rb

Overview

Indicates the method for setting up document ID.

The supported methods are Firehose generated document ID and OpenSearch Service generated document ID.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(default_document_id_format:) ⇒ DocumentIdOptionsProperty

Returns a new instance of DocumentIdOptionsProperty.

Parameters:

  • default_document_id_format (String)

    When the FIREHOSE_DEFAULT option is chosen, Firehose generates a unique document ID for each record based on a unique internal identifier.



2149
2150
2151
2152
# File 'kinesis_firehose/cfn_delivery_stream.rb', line 2149

def initialize(default_document_id_format:)
  @default_document_id_format = default_document_id_format
  Jsii::Type.check_type(@default_document_id_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultDocumentIdFormat")
end

Instance Attribute Details

#default_document_id_formatString (readonly)

When the FIREHOSE_DEFAULT option is chosen, Firehose generates a unique document ID for each record based on a unique internal identifier.

The generated document ID is stable across multiple delivery attempts, which helps prevent the same record from being indexed multiple times with different document IDs.

When the NO_DOCUMENT_ID option is chosen, Firehose does not include any document IDs in the requests it sends to the Amazon OpenSearch Service. This causes the Amazon OpenSearch Service domain to generate document IDs. In case of multiple delivery attempts, this may cause the same record to be indexed more than once with different document IDs. This option enables write-heavy operations, such as the ingestion of logs and observability data, to consume less resources in the Amazon OpenSearch Service domain, resulting in improved performance.



2162
2163
2164
# File 'kinesis_firehose/cfn_delivery_stream.rb', line 2162

def default_document_id_format
  @default_document_id_format
end

Class Method Details

.jsii_propertiesObject



2164
2165
2166
2167
2168
# File 'kinesis_firehose/cfn_delivery_stream.rb', line 2164

def self.jsii_properties
  {
    :default_document_id_format => "defaultDocumentIdFormat",
  }
end

Instance Method Details

#to_jsiiObject



2170
2171
2172
2173
2174
2175
2176
# File 'kinesis_firehose/cfn_delivery_stream.rb', line 2170

def to_jsii
  result = {}
  result.merge!({
    "defaultDocumentIdFormat" => @default_document_id_format,
  })
  result.compact
end