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.
46 lines (45 loc) • 1.26 kB
TypeScript
import { CustomResource } from "aws-cdk-lib";
import { Construct } from "constructs";
import { IDatabase } from "./database";
import { IProvider } from "./provider";
export interface RoleProps {
/**
* Provider.
*/
readonly provider: IProvider;
/**
* SQL.
*/
readonly roleName: string;
/**
* A new secret is created for this user.
*
* Optionally encrypt it with the given key.
*/
readonly passwordArn: string;
/**
* Optional database this user is expected to use.
*
* Specify none of `database` or `databaseName` or only one of them.
*
* @default no connection to any database is granted
*/
readonly database?: IDatabase;
/**
* Optional database name this user is expected to use.
*
* Specify none of `database` or `databaseName` or only one of them.
*
* @default no connection to any database is granted
*/
readonly databaseName?: string;
/**
* Enable IAM authentication for this role.
*
* @default false - use password authentication
*/
readonly enableIamAuth?: boolean;
}
export declare class Role extends CustomResource {
constructor(scope: Construct, id: string, props: RoleProps);
}