import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class Savingsplans extends PolicyStatement { public servicePrefix = 'savingsplans' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to create a savings plan
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_CreateSavingsPlan.html
     */ public toCreateSavingsPlan ( ) { return this . to ( 'CreateSavingsPlan' ) ; } /**
     * Grants permission to delete the queued savings plan associated with customers account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DeleteQueuedSavingsPlan.html
     */ public toDeleteQueuedSavingsPlan ( ) { return this . to ( 'DeleteQueuedSavingsPlan' ) ; } /**
     * Grants permission to describe the rates associated with customers savings plan
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlanRates.html
     */ public toDescribeSavingsPlanRates ( ) { return this . to ( 'DescribeSavingsPlanRates' ) ; } /**
     * Grants permission to describe the savings plans associated with customers account
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlans.html
     */ public toDescribeSavingsPlans ( ) { return this . to ( 'DescribeSavingsPlans' ) ; } /**
     * Grants permission to describe the rates assciated with savings plans offerings
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlansOfferingRates.html
     */ public toDescribeSavingsPlansOfferingRates ( ) { return this . to ( 'DescribeSavingsPlansOfferingRates' ) ; } /**
     * Grants permission to describe the savings plans offerings that customer is eligible to purchase
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlansOfferings.html
     */ public toDescribeSavingsPlansOfferings ( ) { return this . to ( 'DescribeSavingsPlansOfferings' ) ; } /**
     * Grants permission to list tags for a savings plan
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to tag a savings plan
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsRequestTag()
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to untag a savings plan
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CreateSavingsPlan' , 'DeleteQueuedSavingsPlan' ] , Read : [ 'DescribeSavingsPlanRates' , 'DescribeSavingsPlans' , 'DescribeSavingsPlansOfferingRates' , 'DescribeSavingsPlansOfferings' ] , List : [ 'ListTagsForResource' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param resourceId param account param partition public onSavingsplan ( resourceId , account ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:savingsplans::${ account || '*' }:savingsplan/${ resourceId }` ) ; } }