1 | import * as appscaling from '@aws-cdk/aws-applicationautoscaling';
|
2 | /**
|
3 | * Interface for scalable attributes
|
4 | */
|
5 | export interface IScalableTableAttribute {
|
6 | /**
|
7 | * Add scheduled scaling for this scaling attribute
|
8 | */
|
9 | scaleOnSchedule(id: string, actions: appscaling.ScalingSchedule): void;
|
10 | /**
|
11 | * Scale out or in to keep utilization at a given level
|
12 | */
|
13 | scaleOnUtilization(props: UtilizationScalingProps): void;
|
14 | }
|
15 | /**
|
16 | * Properties for enabling DynamoDB capacity scaling
|
17 | */
|
18 | export interface EnableScalingProps {
|
19 | /**
|
20 | * Minimum capacity to scale to
|
21 | */
|
22 | readonly minCapacity: number;
|
23 | /**
|
24 | * Maximum capacity to scale to
|
25 | */
|
26 | readonly maxCapacity: number;
|
27 | }
|
28 | /**
|
29 | * Properties for enabling DynamoDB utilization tracking
|
30 | */
|
31 | export interface UtilizationScalingProps extends appscaling.BaseTargetTrackingProps {
|
32 | /**
|
33 | * Target utilization percentage for the attribute
|
34 | */
|
35 | readonly targetUtilizationPercent: number;
|
36 | }
|