import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class CodestarConnections extends PolicyStatement { public servicePrefix = 'codestar-connections' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to create a Connection resource
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     * - .ifProviderType()
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_CreateConnection.html
     */ public toCreateConnection ( ) { return this . to ( 'CreateConnection' ) ; } /**
     * Grants permission to create a host resource
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifProviderType()
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_CreateHost.html
     */ public toCreateHost ( ) { return this . to ( 'CreateHost' ) ; } /**
     * Grants permission to delete a Connection resource
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_DeleteConnection.html
     */ public toDeleteConnection ( ) { return this . to ( 'DeleteConnection' ) ; } /**
     * Grants permission to delete a host resource
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_DeleteHost.html
     */ public toDeleteHost ( ) { return this . to ( 'DeleteHost' ) ; } /**
     * Grants permission to get details about a Connection resource
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_GetConnection.html
     */ public toGetConnection ( ) { return this . to ( 'GetConnection' ) ; } /**
     * Grants permission to get details about a host resource
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_GetHost.html
     */ public toGetHost ( ) { return this . to ( 'GetHost' ) ; } /**
     * Grants permission to associate a third party, such as a Bitbucket App installation, with a Connection
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifProviderType()
     *
     * Dependent actions:
     * - codestar-connections:StartOAuthHandshake
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#permissions-reference-connections-handshake
     */ public toGetIndividualAccessToken ( ) { return this . to ( 'GetIndividualAccessToken' ) ; } /**
     * Grants permission to associate a third party, such as a Bitbucket App installation, with a Connection
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifProviderType()
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#permissions-reference-connections-handshake
     */ public toGetInstallationUrl ( ) { return this . to ( 'GetInstallationUrl' ) ; } /**
     * Grants permission to list Connection resources
     *
     * Access Level: List
     *
     * Possible conditions:
     * - .ifProviderTypeFilter()
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_ListConnections.html
     */ public toListConnections ( ) { return this . to ( 'ListConnections' ) ; } /**
     * Grants permission to list host resources
     *
     * Access Level: List
     *
     * Possible conditions:
     * - .ifProviderTypeFilter()
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_ListHosts.html
     */ public toListHosts ( ) { return this . to ( 'ListHosts' ) ; } /**
     * Grants permission to associate a third party, such as a Bitbucket App installation, with a Connection
     *
     * Access Level: List
     *
     * Dependent actions:
     * - codestar-connections:GetIndividualAccessToken
     * - codestar-connections:StartOAuthHandshake
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#permissions-reference-connections-handshake
     */ public toListInstallationTargets ( ) { return this . to ( 'ListInstallationTargets' ) ; } /**
     * Gets the set of key-value pairs that are used to manage the resource
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to pass a Connection resource to an AWS service that accepts a Connection ARN as input, such as codepipeline:CreatePipeline
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifPassedToService()
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#permissions-reference-connections-passconnection
     */ public toPassConnection ( ) { return this . to ( 'PassConnection' ) ; } /**
     * Grants permission to associate a third party server, such as a GitHub Enterprise Server instance, with a Host
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifHostArn()
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#connections-permissions-actions-host-registration
     */ public toRegisterAppCode ( ) { return this . to ( 'RegisterAppCode' ) ; } /**
     * Grants permission to associate a third party server, such as a GitHub Enterprise Server instance, with a Host
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifHostArn()
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#connections-permissions-actions-host-registration
     */ public toStartAppRegistrationHandshake ( ) { return this . to ( 'StartAppRegistrationHandshake' ) ; } /**
     * Grants permission to associate a third party, such as a Bitbucket App installation, with a Connection
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifProviderType()
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#permissions-reference-connections-handshake
     */ public toStartOAuthHandshake ( ) { return this . to ( 'StartOAuthHandshake' ) ; } /**
     * Adds to or modifies the tags of the given resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsRequestTag()
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Removes tags from an AWS resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to update a Connection resource with an installation of the CodeStar Connections App
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifInstallationId()
     *
     * Dependent actions:
     * - codestar-connections:GetIndividualAccessToken
     * - codestar-connections:GetInstallationUrl
     * - codestar-connections:ListInstallationTargets
     * - codestar-connections:StartOAuthHandshake
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#permissions-reference-connections-handshake
     */ public toUpdateConnectionInstallation ( ) { return this . to ( 'UpdateConnectionInstallation' ) ; } /**
     * Grants permission to update a host resource
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_UpdateHost.html
     */ public toUpdateHost ( ) { return this . to ( 'UpdateHost' ) ; } /**
     * Grants permission to use a Connection resource to call provider actions
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifFullRepositoryId()
     * - .ifProviderAction()
     * - .ifProviderPermissionsRequired()
     *
     * https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#permissions-reference-connections-use
     */ public toUseConnection ( ) { return this . to ( 'UseConnection' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CreateConnection' , 'CreateHost' , 'DeleteConnection' , 'DeleteHost' , 'UpdateConnectionInstallation' , 'UpdateHost' ] , Read : [ 'GetConnection' , 'GetHost' , 'GetIndividualAccessToken' , 'GetInstallationUrl' , 'PassConnection' , 'RegisterAppCode' , 'StartAppRegistrationHandshake' , 'StartOAuthHandshake' , 'UseConnection' ] , List : [ 'ListConnections' , 'ListHosts' , 'ListInstallationTargets' , 'ListTagsForResource' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param connectionId param account param region param partition public onConnection ( connectionId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:codestar-connections:${ region || '*' }:${ account || '*' }:connection/${ connectionId }` ) ; } param hostId param account param region param partition public onHost ( hostId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:codestar-connections:${ region || '*' }:${ account || '*' }:host/${ hostId }` ) ; } param value param operator public ifBranchName ( value , operator ? ) { return this . if ( `BranchName` , value , operator || 'StringLike' ) ; } param value param operator public ifFullRepositoryId ( value , operator ? ) { return this . if ( `FullRepositoryId` , value , operator || 'StringLike' ) ; } param value param operator public ifHostArn ( value , operator ? ) { return this . if ( `HostArn` , value , operator || 'StringLike' ) ; } param value param operator public ifInstallationId ( value , operator ? ) { return this . if ( `InstallationId` , value , operator || 'StringLike' ) ; } param value param operator public ifOwnerId ( value , operator ? ) { return this . if ( `OwnerId` , value , operator || 'StringLike' ) ; } param value param operator public ifPassedToService ( value , operator ? ) { return this . if ( `PassedToService` , value , operator || 'StringLike' ) ; } param value param operator public ifProviderAction ( value , operator ? ) { return this . if ( `ProviderAction` , value , operator || 'StringLike' ) ; } param value param operator public ifProviderPermissionsRequired ( value , operator ? ) { return this . if ( `ProviderPermissionsRequired` , value , operator || 'StringLike' ) ; } param value param operator public ifProviderType ( value , operator ? ) { return this . if ( `ProviderType` , value , operator || 'StringLike' ) ; } param value param operator public ifProviderTypeFilter ( value , operator ? ) { return this . if ( `ProviderTypeFilter` , value , operator || 'StringLike' ) ; } param value param operator public ifRepositoryName ( value , operator ? ) { return this . if ( `RepositoryName` , value , operator || 'StringLike' ) ; } }