Class: AWSCDK::DynamoDB::Billing
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::DynamoDB::Billing
- Defined in:
- dynamo_db/billing.rb
Overview
Represents how capacity is managed and how you are charged for read and write throughput for a DynamoDB table.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.on_demand(props = nil) ⇒ AWSCDK::DynamoDB::Billing
Flexible billing option capable of serving requests without capacity planning.
-
.provisioned(props) ⇒ AWSCDK::DynamoDB::Billing
Specify the number of reads and writes per second that you need for your application.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Billing
constructor
A new instance of Billing.
- #mode ⇒ AWSCDK::DynamoDB::BillingMode
Constructor Details
#initialize(*args) ⇒ Billing
Returns a new instance of Billing.
8 9 10 |
# File 'dynamo_db/billing.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_dynamodb.Billing does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'dynamo_db/billing.rb', line 12 def self.jsii_overridable_methods { :mode => { kind: :property, name: "mode", is_optional: false }, } end |
.on_demand(props = nil) ⇒ AWSCDK::DynamoDB::Billing
Flexible billing option capable of serving requests without capacity planning.
Note: Billing mode will be PAY_PER_REQUEST.
24 25 26 27 28 |
# File 'dynamo_db/billing.rb', line 24 def self.on_demand(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::DynamoDB::MaxThroughputProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuTWF4VGhyb3VnaHB1dFByb3BzIn0=")), "props") unless props.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_dynamodb.Billing", "onDemand", [props]) end |
.provisioned(props) ⇒ AWSCDK::DynamoDB::Billing
Specify the number of reads and writes per second that you need for your application.
34 35 36 37 38 |
# File 'dynamo_db/billing.rb', line 34 def self.provisioned(props) props = props.is_a?(Hash) ? ::AWSCDK::DynamoDB::ThroughputProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuVGhyb3VnaHB1dFByb3BzIn0=")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_dynamodb.Billing", "provisioned", [props]) end |
Instance Method Details
#mode ⇒ AWSCDK::DynamoDB::BillingMode
41 42 43 |
# File 'dynamo_db/billing.rb', line 41 def mode() jsii_get_property("mode") end |