import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Cloud9 extends PolicyStatement { public servicePrefix = 'cloud9' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to start the Amazon EC2 instance that your AWS Cloud9 IDE connects to
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toActivateEC2Remote ( ) { return this . to ( 'ActivateEC2Remote' ) ; } /**
     * Grants permission to create an AWS Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then hosts the environment on the instance
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifEnvironmentName()
     * - .ifInstanceType()
     * - .ifSubnetId()
     * - .ifUserArn()
     * - .ifOwnerArn()
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * Dependent actions:
     * - ec2:DescribeSubnets
     * - ec2:DescribeVpcs
     * - iam:CreateServiceLinkedRole
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_CreateEnvironmentEC2.html
     */ public toCreateEnvironmentEC2 ( ) { return this . to ( 'CreateEnvironmentEC2' ) ; } /**
     * Grants permission to add an environment member to an AWS Cloud9 development environment
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifUserArn()
     * - .ifEnvironmentId()
     * - .ifPermissions()
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_CreateEnvironmentMembership.html
     */ public toCreateEnvironmentMembership ( ) { return this . to ( 'CreateEnvironmentMembership' ) ; } /**
     * Grants permission to create an AWS Cloud9 SSH development environment
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifEnvironmentName()
     * - .ifOwnerArn()
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toCreateEnvironmentSSH ( ) { return this . to ( 'CreateEnvironmentSSH' ) ; } /**
     * Grants permission to create an authentication token that allows a connection between the AWS Cloud9 IDE and the user's environment
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toCreateEnvironmentToken ( ) { return this . to ( 'CreateEnvironmentToken' ) ; } /**
     * Grants permission to delete an AWS Cloud9 development environment. If the environment is hosted on an Amazon Elastic Compute Cloud (Amazon EC2) instance, also terminates the instance
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - iam:CreateServiceLinkedRole
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_DeleteEnvironment.html
     */ public toDeleteEnvironment ( ) { return this . to ( 'DeleteEnvironment' ) ; } /**
     * Grants permission to delete an environment member from an AWS Cloud9 development environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_DeleteEnvironmentMembership.html
     */ public toDeleteEnvironmentMembership ( ) { return this . to ( 'DeleteEnvironmentMembership' ) ; } /**
     * Grants permission to get details about the connection to the EC2 development environment, including host, user, and port
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toDescribeEC2Remote ( ) { return this . to ( 'DescribeEC2Remote' ) ; } /**
     * Grants permission to get information about environment members for an AWS Cloud9 development environment
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifUserArn()
     * - .ifEnvironmentId()
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_DescribeEnvironmentMemberships.html
     */ public toDescribeEnvironmentMemberships ( ) { return this . to ( 'DescribeEnvironmentMemberships' ) ; } /**
     * Grants permission to get status information for an AWS Cloud9 development environment
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_DescribeEnvironmentStatus.html
     */ public toDescribeEnvironmentStatus ( ) { return this . to ( 'DescribeEnvironmentStatus' ) ; } /**
     * Grants permission to get information about AWS Cloud9 development environments
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_DescribeEnvironments.html
     */ public toDescribeEnvironments ( ) { return this . to ( 'DescribeEnvironments' ) ; } /**
     * Grants permission to get details about the connection to the SSH development environment, including host, user, and port
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toDescribeSSHRemote ( ) { return this . to ( 'DescribeSSHRemote' ) ; } /**
     * Grants permission to get configuration information that's used to initialize the AWS Cloud9 IDE
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toGetEnvironmentConfig ( ) { return this . to ( 'GetEnvironmentConfig' ) ; } /**
     * Grants permission to get the AWS Cloud9 IDE settings for a specified development environment
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toGetEnvironmentSettings ( ) { return this . to ( 'GetEnvironmentSettings' ) ; } /**
     * Grants permission to get the AWS Cloud9 IDE settings for a specified environment member
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toGetMembershipSettings ( ) { return this . to ( 'GetMembershipSettings' ) ; } /**
     * Grants permission to get the user's public SSH key, which is used by AWS Cloud9 to connect to SSH development environments
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifUserArn()
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toGetUserPublicKey ( ) { return this . to ( 'GetUserPublicKey' ) ; } /**
     * Grants permission to get the AWS Cloud9 IDE settings for a specified user
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toGetUserSettings ( ) { return this . to ( 'GetUserSettings' ) ; } /**
     * Grants permission to get a list of AWS Cloud9 development environment identifiers
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_ListEnvironments.html
     */ public toListEnvironments ( ) { return this . to ( 'ListEnvironments' ) ; } /**
     * Grants permission to list tags for a cloud9 environment
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to set AWS managed temporary credentials on the Amazon EC2 instance that's used by the AWS Cloud9 integrated development environment (IDE)
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toModifyTemporaryCredentialsOnEnvironmentEC2 ( ) { return this . to ( 'ModifyTemporaryCredentialsOnEnvironmentEC2' ) ; } /**
     * Grants permission to add tags to a cloud9 environment
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to remove tags from a cloud9 environment
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to change the settings of an existing AWS Cloud9 development environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_UpdateEnvironment.html
     */ public toUpdateEnvironment ( ) { return this . to ( 'UpdateEnvironment' ) ; } /**
     * Grants permission to change the settings of an existing environment member for an AWS Cloud9 development environment
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifUserArn()
     * - .ifEnvironmentId()
     * - .ifPermissions()
     *
     * https://docs.aws.amazon.com/cloud9/latest/APIReference/API_UpdateEnvironmentMembership.html
     */ public toUpdateEnvironmentMembership ( ) { return this . to ( 'UpdateEnvironmentMembership' ) ; } /**
     * Grants permission to update the AWS Cloud9 IDE settings for a specified development environment
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toUpdateEnvironmentSettings ( ) { return this . to ( 'UpdateEnvironmentSettings' ) ; } /**
     * Grants permission to update the AWS Cloud9 IDE settings for a specified environment member
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toUpdateMembershipSettings ( ) { return this . to ( 'UpdateMembershipSettings' ) ; } /**
     * Grants permission to update details about the connection to the SSH development environment, including host, user, and port
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toUpdateSSHRemote ( ) { return this . to ( 'UpdateSSHRemote' ) ; } /**
     * Grants permission to update IDE-specific settings of an AWS Cloud9 user
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toUpdateUserSettings ( ) { return this . to ( 'UpdateUserSettings' ) ; } /**
     * Grants permission to validate the environment name during the process of creating an AWS Cloud9 development environment
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cloud9/latest/user-guide/security-iam.html#auth-and-access-control-ref-matrix
     */ public toValidateEnvironmentName ( ) { return this . to ( 'ValidateEnvironmentName' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'ActivateEC2Remote' , 'CreateEnvironmentEC2' , 'CreateEnvironmentMembership' , 'CreateEnvironmentSSH' , 'DeleteEnvironment' , 'DeleteEnvironmentMembership' , 'ModifyTemporaryCredentialsOnEnvironmentEC2' , 'UpdateEnvironment' , 'UpdateEnvironmentMembership' , 'UpdateEnvironmentSettings' , 'UpdateMembershipSettings' , 'UpdateSSHRemote' , 'UpdateUserSettings' ] , Read : [ 'CreateEnvironmentToken' , 'DescribeEC2Remote' , 'DescribeEnvironmentMemberships' , 'DescribeEnvironmentStatus' , 'DescribeEnvironments' , 'DescribeSSHRemote' , 'GetEnvironmentConfig' , 'GetEnvironmentSettings' , 'GetMembershipSettings' , 'GetUserPublicKey' , 'GetUserSettings' , 'ListEnvironments' , 'ListTagsForResource' , 'ValidateEnvironmentName' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param resourceId param account param region param partition public onEnvironment ( resourceId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:cloud9:${ region || '*' }:${ account || '*' }:environment:${ resourceId }` ) ; } param value param operator public ifEnvironmentId ( value , operator ? ) { return this . if ( `EnvironmentId` , value , operator || 'StringLike' ) ; } param value param operator public ifEnvironmentName ( value , operator ? ) { return this . if ( `EnvironmentName` , value , operator || 'StringLike' ) ; } param value param operator public ifInstanceType ( value , operator ? ) { return this . if ( `InstanceType` , value , operator || 'StringLike' ) ; } param value param operator public ifOwnerArn ( value , operator ? ) { return this . if ( `OwnerArn` , value , operator || 'ArnLike' ) ; } param value param operator public ifPermissions ( value , operator ? ) { return this . if ( `Permissions` , value , operator || 'StringLike' ) ; } param value param operator public ifSubnetId ( value , operator ? ) { return this . if ( `SubnetId` , value , operator || 'StringLike' ) ; } param value param operator public ifUserArn ( value , operator ? ) { return this . if ( `UserArn` , value , operator || 'ArnLike' ) ; } }