Class: AWSCDK::Cassandra::CfnKeyspace::ReplicationSpecificationProperty

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

Overview

You can use ReplicationSpecification to configure the ReplicationStrategy of a keyspace in Amazon Keyspaces .

The ReplicationSpecification property applies automatically to all tables in the keyspace.

To review the permissions that are required to add a new Region to a single-Region keyspace, see Configure the IAM permissions required to add an AWS Region to a keyspace in the Amazon Keyspaces Developer Guide .

For more information about multi-Region replication, see Multi-Region replication in the Amazon Keyspaces Developer Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(region_list: nil, replication_strategy: nil) ⇒ ReplicationSpecificationProperty

Returns a new instance of ReplicationSpecificationProperty.

Parameters:

  • region_list (Array<String>, nil) (defaults to: nil)

    Specifies the AWS Regions that the keyspace is replicated in.

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

    The options are:.



573
574
575
576
577
578
# File 'cassandra/cfn_keyspace.rb', line 573

def initialize(region_list: nil, replication_strategy: nil)
  @region_list = region_list
  Jsii::Type.check_type(@region_list, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "regionList") unless @region_list.nil?
  @replication_strategy = replication_strategy
  Jsii::Type.check_type(@replication_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "replicationStrategy") unless @replication_strategy.nil?
end

Instance Attribute Details

#region_listArray<String>? (readonly)

Specifies the AWS Regions that the keyspace is replicated in.

You must specify at least two Regions, including the Region that the keyspace is being created in.

To specify a Region that's disabled by default , you must first enable the Region. For more information, see Multi-Region replication in AWS Regions disabled by default in the Amazon Keyspaces Developer Guide .



588
589
590
# File 'cassandra/cfn_keyspace.rb', line 588

def region_list
  @region_list
end

#replication_strategyString? (readonly)

The options are:.

  • SINGLE_REGION (optional)
  • MULTI_REGION

If no value is specified, the default is SINGLE_REGION . If MULTI_REGION is specified, RegionList is required.



598
599
600
# File 'cassandra/cfn_keyspace.rb', line 598

def replication_strategy
  @replication_strategy
end

Class Method Details

.jsii_propertiesObject



600
601
602
603
604
605
# File 'cassandra/cfn_keyspace.rb', line 600

def self.jsii_properties
  {
    :region_list => "regionList",
    :replication_strategy => "replicationStrategy",
  }
end

Instance Method Details

#to_jsiiObject



607
608
609
610
611
612
613
614
# File 'cassandra/cfn_keyspace.rb', line 607

def to_jsii
  result = {}
  result.merge!({
    "regionList" => @region_list,
    "replicationStrategy" => @replication_strategy,
  })
  result.compact
end