cdk-rds-sql
Version:
A CDK construct that allows creating roles or users and databases on Aurora Serverless PostgreSQL or MySQL/MariaDB clusters, as well as AWS DSQL clusters.
33 lines (32 loc) • 932 B
TypeScript
import { CustomResource } from "aws-cdk-lib";
import { Construct } from "constructs";
import { IProvider } 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: IProvider;
}
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 {};