# AutoscaledCapacityOptions

Options used to configure autoscaled capacity.

- Source: [`aws-dynamodb/lib/capacity.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-dynamodb/lib/capacity.ts#L23)
- Type last changed: v2.104.0 · 2 Nov 2023

## Example

```ts
import * as cdk from 'aws-cdk-lib';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack', { env: { region: 'us-west-2' } });

const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
  partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
  billing: dynamodb.Billing.provisioned({
    readCapacity: dynamodb.Capacity.fixed(10),
    writeCapacity: dynamodb.Capacity.autoscaled({ maxCapacity: 15 }),
  }),
  replicas: [
    {
      region: 'us-east-1',
    },
    {
      region: 'us-east-2',
      readCapacity: dynamodb.Capacity.autoscaled({ maxCapacity: 20, targetUtilizationPercent: 50 }),
    },
  ],
});
```

## Properties

- `maxCapacity`: number (required) — The maximum allowable capacity.

- `minCapacity`: number = 1 — The minimum allowable capacity.

- `seedCapacity`: number — If you want to switch a table's billing mode from on-demand to provisioned or from provisioned to on-demand, you must specify a value for this property for each autoscaled resource.

  **Default:** no seed capacity

- `targetUtilizationPercent`: number = 70 — The ratio of consumed capacity units to provisioned capacity units.

  Note: Target utilization percent cannot be less than 20 and cannot be greater
  than 90.
