Class: AWSCDK::Cassandra::CfnKeyspaceProps

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

Overview

Properties for defining a CfnKeyspace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client_side_timestamps_enabled: nil, keyspace_name: nil, replication_specification: nil, tags: nil) ⇒ CfnKeyspaceProps

Returns a new instance of CfnKeyspaceProps.

Parameters:

  • client_side_timestamps_enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether client-side timestamps are enabled (true) or disabled (false) for all tables in the keyspace.

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

    The name of the keyspace to be created.

  • replication_specification (AWSCDK::IResolvable, AWSCDK::Cassandra::CfnKeyspace::ReplicationSpecificationProperty, nil) (defaults to: nil)

    Specifies the ReplicationStrategy of a keyspace. The options are:.

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

    An array of key-value pairs to apply to this resource.



13
14
15
16
17
18
19
20
21
22
# File 'cassandra/cfn_keyspace_props.rb', line 13

def initialize(client_side_timestamps_enabled: nil, keyspace_name: nil, replication_specification: nil, tags: nil)
  @client_side_timestamps_enabled = client_side_timestamps_enabled
  Jsii::Type.check_type(@client_side_timestamps_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "clientSideTimestampsEnabled") unless @client_side_timestamps_enabled.nil?
  @keyspace_name = keyspace_name
  Jsii::Type.check_type(@keyspace_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyspaceName") unless @keyspace_name.nil?
  @replication_specification = replication_specification.is_a?(Hash) ? ::AWSCDK::Cassandra::CfnKeyspace::ReplicationSpecificationProperty.new(**replication_specification.transform_keys(&:to_sym)) : replication_specification
  Jsii::Type.check_type(@replication_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNzYW5kcmEuQ2ZuS2V5c3BhY2UuUmVwbGljYXRpb25TcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fQ==")), "replicationSpecification") unless @replication_specification.nil?
  @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?
end

Instance Attribute Details

#client_side_timestamps_enabledBoolean, ... (readonly)

Indicates whether client-side timestamps are enabled (true) or disabled (false) for all tables in the keyspace.

To add a Region to a single-Region keyspace with at least one table, the value must be set to true. After you've enabled client-side timestamps for a table, you can’t disable it again.



30
31
32
# File 'cassandra/cfn_keyspace_props.rb', line 30

def client_side_timestamps_enabled
  @client_side_timestamps_enabled
end

#keyspace_nameString? (readonly)

The name of the keyspace to be created.

The keyspace name is case sensitive. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the keyspace name. For more information, see Name type .

Length constraints: Minimum length of 1. Maximum length of 48.



39
40
41
# File 'cassandra/cfn_keyspace_props.rb', line 39

def keyspace_name
  @keyspace_name
end

#replication_specificationAWSCDK::IResolvable, ... (readonly)

Specifies the ReplicationStrategy of a keyspace. The options are:.

  • SINGLE_REGION for a single Region keyspace (optional) or
  • MULTI_REGION for a multi-Region keyspace

If no ReplicationStrategy is provided, the default is SINGLE_REGION . If you choose MULTI_REGION , you must also provide a RegionList with the AWS Regions that the keyspace is replicated in.



49
50
51
# File 'cassandra/cfn_keyspace_props.rb', line 49

def replication_specification
  @replication_specification
end

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

An array of key-value pairs to apply to this resource.

For more information, see Tag .



56
57
58
# File 'cassandra/cfn_keyspace_props.rb', line 56

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



58
59
60
61
62
63
64
65
# File 'cassandra/cfn_keyspace_props.rb', line 58

def self.jsii_properties
  {
    :client_side_timestamps_enabled => "clientSideTimestampsEnabled",
    :keyspace_name => "keyspaceName",
    :replication_specification => "replicationSpecification",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



67
68
69
70
71
72
73
74
75
76
# File 'cassandra/cfn_keyspace_props.rb', line 67

def to_jsii
  result = {}
  result.merge!({
    "clientSideTimestampsEnabled" => @client_side_timestamps_enabled,
    "keyspaceName" => @keyspace_name,
    "replicationSpecification" => @replication_specification,
    "tags" => @tags,
  })
  result.compact
end