import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class Airflow extends PolicyStatement { public servicePrefix = 'airflow' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to create a short-lived token that allows a user to invoke Airflow CLI via an endpoint on the Apache Airflow Webserver
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toCreateCliToken ( ) { return this . to ( 'CreateCliToken' ) ; } /**
     * Grants permission to create an Amazon MWAA environment
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toCreateEnvironment ( ) { return this . to ( 'CreateEnvironment' ) ; } /**
     * Grants permission to create a short-lived token that allows a user to log into Apache Airflow web UI
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toCreateWebLoginToken ( ) { return this . to ( 'CreateWebLoginToken' ) ; } /**
     * Grants permission to delete an Amazon MWAA environment
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toDeleteEnvironment ( ) { return this . to ( 'DeleteEnvironment' ) ; } /**
     * Grants permission to view details about an Amazon MWAA environment
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toGetEnvironment ( ) { return this . to ( 'GetEnvironment' ) ; } /**
     * Grants permission to list the Amazon MWAA environments in your account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toListEnvironments ( ) { return this . to ( 'ListEnvironments' ) ; } /**
     * Grants permission to lists tag for an Amazon MWAA environment
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to publish metrics for an Amazon MWAA environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toPublishMetrics ( ) { return this . to ( 'PublishMetrics' ) ; } /**
     * Grants permission to tag an Amazon MWAA environment
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsRequestTag()
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to untag an Amazon MWAA environment
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to modify an Amazon MWAA environment
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-actions-resources.html
     */ public toUpdateEnvironment ( ) { return this . to ( 'UpdateEnvironment' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CreateCliToken' , 'CreateEnvironment' , 'CreateWebLoginToken' , 'DeleteEnvironment' , 'PublishMetrics' , 'UpdateEnvironment' ] , Read : [ 'GetEnvironment' , 'ListTagsForResource' ] , List : [ 'ListEnvironments' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param environmentName param account param region param partition public onEnvironment ( environmentName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:airflow:${ region || '*' }:${ account || '*' }:environment/${ environmentName }` ) ; } param environmentName param roleName param account param region param partition public onRbacRole ( environmentName , roleName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:airflow:${ region || '*' }:${ account || '*' }:role/${ environmentName }/${ roleName }` ) ; } }