import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class Pi extends PolicyStatement { public servicePrefix = 'pi' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to call DescribeDimensionKeys API to retrieve the top N dimension keys for a metric for a specific time period
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/performance-insights/latest/APIReference/API_DescribeDimensionKeys.html
     */ public toDescribeDimensionKeys ( ) { return this . to ( 'DescribeDimensionKeys' ) ; } /**
     * Grants permission to call GetDimensionKeyDetails API to retrieve the attributes of the specified dimension group
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/performance-insights/latest/APIReference/API_GetDimensionKeyDetails.html
     */ public toGetDimensionKeyDetails ( ) { return this . to ( 'GetDimensionKeyDetails' ) ; } /**
     * Grants permission to call GetResourceMetadata API to retrieve the metadata for different features
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/performance-insights/latest/APIReference/API_GetResourceMetadata.html
     */ public toGetResourceMetadata ( ) { return this . to ( 'GetResourceMetadata' ) ; } /**
     * Grants permission to call GetResourceMetrics API to retrieve PI metrics for a set of data sources, over a time period
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/performance-insights/latest/APIReference/API_GetResourceMetrics.html
     */ public toGetResourceMetrics ( ) { return this . to ( 'GetResourceMetrics' ) ; } /**
     * Grants permission to call ListAvailableResourceDimensions API to retrieve the dimensions that can be queried for each specified metric type on a specified DB instance
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/performance-insights/latest/APIReference/API_ListAvailableResourceDimensions.html
     */ public toListAvailableResourceDimensions ( ) { return this . to ( 'ListAvailableResourceDimensions' ) ; } /**
     * Grants permission to call ListAvailableResourceMetrics API to retrieve metrics of the specified types that can be queried for a specified DB instance
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/performance-insights/latest/APIReference/API_ListAvailableResourceMetrics.html
     */ public toListAvailableResourceMetrics ( ) { return this . to ( 'ListAvailableResourceMetrics' ) ; } protected accessLevelList : AccessLevelList = { Read : [ 'DescribeDimensionKeys' , 'GetDimensionKeyDetails' , 'GetResourceMetadata' , 'GetResourceMetrics' , 'ListAvailableResourceDimensions' , 'ListAvailableResourceMetrics' ] } ; param serviceType param identifier param account param region param partition public onMetricResource ( serviceType , identifier , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:pi:${ region || '*' }:${ account || '*' }:metrics/${ serviceType }/${ identifier }` ) ; } }