Class: AWSCDK::Cassandra::CfnTable::CdcSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cassandra/cfn_table.rb

Overview

The settings for the CDC stream of a table.

For more information about CDC streams, see Working with change data capture (CDC) streams in Amazon Keyspaces in the Amazon Keyspaces Developer Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status:, tags: nil, view_type: nil) ⇒ CdcSpecificationProperty

Returns a new instance of CdcSpecificationProperty.

Parameters:

  • status (String)

    The status of the CDC stream.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags (key-value pairs) that you want to apply to the stream.

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

    The view type specifies the changes Amazon Keyspaces records for each changed row in the stream.



871
872
873
874
875
876
877
878
# File 'cassandra/cfn_table.rb', line 871

def initialize(status:, tags: nil, view_type: nil)
  @status = status
  Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status")
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @view_type = view_type
  Jsii::Type.check_type(@view_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "viewType") unless @view_type.nil?
end

Instance Attribute Details

#statusString (readonly)

The status of the CDC stream.

You can enable or disable a stream for a table.



886
887
888
# File 'cassandra/cfn_table.rb', line 886

def status
  @status
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags (key-value pairs) that you want to apply to the stream.



891
892
893
# File 'cassandra/cfn_table.rb', line 891

def tags
  @tags
end

#view_typeString? (readonly)

Note:

Default: - "NEW_AND_OLD_IMAGES"

The view type specifies the changes Amazon Keyspaces records for each changed row in the stream.

After you create the stream, you can't make changes to this selection.

The options are:

  • NEW_AND_OLD_IMAGES - both versions of the row, before and after the change. This is the default.
  • NEW_IMAGE - the version of the row after the change.
  • OLD_IMAGE - the version of the row before the change.
  • KEYS_ONLY - the partition and clustering keys of the row that was changed.


906
907
908
# File 'cassandra/cfn_table.rb', line 906

def view_type
  @view_type
end

Class Method Details

.jsii_propertiesObject



908
909
910
911
912
913
914
# File 'cassandra/cfn_table.rb', line 908

def self.jsii_properties
  {
    :status => "status",
    :tags => "tags",
    :view_type => "viewType",
  }
end

Instance Method Details

#to_jsiiObject



916
917
918
919
920
921
922
923
924
# File 'cassandra/cfn_table.rb', line 916

def to_jsii
  result = {}
  result.merge!({
    "status" => @status,
    "tags" => @tags,
    "viewType" => @view_type,
  })
  result.compact
end