Class: AWSCDK::DynamoDB::CfnGlobalTable::StreamSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
dynamo_db/cfn_global_table.rb

Overview

Represents the DynamoDB Streams configuration for a table in DynamoDB .

You can only modify this value for a AWS::DynamoDB::GlobalTable resource configured for multi-Region eventual consistency (MREC, the default) if that resource contains only one entry in Replicas . You must specify a value for this property for a AWS::DynamoDB::GlobalTable resource configured for MREC with more than one entry in Replicas . For Multi-Region Strong Consistency (MRSC), Streams are not required and can be changed for existing tables.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stream_view_type:) ⇒ StreamSpecificationProperty

Returns a new instance of StreamSpecificationProperty.

Parameters:

  • stream_view_type (String)

    When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.



1916
1917
1918
1919
# File 'dynamo_db/cfn_global_table.rb', line 1916

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

Instance Attribute Details

#stream_view_typeString (readonly)

When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.

Valid values for StreamViewType are:

  • KEYS_ONLY - Only the key attributes of the modified item are written to the stream.
  • NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream.
  • OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream.
  • NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.


1932
1933
1934
# File 'dynamo_db/cfn_global_table.rb', line 1932

def stream_view_type
  @stream_view_type
end

Class Method Details

.jsii_propertiesObject



1934
1935
1936
1937
1938
# File 'dynamo_db/cfn_global_table.rb', line 1934

def self.jsii_properties
  {
    :stream_view_type => "streamViewType",
  }
end

Instance Method Details

#to_jsiiObject



1940
1941
1942
1943
1944
1945
1946
# File 'dynamo_db/cfn_global_table.rb', line 1940

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