Class: AWSCDK::Cassandra::CfnTable::BillingModeProperty

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

Overview

Determines the billing mode for the table - on-demand or provisioned.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mode:, provisioned_throughput: nil) ⇒ BillingModeProperty

Returns a new instance of BillingModeProperty.

Parameters:



815
816
817
818
819
820
# File 'cassandra/cfn_table.rb', line 815

def initialize(mode:, provisioned_throughput: nil)
  @mode = mode
  Jsii::Type.check_type(@mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mode")
  @provisioned_throughput = provisioned_throughput.is_a?(Hash) ? ::AWSCDK::Cassandra::CfnTable::ProvisionedThroughputProperty.new(**provisioned_throughput.transform_keys(&:to_sym)) : provisioned_throughput
  Jsii::Type.check_type(@provisioned_throughput, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNzYW5kcmEuQ2ZuVGFibGUuUHJvdmlzaW9uZWRUaHJvdWdocHV0UHJvcGVydHkifV19fQ==")), "provisionedThroughput") unless @provisioned_throughput.nil?
end

Instance Attribute Details

#modeString (readonly)

Note:

Default: - "ON_DEMAND"

The billing mode for the table:.

  • On-demand mode - ON_DEMAND
  • Provisioned mode - PROVISIONED

If you choose PROVISIONED mode, then you also need to specify provisioned throughput (read and write capacity) for the table.

Valid values: ON_DEMAND | PROVISIONED



834
835
836
# File 'cassandra/cfn_table.rb', line 834

def mode
  @mode
end

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

The provisioned read capacity and write capacity for the table.

For more information, see Provisioned throughput capacity mode in the Amazon Keyspaces Developer Guide .



841
842
843
# File 'cassandra/cfn_table.rb', line 841

def provisioned_throughput
  @provisioned_throughput
end

Class Method Details

.jsii_propertiesObject



843
844
845
846
847
848
# File 'cassandra/cfn_table.rb', line 843

def self.jsii_properties
  {
    :mode => "mode",
    :provisioned_throughput => "provisionedThroughput",
  }
end

Instance Method Details

#to_jsiiObject



850
851
852
853
854
855
856
857
# File 'cassandra/cfn_table.rb', line 850

def to_jsii
  result = {}
  result.merge!({
    "mode" => @mode,
    "provisionedThroughput" => @provisioned_throughput,
  })
  result.compact
end