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

@Generated(value="jsii-pacmak/1.92.0 (build db7f27d)", date="2023-12-06T04:49:37.095Z") @Stability(Stable) public abstract class Capacity extends software.amazon.jsii.JsiiObject
Represents the amount of read and write operations supported by 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
    Capacity(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Capacity(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Capacity
    Dynamically adjusts provisioned throughput capacity on your behalf in response to actual traffic patterns.
    static Capacity
    fixed(Number iops)
    Provisioned throughput capacity is configured with fixed capacity units.
     

    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

    • Capacity

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

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

    • autoscaled

      @Stability(Stable) @NotNull public static Capacity autoscaled(@NotNull AutoscaledCapacityOptions options)
      Dynamically adjusts provisioned throughput capacity on your behalf in response to actual traffic patterns.

      Parameters:
      options - options used to configure autoscaled capacity mode. This parameter is required.
    • fixed

      @Stability(Stable) @NotNull public static Capacity fixed(@NotNull Number iops)
      Provisioned throughput capacity is configured with fixed capacity units.

      Note: You cannot configure write capacity using fixed capacity mode.

      Parameters:
      iops - the number of I/O operations per second. This parameter is required.
    • getMode

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