Class: AWSCDK::DynamoDB::Billing

Inherits:
Jsii::Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Billing

Returns a new instance of Billing.

Raises:

  • (NoMethodError)


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_methodsObject



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.

Parameters:

Returns:

  • (AWSCDK::DynamoDB::Billing)


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.

Parameters:

Returns:

  • (AWSCDK::DynamoDB::Billing)


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

#modeAWSCDK::DynamoDB::BillingMode



41
42
43
# File 'dynamo_db/billing.rb', line 41

def mode()
  jsii_get_property("mode")
end