Class: AWSCDK::DynamoDB::CfnTable::OnDemandThroughputProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::CfnTable::OnDemandThroughputProperty
- Defined in:
- dynamo_db/cfn_table.rb
Overview
Sets the maximum number of read and write units for the specified on-demand table.
If you use this property, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.
Instance Attribute Summary collapse
-
#max_read_request_units ⇒ Numeric?
readonly
Maximum number of read request units for the specified table.
-
#max_write_request_units ⇒ Numeric?
readonly
Maximum number of write request units for the specified table.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_read_request_units: nil, max_write_request_units: nil) ⇒ OnDemandThroughputProperty
constructor
A new instance of OnDemandThroughputProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_read_request_units: nil, max_write_request_units: nil) ⇒ OnDemandThroughputProperty
Returns a new instance of OnDemandThroughputProperty.
1336 1337 1338 1339 1340 1341 |
# File 'dynamo_db/cfn_table.rb', line 1336 def initialize(max_read_request_units: nil, max_write_request_units: nil) @max_read_request_units = max_read_request_units Jsii::Type.check_type(@max_read_request_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxReadRequestUnits") unless @max_read_request_units.nil? @max_write_request_units = max_write_request_units Jsii::Type.check_type(@max_write_request_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxWriteRequestUnits") unless @max_write_request_units.nil? end |
Instance Attribute Details
#max_read_request_units ⇒ Numeric? (readonly)
Maximum number of read request units for the specified table.
To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.
1349 1350 1351 |
# File 'dynamo_db/cfn_table.rb', line 1349 def max_read_request_units @max_read_request_units end |
#max_write_request_units ⇒ Numeric? (readonly)
Maximum number of write request units for the specified table.
To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.
1356 1357 1358 |
# File 'dynamo_db/cfn_table.rb', line 1356 def max_write_request_units @max_write_request_units end |
Class Method Details
.jsii_properties ⇒ Object
1358 1359 1360 1361 1362 1363 |
# File 'dynamo_db/cfn_table.rb', line 1358 def self.jsii_properties { :max_read_request_units => "maxReadRequestUnits", :max_write_request_units => "maxWriteRequestUnits", } end |
Instance Method Details
#to_jsii ⇒ Object
1365 1366 1367 1368 1369 1370 1371 1372 |
# File 'dynamo_db/cfn_table.rb', line 1365 def to_jsii result = {} result.merge!({ "maxReadRequestUnits" => @max_read_request_units, "maxWriteRequestUnits" => @max_write_request_units, }) result.compact end |