@aws-amplify/cli-internal
Version:
Amplify CLI
36 lines • 1.3 kB
TypeScript
import ts from 'typescript';
export interface DynamoDBAttribute {
readonly name: string;
readonly type: 'STRING' | 'NUMBER' | 'BINARY';
}
export interface DynamoDBGSI {
readonly indexName: string;
readonly partitionKey: DynamoDBAttribute;
readonly sortKey?: DynamoDBAttribute;
}
export interface DynamoDBTableDefinition {
readonly tableName: string;
readonly partitionKey: DynamoDBAttribute;
readonly sortKey?: DynamoDBAttribute;
readonly gsis?: readonly DynamoDBGSI[];
readonly billingMode?: 'PROVISIONED' | 'PAY_PER_REQUEST';
readonly readCapacity?: number;
readonly writeCapacity?: number;
readonly streamEnabled?: boolean;
readonly streamViewType?: 'KEYS_ONLY' | 'NEW_IMAGE' | 'OLD_IMAGE' | 'NEW_AND_OLD_IMAGES';
}
export declare class DynamoDBRenderer {
private readonly resourceName;
private readonly capitalizedName;
private readonly functionName;
constructor(resourceName: string);
render(table: DynamoDBTableDefinition): ts.NodeArray<ts.Node>;
private renderBackendTypeImport;
private renderCdkImports;
private renderCfnResourceImport;
private renderDefineStorage;
private renderPostRefactor;
private buildTableStatements;
private renderGSI;
}
//# sourceMappingURL=dynamodb.renderer.d.ts.map