import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class Cassandra extends PolicyStatement { public servicePrefix = 'cassandra' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to alter a keyspace or table
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     */ public toAlter ( ) { return this . to ( 'Alter' ) ; } /**
     * Grants permission to create a keyspace or table
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     */ public toCreate ( ) { return this . to ( 'Create' ) ; } /**
     * Grants permission to drop a keyspace or table
     *
     * Access Level: Write
     */ public toDrop ( ) { return this . to ( 'Drop' ) ; } /**
     * Grants permission to INSERT, UPDATE or DELETE data in a table
     *
     * Access Level: Write
     */ public toModify ( ) { return this . to ( 'Modify' ) ; } /**
     * Grants permission to restore table from a backup
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     */ public toRestore ( ) { return this . to ( 'Restore' ) ; } /**
     * Grants permission to SELECT data from a table
     *
     * Access Level: Read
     */ public toSelect ( ) { return this . to ( 'Select' ) ; } /**
     * Grants permission to tag a keyspace or table
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to untag a keyspace or table
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'Alter' , 'Create' , 'Drop' , 'Modify' , 'Restore' ] , Read : [ 'Select' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param keyspaceName param account param region param partition public onKeyspace ( keyspaceName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:cassandra:${ region || '*' }:${ account || '*' }:/keyspace/${ keyspaceName }` ) ; } param keyspaceName param tableName param account param region param partition public onTable ( keyspaceName , tableName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:cassandra:${ region || '*' }:${ account || '*' }:/keyspace/${ keyspaceName }/table/${ tableName }` ) ; } }