@cloudcamp/aws-runtime
Version:
CloudCamp - Launch faster by building scalable infrastructure in few lines of code.
90 lines (89 loc) • 1.75 kB
TypeScript
import * as rds from "aws-cdk-lib/aws-rds";
import { Construct } from "constructs";
declare type DatabaseCapacity = 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 192 | 256 | 384;
/**
* @experimental
*/
export interface DatabaseProps {
/**
* @default "postgres"
* @experimental
*/
readonly engine?: "mysql" | "postgres";
/**
* @experimental
*/
readonly databaseName?: string;
/**
* @experimental
*/
readonly username?: string;
/**
* @experimental
*/
readonly autoPause?: number;
/**
* @experimental
*/
readonly minCapacity?: DatabaseCapacity;
/**
* @experimental
*/
readonly maxCapacity?: DatabaseCapacity;
}
/**
* @experimental
*/
export interface DatabaseVariables {
/**
* @experimental
*/
readonly databaseUrl: string;
/**
* @experimental
*/
readonly databaseName: string;
/**
* @experimental
*/
readonly databaseUsername: string;
/**
* @experimental
*/
readonly databasePassword: string;
/**
* @experimental
*/
readonly databaseHost: string;
/**
* @experimental
*/
readonly databasePort: string;
/**
* @experimental
*/
readonly databaseType: string;
}
/**
* @experimental
* @order 5
*/
export declare class Database extends Construct {
/**
* @experimental
*/
cluster: rds.IServerlessCluster;
/**
* @experimental
*/
vars: DatabaseVariables;
/**
* @param scope the scope.
* @param id the id.
* @param props the props.
* @experimental
*/
constructor(scope: Construct, id: string, props?: DatabaseProps);
private getCapacity;
}
export {};