import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class Cloudshell extends PolicyStatement { public servicePrefix = 'cloudshell' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permissions to create a CloudShell environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#CreateEnvironment
     */ public toCreateEnvironment ( ) { return this . to ( 'CreateEnvironment' ) ; } /**
     * Grants permissions to connect to a CloudShell environment from the AWS Management Console
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#CreateSession
     */ public toCreateSession ( ) { return this . to ( 'CreateSession' ) ; } /**
     * Grants permission to delete a CloudShell environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#DeleteEnvironment
     */ public toDeleteEnvironment ( ) { return this . to ( 'DeleteEnvironment' ) ; } /**
     * Grants permission to read a CloudShell environment status
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#GetEnvironmentStatus
     */ public toGetEnvironmentStatus ( ) { return this . to ( 'GetEnvironmentStatus' ) ; } /**
     * Grants permissions to download files from a CloudShell environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#GetFileDownloadUrls
     */ public toGetFileDownloadUrls ( ) { return this . to ( 'GetFileDownloadUrls' ) ; } /**
     * Grants permissions to upload files to a CloudShell environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#GetFileUploadUrls
     */ public toGetFileUploadUrls ( ) { return this . to ( 'GetFileUploadUrls' ) ; } /**
     * Grants permissions to forward console credentials to the environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#PutCredentials
     */ public toPutCredentials ( ) { return this . to ( 'PutCredentials' ) ; } /**
     * Grants permission to start a stopped CloudShell environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#StartEnvironment
     */ public toStartEnvironment ( ) { return this . to ( 'StartEnvironment' ) ; } /**
     * Grants permission to stop a running CloudShell environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html#StopEnvironment
     */ public toStopEnvironment ( ) { return this . to ( 'StopEnvironment' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CreateEnvironment' , 'CreateSession' , 'DeleteEnvironment' , 'GetFileDownloadUrls' , 'GetFileUploadUrls' , 'PutCredentials' , 'StartEnvironment' , 'StopEnvironment' ] , Read : [ 'GetEnvironmentStatus' ] } ; param environmentId param account param region param partition public onEnvironment ( environmentId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:cloudshell:${ region || '*' }:${ account || '*' }:environment/${ environmentId }` ) ; } }