import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Serverlessrepo extends PolicyStatement { public servicePrefix = 'serverlessrepo' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Creates an application, optionally including an AWS SAM file to create the first application version in the same call.
     *
     * Access Level: Write
     */ public toCreateApplication ( ) { return this . to ( 'CreateApplication' ) ; } /**
     * Creates an application version.
     *
     * Access Level: Write
     */ public toCreateApplicationVersion ( ) { return this . to ( 'CreateApplicationVersion' ) ; } /**
     * Creates an AWS CloudFormation ChangeSet for the given application.
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifApplicationType()
     */ public toCreateCloudFormationChangeSet ( ) { return this . to ( 'CreateCloudFormationChangeSet' ) ; } /**
     * Creates an AWS CloudFormation template
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifApplicationType()
     */ public toCreateCloudFormationTemplate ( ) { return this . to ( 'CreateCloudFormationTemplate' ) ; } /**
     * Deletes the specified application
     *
     * Access Level: Write
     */ public toDeleteApplication ( ) { return this . to ( 'DeleteApplication' ) ; } /**
     * Gets the specified application.
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifApplicationType()
     */ public toGetApplication ( ) { return this . to ( 'GetApplication' ) ; } /**
     * Gets the policy for the specified application.
     *
     * Access Level: Read
     */ public toGetApplicationPolicy ( ) { return this . to ( 'GetApplicationPolicy' ) ; } /**
     * Gets the specified AWS CloudFormation template
     *
     * Access Level: Read
     */ public toGetCloudFormationTemplate ( ) { return this . to ( 'GetCloudFormationTemplate' ) ; } /**
     * Retrieves the list of applications nested in the containing application
     *
     * Access Level: List
     *
     * Possible conditions:
     * - .ifApplicationType()
     */ public toListApplicationDependencies ( ) { return this . to ( 'ListApplicationDependencies' ) ; } /**
     * Lists versions for the specified application owned by the requester.
     *
     * Access Level: List
     *
     * Possible conditions:
     * - .ifApplicationType()
     */ public toListApplicationVersions ( ) { return this . to ( 'ListApplicationVersions' ) ; } /**
     * Lists applications owned by the requester.
     *
     * Access Level: List
     */ public toListApplications ( ) { return this . to ( 'ListApplications' ) ; } /**
     * Puts the policy for the specified application.
     *
     * Access Level: Write
     */ public toPutApplicationPolicy ( ) { return this . to ( 'PutApplicationPolicy' ) ; } /**
     * Gets all applications authorized for this user
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifApplicationType()
     */ public toSearchApplications ( ) { return this . to ( 'SearchApplications' ) ; } /**
     * Unshares the specified application
     *
     * Access Level: Write
     */ public toUnshareApplication ( ) { return this . to ( 'UnshareApplication' ) ; } /**
     * Updates meta-data of the application
     *
     * Access Level: Write
     */ public toUpdateApplication ( ) { return this . to ( 'UpdateApplication' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CreateApplication' , 'CreateApplicationVersion' , 'CreateCloudFormationChangeSet' , 'CreateCloudFormationTemplate' , 'DeleteApplication' , 'PutApplicationPolicy' , 'UnshareApplication' , 'UpdateApplication' ] , Read : [ 'GetApplication' , 'GetApplicationPolicy' , 'GetCloudFormationTemplate' , 'SearchApplications' ] , List : [ 'ListApplicationDependencies' , 'ListApplicationVersions' , 'ListApplications' ] } ; param resourceId param account param region param partition public onApplications ( resourceId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:serverlessrepo:${ region || '*' }:${ account || '*' }:applications/${ resourceId }` ) ; } param value param operator public ifApplicationType ( value , operator ? ) { return this . if ( `applicationType` , value , operator || 'StringLike' ) ; } }