UNPKG

cdk-rds-sql

Version:

A CDK construct that allows creating roles or users and databases an on Aurora Serverless Postgresql or Mysql/MariaDB cluster.

33 lines (32 loc) 930 B
import { CustomResource } from "aws-cdk-lib"; import { Construct } from "constructs"; import { Provider } from "./provider"; import { Role } from "./role"; interface DatabaseAttributes { /** * Name of database to create. */ readonly databaseName: string; /** * Optional database owner. */ readonly owner?: Role; } export interface DatabaseProps extends DatabaseAttributes { /** * Provider. */ readonly provider: Provider; } export interface IDatabase { readonly databaseName: string; } export declare class Database extends CustomResource implements IDatabase { /** * Return a Database based upon name only. Use for importing existing databases. */ static fromDatabaseName(scope: Construct, id: string, databaseName: string): IDatabase; readonly databaseName: string; constructor(scope: Construct, id: string, props: DatabaseProps); } export {};