import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Amplifyuibuilder extends PolicyStatement { public servicePrefix = 'amplifyuibuilder' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to create a component
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_CreateComponent.html
     */ public toCreateComponent ( ) { return this . to ( 'CreateComponent' ) ; } /**
     * Grants permission to create a theme
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_CreateTheme.html
     */ public toCreateTheme ( ) { return this . to ( 'CreateTheme' ) ; } /**
     * Grants permission to delete a component
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_DeleteComponent.html
     */ public toDeleteComponent ( ) { return this . to ( 'DeleteComponent' ) ; } /**
     * Grants permission to delete a theme
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_DeleteTheme.html
     */ public toDeleteTheme ( ) { return this . to ( 'DeleteTheme' ) ; } /**
     * Grants permission to exchange a code for a token
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_ExchangeCodeForToken.html
     */ public toExchangeCodeForToken ( ) { return this . to ( 'ExchangeCodeForToken' ) ; } /**
     * Grants permission to export components
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_ExportComponents.html
     */ public toExportComponents ( ) { return this . to ( 'ExportComponents' ) ; } /**
     * Grants permission to export themes
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_ExportThemes.html
     */ public toExportThemes ( ) { return this . to ( 'ExportThemes' ) ; } /**
     * Grants permission to get an existing component
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_GetComponent.html
     */ public toGetComponent ( ) { return this . to ( 'GetComponent' ) ; } /**
     * Grants permission to get an existing theme
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_GetTheme.html
     */ public toGetTheme ( ) { return this . to ( 'GetTheme' ) ; } /**
     * Grants permission to list the components for an app
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_ListComponents.html
     */ public toListComponents ( ) { return this . to ( 'ListComponents' ) ; } /**
     * Grants permission to list the tags for a resource
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/welcome.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to list the themes for an app
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_ListThemes.html
     */ public toListThemes ( ) { return this . to ( 'ListThemes' ) ; } /**
     * Grants permission to refresh an access token
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_RefreshToken.html
     */ public toRefreshToken ( ) { return this . to ( 'RefreshToken' ) ; } /**
     * Grants permission to tag a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsRequestTag()
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/welcome.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to untag a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/welcome.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to update a component
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_UpdateComponent.html
     */ public toUpdateComponent ( ) { return this . to ( 'UpdateComponent' ) ; } /**
     * Grants permission to update a theme
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/amplifyuibuilder/latest/APIReference/API_UpdateTheme.html
     */ public toUpdateTheme ( ) { return this . to ( 'UpdateTheme' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CreateComponent' , 'CreateTheme' , 'DeleteComponent' , 'DeleteTheme' , 'ExchangeCodeForToken' , 'RefreshToken' , 'UpdateComponent' , 'UpdateTheme' ] , Read : [ 'ExportComponents' , 'ExportThemes' , 'GetComponent' , 'GetTheme' , 'ListTagsForResource' ] , List : [ 'ListComponents' , 'ListThemes' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param appId param environmentName param id param account param region param partition public onComponentResource ( appId , environmentName , id , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:amplifyuibuilder:${ region || '*' }:${ account || '*' }:app/${ appId }/environment/${ environmentName }/components/${ id }` ) ; } param appId param environmentName param id param account param region param partition public onThemeResource ( appId , environmentName , id , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:amplifyuibuilder:${ region || '*' }:${ account || '*' }:app/${ appId }/environment/${ environmentName }/themes/${ id }` ) ; } param value param operator public ifAppId ( value , operator ? ) { return this . if ( `AppId` , value , operator || 'StringLike' ) ; } param value param operator public ifComponentsId ( value , operator ? ) { return this . if ( `ComponentsId` , value , operator || 'StringLike' ) ; } param value param operator public ifEnvironmentName ( value , operator ? ) { return this . if ( `EnvironmentName` , value , operator || 'StringLike' ) ; } param value param operator public ifThemesId ( value , operator ? ) { return this . if ( `ThemesId` , value , operator || 'StringLike' ) ; } }