import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class RdsDb extends PolicyStatement { public servicePrefix = 'rds-db' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Allows IAM role or user to connect to RDS database
     *
     * Access Level: Permissions management
     *
     * https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.IAMPolicy.html
     */ public toConnect ( ) { return this . to ( 'connect' ) ; } protected accessLevelList : AccessLevelList = { 'Permissions management' : [ 'connect' ] } ; param dbiResourceId param dbUserName param account param region param partition public onDbUser ( dbiResourceId , dbUserName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:rds-db:${ region || '*' }:${ account || '*' }:dbuser:${ dbiResourceId }/${ dbUserName }` ) ; } }