Class: AWSCDK::Cassandra::CfnTableProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cassandra::CfnTableProps
- Defined in:
- cassandra/cfn_table_props.rb
Overview
Properties for defining a CfnTable.
Instance Attribute Summary collapse
-
#auto_scaling_specifications ⇒ AWSCDK::IResolvable, ...
readonly
The optional auto scaling capacity settings for a table in provisioned capacity mode.
-
#billing_mode ⇒ AWSCDK::IResolvable, ...
readonly
The billing mode for the table, which determines how you'll be charged for reads and writes:.
-
#cdc_specification ⇒ AWSCDK::IResolvable, ...
readonly
The settings for the CDC stream of a table.
-
#client_side_timestamps_enabled ⇒ Boolean, ...
readonly
Enables client-side timestamps for the table.
-
#clustering_key_columns ⇒ AWSCDK::IResolvable, ...
readonly
One or more columns that determine how the table data is sorted.
-
#default_time_to_live ⇒ Numeric?
readonly
The default Time To Live (TTL) value for all rows in a table in seconds.
-
#encryption_specification ⇒ AWSCDK::IResolvable, ...
readonly
The encryption at rest options for the table.
-
#keyspace_name ⇒ String
readonly
The name of the keyspace to create the table in.
-
#partition_key_columns ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Cassandra::CfnTable::ColumnProperty>
readonly
One or more columns that uniquely identify every row in the table.
-
#point_in_time_recovery_enabled ⇒ Boolean, ...
readonly
Specifies if point-in-time recovery is enabled or disabled for the table.
-
#regular_columns ⇒ AWSCDK::IResolvable, ...
readonly
One or more columns that are not part of the primary key - that is, columns that are not defined as partition key columns or clustering key columns.
-
#replica_specifications ⇒ AWSCDK::IResolvable, ...
readonly
The AWS Region specific settings of a multi-Region table.
-
#table_name ⇒ String?
readonly
The name of the table to be created.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to this resource.
-
#warm_throughput ⇒ AWSCDK::IResolvable, ...
readonly
Warm throughput configuration for the table.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(keyspace_name:, partition_key_columns:, auto_scaling_specifications: nil, billing_mode: nil, cdc_specification: nil, client_side_timestamps_enabled: nil, clustering_key_columns: nil, default_time_to_live: nil, encryption_specification: nil, point_in_time_recovery_enabled: nil, regular_columns: nil, replica_specifications: nil, table_name: nil, tags: nil, warm_throughput: nil) ⇒ CfnTableProps
constructor
A new instance of CfnTableProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(keyspace_name:, partition_key_columns:, auto_scaling_specifications: nil, billing_mode: nil, cdc_specification: nil, client_side_timestamps_enabled: nil, clustering_key_columns: nil, default_time_to_live: nil, encryption_specification: nil, point_in_time_recovery_enabled: nil, regular_columns: nil, replica_specifications: nil, table_name: nil, tags: nil, warm_throughput: nil) ⇒ CfnTableProps
Returns a new instance of CfnTableProps.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'cassandra/cfn_table_props.rb', line 24 def initialize(keyspace_name:, partition_key_columns:, auto_scaling_specifications: nil, billing_mode: nil, cdc_specification: nil, client_side_timestamps_enabled: nil, clustering_key_columns: nil, default_time_to_live: nil, encryption_specification: nil, point_in_time_recovery_enabled: nil, regular_columns: nil, replica_specifications: nil, table_name: nil, tags: nil, warm_throughput: nil) @keyspace_name = keyspace_name Jsii::Type.check_type(@keyspace_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyspaceName") @partition_key_columns = partition_key_columns Jsii::Type.check_type(@partition_key_columns, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2Fzc2FuZHJhLkNmblRhYmxlLkNvbHVtblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "partitionKeyColumns") @auto_scaling_specifications = auto_scaling_specifications.is_a?(Hash) ? ::AWSCDK::Cassandra::CfnTable::AutoScalingSpecificationProperty.new(**auto_scaling_specifications.transform_keys(&:to_sym)) : auto_scaling_specifications Jsii::Type.check_type(@auto_scaling_specifications, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNzYW5kcmEuQ2ZuVGFibGUuQXV0b1NjYWxpbmdTcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fQ==")), "autoScalingSpecifications") unless @auto_scaling_specifications.nil? @billing_mode = billing_mode.is_a?(Hash) ? ::AWSCDK::Cassandra::CfnTable::BillingModeProperty.new(**billing_mode.transform_keys(&:to_sym)) : billing_mode Jsii::Type.check_type(@billing_mode, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNzYW5kcmEuQ2ZuVGFibGUuQmlsbGluZ01vZGVQcm9wZXJ0eSJ9XX19")), "billingMode") unless @billing_mode.nil? @cdc_specification = cdc_specification.is_a?(Hash) ? ::AWSCDK::Cassandra::CfnTable::CdcSpecificationProperty.new(**cdc_specification.transform_keys(&:to_sym)) : cdc_specification Jsii::Type.check_type(@cdc_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNzYW5kcmEuQ2ZuVGFibGUuQ2RjU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "cdcSpecification") unless @cdc_specification.nil? @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? @clustering_key_columns = clustering_key_columns Jsii::Type.check_type(@clustering_key_columns, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2Fzc2FuZHJhLkNmblRhYmxlLkNsdXN0ZXJpbmdLZXlDb2x1bW5Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "clusteringKeyColumns") unless @clustering_key_columns.nil? @default_time_to_live = default_time_to_live Jsii::Type.check_type(@default_time_to_live, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "defaultTimeToLive") unless @default_time_to_live.nil? @encryption_specification = encryption_specification.is_a?(Hash) ? ::AWSCDK::Cassandra::CfnTable::EncryptionSpecificationProperty.new(**encryption_specification.transform_keys(&:to_sym)) : encryption_specification Jsii::Type.check_type(@encryption_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNzYW5kcmEuQ2ZuVGFibGUuRW5jcnlwdGlvblNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "encryptionSpecification") unless @encryption_specification.nil? @point_in_time_recovery_enabled = point_in_time_recovery_enabled Jsii::Type.check_type(@point_in_time_recovery_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "pointInTimeRecoveryEnabled") unless @point_in_time_recovery_enabled.nil? @regular_columns = regular_columns Jsii::Type.check_type(@regular_columns, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2Fzc2FuZHJhLkNmblRhYmxlLkNvbHVtblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "regularColumns") unless @regular_columns.nil? @replica_specifications = replica_specifications Jsii::Type.check_type(@replica_specifications, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2Fzc2FuZHJhLkNmblRhYmxlLlJlcGxpY2FTcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "replicaSpecifications") unless @replica_specifications.nil? @table_name = table_name Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName") unless @table_name.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @warm_throughput = warm_throughput.is_a?(Hash) ? ::AWSCDK::Cassandra::CfnTable::WarmThroughputProperty.new(**warm_throughput.transform_keys(&:to_sym)) : warm_throughput Jsii::Type.check_type(@warm_throughput, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNzYW5kcmEuQ2ZuVGFibGUuV2FybVRocm91Z2hwdXRQcm9wZXJ0eSJ9XX19")), "warmThroughput") unless @warm_throughput.nil? end |
Instance Attribute Details
#auto_scaling_specifications ⇒ AWSCDK::IResolvable, ... (readonly)
The optional auto scaling capacity settings for a table in provisioned capacity mode.
75 76 77 |
# File 'cassandra/cfn_table_props.rb', line 75 def auto_scaling_specifications @auto_scaling_specifications end |
#billing_mode ⇒ AWSCDK::IResolvable, ... (readonly)
The billing mode for the table, which determines how you'll be charged for reads and writes:.
- On-demand mode (default) - You pay based on the actual reads and writes your application performs.
- Provisioned mode - Lets you specify the number of reads and writes per second that you need for your application.
If you don't specify a value for this property, then the table will use on-demand mode.
85 86 87 |
# File 'cassandra/cfn_table_props.rb', line 85 def billing_mode @billing_mode end |
#cdc_specification ⇒ AWSCDK::IResolvable, ... (readonly)
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 .
92 93 94 |
# File 'cassandra/cfn_table_props.rb', line 92 def cdc_specification @cdc_specification end |
#client_side_timestamps_enabled ⇒ Boolean, ... (readonly)
Enables client-side timestamps for the table.
By default, the setting is disabled. You can enable client-side timestamps with the following option:
status: "enabled"
After client-side timestamps are enabled for a table, you can't disable this setting.
103 104 105 |
# File 'cassandra/cfn_table_props.rb', line 103 def @client_side_timestamps_enabled end |
#clustering_key_columns ⇒ AWSCDK::IResolvable, ... (readonly)
One or more columns that determine how the table data is sorted.
108 109 110 |
# File 'cassandra/cfn_table_props.rb', line 108 def clustering_key_columns @clustering_key_columns end |
#default_time_to_live ⇒ Numeric? (readonly)
The default Time To Live (TTL) value for all rows in a table in seconds.
The maximum configurable value is 630,720,000 seconds, which is the equivalent of 20 years. By default, the TTL value for a table is 0, which means data does not expire.
For more information, see Setting the default TTL value for a table in the Amazon Keyspaces Developer Guide .
117 118 119 |
# File 'cassandra/cfn_table_props.rb', line 117 def default_time_to_live @default_time_to_live end |
#encryption_specification ⇒ AWSCDK::IResolvable, ... (readonly)
The encryption at rest options for the table.
- AWS owned key (default) - The key is owned by Amazon Keyspaces .
- Customer managed key - The key is stored in your account and is created, owned, and managed by you.
If you choose encryption with a customer managed key, you must specify a valid customer managed KMS key with permissions granted to Amazon Keyspaces.
For more information, see Encryption at rest in Amazon Keyspaces in the Amazon Keyspaces Developer Guide .
129 130 131 |
# File 'cassandra/cfn_table_props.rb', line 129 def encryption_specification @encryption_specification end |
#keyspace_name ⇒ String (readonly)
The name of the keyspace to create the table in.
The keyspace must already exist.
63 64 65 |
# File 'cassandra/cfn_table_props.rb', line 63 def keyspace_name @keyspace_name end |
#partition_key_columns ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Cassandra::CfnTable::ColumnProperty> (readonly)
One or more columns that uniquely identify every row in the table.
Every table must have a partition key.
70 71 72 |
# File 'cassandra/cfn_table_props.rb', line 70 def partition_key_columns @partition_key_columns end |
#point_in_time_recovery_enabled ⇒ Boolean, ... (readonly)
Specifies if point-in-time recovery is enabled or disabled for the table.
The options are PointInTimeRecoveryEnabled=true and PointInTimeRecoveryEnabled=false . If not specified, the default is PointInTimeRecoveryEnabled=false .
136 137 138 |
# File 'cassandra/cfn_table_props.rb', line 136 def point_in_time_recovery_enabled @point_in_time_recovery_enabled end |
#regular_columns ⇒ AWSCDK::IResolvable, ... (readonly)
One or more columns that are not part of the primary key - that is, columns that are not defined as partition key columns or clustering key columns.
You can add regular columns to existing tables by adding them to the template.
143 144 145 |
# File 'cassandra/cfn_table_props.rb', line 143 def regular_columns @regular_columns end |
#replica_specifications ⇒ AWSCDK::IResolvable, ... (readonly)
The AWS Region specific settings of a multi-Region table.
For a multi-Region table, you can configure the table's read capacity differently per AWS Region. You can do this by configuring the following parameters.
region: The Region where these settings are applied. (Required)read_capacity_units: The provisioned read capacity units. (Optional)read_capacity_auto_scaling: The read capacity auto scaling settings for the table. (Optional)
154 155 156 |
# File 'cassandra/cfn_table_props.rb', line 154 def replica_specifications @replica_specifications end |
#table_name ⇒ String? (readonly)
The name of the table to be created.
The table name is case sensitive. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the table name. For more information, see Name type .
If you specify a name, you can't perform updates that require replacing this resource. You can perform updates that require no interruption or some interruption. If you must replace the resource, specify a new name.
Length constraints: Minimum length of 3. Maximum length of 255.
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_]{1,47}$
167 168 169 |
# File 'cassandra/cfn_table_props.rb', line 167 def table_name @table_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs to apply to this resource.
For more information, see Tag .
174 175 176 |
# File 'cassandra/cfn_table_props.rb', line 174 def @tags end |
#warm_throughput ⇒ AWSCDK::IResolvable, ... (readonly)
Warm throughput configuration for the table.
179 180 181 |
# File 'cassandra/cfn_table_props.rb', line 179 def warm_throughput @warm_throughput end |
Class Method Details
.jsii_properties ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'cassandra/cfn_table_props.rb', line 181 def self.jsii_properties { :keyspace_name => "keyspaceName", :partition_key_columns => "partitionKeyColumns", :auto_scaling_specifications => "autoScalingSpecifications", :billing_mode => "billingMode", :cdc_specification => "cdcSpecification", :client_side_timestamps_enabled => "clientSideTimestampsEnabled", :clustering_key_columns => "clusteringKeyColumns", :default_time_to_live => "defaultTimeToLive", :encryption_specification => "encryptionSpecification", :point_in_time_recovery_enabled => "pointInTimeRecoveryEnabled", :regular_columns => "regularColumns", :replica_specifications => "replicaSpecifications", :table_name => "tableName", :tags => "tags", :warm_throughput => "warmThroughput", } end |
Instance Method Details
#to_jsii ⇒ Object
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'cassandra/cfn_table_props.rb', line 201 def to_jsii result = {} result.merge!({ "keyspaceName" => @keyspace_name, "partitionKeyColumns" => @partition_key_columns, "autoScalingSpecifications" => @auto_scaling_specifications, "billingMode" => @billing_mode, "cdcSpecification" => @cdc_specification, "clientSideTimestampsEnabled" => @client_side_timestamps_enabled, "clusteringKeyColumns" => @clustering_key_columns, "defaultTimeToLive" => @default_time_to_live, "encryptionSpecification" => @encryption_specification, "pointInTimeRecoveryEnabled" => @point_in_time_recovery_enabled, "regularColumns" => @regular_columns, "replicaSpecifications" => @replica_specifications, "tableName" => @table_name, "tags" => @tags, "warmThroughput" => @warm_throughput, }) result.compact end |