UNPKG

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.

32 lines (31 loc) 882 B
import { CustomResource } from "aws-cdk-lib"; import { Construct } from "constructs"; import { IDatabase } from "./database"; import { IProvider } from "./provider"; import { Role } from "./role"; export interface SchemaProps { /** * Provider. */ readonly provider: IProvider; /** * Optional database. * * @default - use default database */ readonly database?: IDatabase; /** * Schema name. */ readonly schemaName: string; /** * Optional role which will be granted usage and create permissions * to this schema. This way the role can read its own tables, but * cannot see or access tables created by others. */ readonly role?: Role; } export declare class Schema extends CustomResource { readonly schemaName: string; constructor(scope: Construct, id: string, props: SchemaProps); }