java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.dynamodb.Billing
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:17.236Z") @Stability(Stable) public abstract class Billing extends software.amazon.jsii.JsiiObject
Represents how capacity is managed and how you are charged for read and write throughput for a DynamoDB table.

Example:

 import software.amazon.awscdk.*;
 App app = new App();
 Stack stack = Stack.Builder.create(app, "Stack").env(Environment.builder().region("us-west-2").build()).build();
 TableV2 globalTable = TableV2.Builder.create(stack, "GlobalTable")
         .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
         .billing(Billing.provisioned(ThroughputProps.builder()
                 .readCapacity(Capacity.fixed(10))
                 .writeCapacity(Capacity.autoscaled(AutoscaledCapacityOptions.builder().maxCapacity(15).build()))
                 .build()))
         .replicas(List.of(ReplicaTableProps.builder()
                 .region("us-east-1")
                 .build(), ReplicaTableProps.builder()
                 .region("us-east-2")
                 .readCapacity(Capacity.autoscaled(AutoscaledCapacityOptions.builder().maxCapacity(20).targetUtilizationPercent(50).build()))
                 .build()))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Billing(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Billing(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static Billing
    Flexible billing option capable of serving requests without capacity planning.
    static Billing
    Specify the number of reads and writes per second that you need for your application.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Billing

      protected Billing(software.amazon.jsii.JsiiObjectRef objRef)
    • Billing

      protected Billing(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • onDemand

      @Stability(Stable) @NotNull public static Billing onDemand()
      Flexible billing option capable of serving requests without capacity planning.

      Note: Billing mode will be PAY_PER_REQUEST.

    • provisioned

      @Stability(Stable) @NotNull public static Billing provisioned(@NotNull ThroughputProps props)
      Specify the number of reads and writes per second that you need for your application.

      Parameters:
      props - specifiy read and write capacity configurations. This parameter is required.
    • getMode

      @Stability(Stable) @NotNull public BillingMode getMode()