import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Ebs extends PolicyStatement { public servicePrefix = 'ebs' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to seal and complete the snapshot after all of the required blocks of data have been written to it
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/ebs/latest/APIReference/API_CompleteSnapshot.html
     */ public toCompleteSnapshot ( ) { return this . to ( 'CompleteSnapshot' ) ; } /**
     * Grants permission to return the data of a block in an Amazon Elastic Block Store (EBS) snapshot
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/ebs/latest/APIReference/API_GetSnapshotBlock.html
     */ public toGetSnapshotBlock ( ) { return this . to ( 'GetSnapshotBlock' ) ; } /**
     * Grants permission to list the blocks that are different between two Amazon Elastic Block Store (EBS) snapshots of the same volume/snapshot lineage
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/ebs/latest/APIReference/API_ListChangedBlocks.html
     */ public toListChangedBlocks ( ) { return this . to ( 'ListChangedBlocks' ) ; } /**
     * Grants permission to list the blocks in an Amazon Elastic Block Store (EBS) snapshot
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/ebs/latest/APIReference/API_ListSnapshotBlocks.html
     */ public toListSnapshotBlocks ( ) { return this . to ( 'ListSnapshotBlocks' ) ; } /**
     * Grants permission to write a block of data to a snapshot created by the StartSnapshot operation
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsResourceTag()
     *
     * https://docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html
     */ public toPutSnapshotBlock ( ) { return this . to ( 'PutSnapshotBlock' ) ; } /**
     * Grants permission to create a new EBS snapshot
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsResourceTag()
     * - .ifAwsTagKeys()
     * - .ifDescription()
     * - .ifParentSnapshot()
     * - .ifVolumeSize()
     *
     * https://docs.aws.amazon.com/ebs/latest/APIReference/API_StartSnapshot.html
     */ public toStartSnapshot ( ) { return this . to ( 'StartSnapshot' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CompleteSnapshot' , 'PutSnapshotBlock' , 'StartSnapshot' ] , Read : [ 'GetSnapshotBlock' , 'ListChangedBlocks' , 'ListSnapshotBlocks' ] } ; param snapshotId param region param partition public onSnapshot ( snapshotId , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:ec2:${ region || '*' }::snapshot/${ snapshotId }` ) ; } param value param operator public ifDescription ( value , operator ? ) { return this . if ( `Description` , value , operator || 'StringLike' ) ; } param value param operator public ifParentSnapshot ( value , operator ? ) { return this . if ( `ParentSnapshot` , value , operator || 'StringLike' ) ; } param value param operator public ifVolumeSize ( value , operator ? ) { return this . if ( `VolumeSize` , value , operator || 'NumericEquals' ) ; } }