import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class Timestream extends PolicyStatement { public servicePrefix = 'timestream' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to cancel queries in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_CancelQuery.html
     */ public toCancelQuery ( ) { return this . to ( 'CancelQuery' ) ; } /**
     * Grants permission to create a database in your account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_CreateDatabase.html
     */ public toCreateDatabase ( ) { return this . to ( 'CreateDatabase' ) ; } /**
     * Grants permission to create a scheduled query in your account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * Dependent actions:
     * - iam:PassRole
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_CreateScheduledQuery.html
     */ public toCreateScheduledQuery ( ) { return this . to ( 'CreateScheduledQuery' ) ; } /**
     * Grants permission to create a table in your account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_CreateTable.html
     */ public toCreateTable ( ) { return this . to ( 'CreateTable' ) ; } /**
     * Grants permission to delete a database in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_DeleteDatabase.html
     */ public toDeleteDatabase ( ) { return this . to ( 'DeleteDatabase' ) ; } /**
     * Grants permission to delete a scheduled query in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_DeleteScheduledQuery.html
     */ public toDeleteScheduledQuery ( ) { return this . to ( 'DeleteScheduledQuery' ) ; } /**
     * Grants permission to delete a table in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_DeleteTable.html
     */ public toDeleteTable ( ) { return this . to ( 'DeleteTable' ) ; } /**
     * Grants permission to describe a database in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_DescribeDatabase.html
     */ public toDescribeDatabase ( ) { return this . to ( 'DescribeDatabase' ) ; } /**
     * Grants permission to describe timestream endpoints
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_DescribeEndpoints.html
     */ public toDescribeEndpoints ( ) { return this . to ( 'DescribeEndpoints' ) ; } /**
     * Grants permission to describe a scheduled query in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_DescribeScheduledQuery.html
     */ public toDescribeScheduledQuery ( ) { return this . to ( 'DescribeScheduledQuery' ) ; } /**
     * Grants permission to describe a table in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_DescribeTable.html
     */ public toDescribeTable ( ) { return this . to ( 'DescribeTable' ) ; } /**
     * Grants permission to execute a scheduled query in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_ExecuteScheduledQuery.html
     */ public toExecuteScheduledQuery ( ) { return this . to ( 'ExecuteScheduledQuery' ) ; } /**
     * Grants permission to list databases in your account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_ListDatabases.html
     */ public toListDatabases ( ) { return this . to ( 'ListDatabases' ) ; } /**
     * Grants permission to list measures of a table in your account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_Query.html
     */ public toListMeasures ( ) { return this . to ( 'ListMeasures' ) ; } /**
     * Grants permission to list scheduled queries in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_ListScheduledQueries.html
     */ public toListScheduledQueries ( ) { return this . to ( 'ListScheduledQueries' ) ; } /**
     * Grants permission to list tables in your account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_ListTables.html
     */ public toListTables ( ) { return this . to ( 'ListTables' ) ; } /**
     * Grants permission to list tags of a resource in your account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to issue 'select from table' queries
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_Query.html
     */ public toSelect ( ) { return this . to ( 'Select' ) ; } /**
     * Grants permission to issue 'select 1' queries
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_Query.html
     */ public toSelectValues ( ) { return this . to ( 'SelectValues' ) ; } /**
     * Grants permission to add tags to a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to remove a tag from a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to update a database in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_UpdateDatabase.html
     */ public toUpdateDatabase ( ) { return this . to ( 'UpdateDatabase' ) ; } /**
     * Grants permission to update a scheduled query in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_UpdateScheduledQuery.html
     */ public toUpdateScheduledQuery ( ) { return this . to ( 'UpdateScheduledQuery' ) ; } /**
     * Grants permission to update a table in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_UpdateTable.html
     */ public toUpdateTable ( ) { return this . to ( 'UpdateTable' ) ; } /**
     * Grants permission to ingest data to a table in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/timestream/latest/developerguide/API_WriteRecords.html
     */ public toWriteRecords ( ) { return this . to ( 'WriteRecords' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CancelQuery' , 'CreateDatabase' , 'CreateScheduledQuery' , 'CreateTable' , 'DeleteDatabase' , 'DeleteScheduledQuery' , 'DeleteTable' , 'ExecuteScheduledQuery' , 'UpdateDatabase' , 'UpdateScheduledQuery' , 'UpdateTable' , 'WriteRecords' ] , Read : [ 'DescribeDatabase' , 'DescribeScheduledQuery' , 'DescribeTable' , 'ListScheduledQueries' , 'Select' , 'SelectValues' ] , List : [ 'DescribeEndpoints' , 'ListDatabases' , 'ListMeasures' , 'ListTables' , 'ListTagsForResource' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param databaseName param account param region param partition public onDatabase ( databaseName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:timestream:${ region || '*' }:${ account || '*' }:database/${ databaseName }` ) ; } param databaseName param tableName param account param region param partition public onTable ( databaseName , tableName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:timestream:${ region || '*' }:${ account || '*' }:database/${ databaseName }/table/${ tableName }` ) ; } param scheduledQueryName param account param region param partition public onScheduledQuery ( scheduledQueryName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:timestream:${ region || '*' }:${ account || '*' }:scheduled-query/${ scheduledQueryName }` ) ; } }