import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class AwsMarketplaceCatalog extends PolicyStatement { public servicePrefix = 'aws-marketplace' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to cancel a running change set
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_CancelChangeSet.html
     */ public toCancelChangeSet ( ) { return this . to ( 'CancelChangeSet' ) ; } /**
     * Grants permission to complete an existing task and submit the content to the associated change
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/
     */ public toCompleteTask ( ) { return this . to ( 'CompleteTask' ) ; } /**
     * Grants permission to return the details of an existing change set
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_DescribeChangeSet.html
     */ public toDescribeChangeSet ( ) { return this . to ( 'DescribeChangeSet' ) ; } /**
     * Grants permission to return the details of an existing entity
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_DescribeEntity.html
     */ public toDescribeEntity ( ) { return this . to ( 'DescribeEntity' ) ; } /**
     * Grants permission to return the details of an existing task
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/
     */ public toDescribeTask ( ) { return this . to ( 'DescribeTask' ) ; } /**
     * Grants permission to list existing change sets
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_ListChangeSets.html
     */ public toListChangeSets ( ) { return this . to ( 'ListChangeSets' ) ; } /**
     * Grants permission to list existing entities
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_ListEntities.html
     */ public toListEntities ( ) { return this . to ( 'ListEntities' ) ; } /**
     * Grants permission to list existing tasks
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/
     */ public toListTasks ( ) { return this . to ( 'ListTasks' ) ; } /**
     * Grants permission to request a new change set. (Note: resource-level permissions for this action and condition context keys for this action are only supported when used with Catalog API and are not supported when used with AWS Marketplace Management Portal)
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifCatalogChangeType()
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_StartChangeSet.html
     */ public toStartChangeSet ( ) { return this . to ( 'StartChangeSet' ) ; } /**
     * Grants permission to update the contents of an existing task
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/
     */ public toUpdateTask ( ) { return this . to ( 'UpdateTask' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CancelChangeSet' , 'CompleteTask' , 'StartChangeSet' , 'UpdateTask' ] , Read : [ 'DescribeChangeSet' , 'DescribeEntity' , 'DescribeTask' ] , List : [ 'ListChangeSets' , 'ListEntities' , 'ListTasks' ] } ; param catalog param entityType param resourceId param account param region param partition public onEntity ( catalog , entityType , resourceId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:aws-marketplace:${ region || '*' }:${ account || '*' }:${ catalog }/${ entityType }/${ resourceId }` ) ; } param catalog param resourceId param account param region param partition public onChangeSet ( catalog , resourceId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:aws-marketplace:${ region || '*' }:${ account || '*' }:${ catalog }/ChangeSet/${ resourceId }` ) ; } param value param operator public ifCatalogChangeType ( value , operator ? ) { return this . if ( `catalog:ChangeType` , value , operator || 'StringLike' ) ; } }