import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class ComputeOptimizer extends PolicyStatement { public servicePrefix = 'compute-optimizer' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to delete recommendation preferences
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifResourceType()
     *
     * Dependent actions:
     * - autoscaling:DescribeAutoScalingGroups
     * - ec2:DescribeInstances
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_DeleteRecommendationPreferences.html
     */ public toDeleteRecommendationPreferences ( ) { return this . to ( 'DeleteRecommendationPreferences' ) ; } /**
     * Grants permission to view the status of recommendation export jobs
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_DescribeRecommendationExportJobs.html
     */ public toDescribeRecommendationExportJobs ( ) { return this . to ( 'DescribeRecommendationExportJobs' ) ; } /**
     * Grants permission to export AutoScaling group recommendations to S3 for the provided accounts
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - autoscaling:DescribeAutoScalingGroups
     * - compute-optimizer:GetAutoScalingGroupRecommendations
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_ExportAutoScalingGroupRecommendations.html
     */ public toExportAutoScalingGroupRecommendations ( ) { return this . to ( 'ExportAutoScalingGroupRecommendations' ) ; } /**
     * Grants permission to export EBS volume recommendations to S3 for the provided accounts
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - compute-optimizer:GetEBSVolumeRecommendations
     * - ec2:DescribeVolumes
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_ExportEBSVolumeRecommendations.html
     */ public toExportEBSVolumeRecommendations ( ) { return this . to ( 'ExportEBSVolumeRecommendations' ) ; } /**
     * Grants permission to export EC2 instance recommendations to S3 for the provided accounts
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - compute-optimizer:GetEC2InstanceRecommendations
     * - ec2:DescribeInstances
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_ExportEC2InstanceRecommendations.html
     */ public toExportEC2InstanceRecommendations ( ) { return this . to ( 'ExportEC2InstanceRecommendations' ) ; } /**
     * Grants permission to export Lambda function recommendations to S3 for the provided accounts
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - compute-optimizer:GetLambdaFunctionRecommendations
     * - lambda:ListFunctions
     * - lambda:ListProvisionedConcurrencyConfigs
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_ExportLambdaFunctionRecommendations.html
     */ public toExportLambdaFunctionRecommendations ( ) { return this . to ( 'ExportLambdaFunctionRecommendations' ) ; } /**
     * Grants permission to get recommendations for the provided AutoScaling groups
     *
     * Access Level: List
     *
     * Dependent actions:
     * - autoscaling:DescribeAutoScalingGroups
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetAutoScalingGroupRecommendations.html
     */ public toGetAutoScalingGroupRecommendations ( ) { return this . to ( 'GetAutoScalingGroupRecommendations' ) ; } /**
     * Grants permission to get recommendations for the provided EBS volumes
     *
     * Access Level: List
     *
     * Dependent actions:
     * - ec2:DescribeVolumes
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetEBSVolumeRecommendations.html
     */ public toGetEBSVolumeRecommendations ( ) { return this . to ( 'GetEBSVolumeRecommendations' ) ; } /**
     * Grants permission to get recommendations for the provided EC2 instances
     *
     * Access Level: List
     *
     * Dependent actions:
     * - ec2:DescribeInstances
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetEC2InstanceRecommendations.html
     */ public toGetEC2InstanceRecommendations ( ) { return this . to ( 'GetEC2InstanceRecommendations' ) ; } /**
     * Grants permission to get the recommendation projected metrics of the specified instance
     *
     * Access Level: List
     *
     * Dependent actions:
     * - ec2:DescribeInstances
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetEC2RecommendationProjectedMetrics.html
     */ public toGetEC2RecommendationProjectedMetrics ( ) { return this . to ( 'GetEC2RecommendationProjectedMetrics' ) ; } /**
     * Grants permission to get recommendation preferences that are in effect
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifResourceType()
     *
     * Dependent actions:
     * - autoscaling:DescribeAutoScalingGroups
     * - autoscaling:DescribeAutoScalingInstances
     * - ec2:DescribeInstances
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetEffectiveRecommendationPreferences.html
     */ public toGetEffectiveRecommendationPreferences ( ) { return this . to ( 'GetEffectiveRecommendationPreferences' ) ; } /**
     * Grants permission to get the enrollment status for the specified account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetEnrollmentStatus.html
     */ public toGetEnrollmentStatus ( ) { return this . to ( 'GetEnrollmentStatus' ) ; } /**
     * Grants permission to get the enrollment statuses for member accounts of the organization
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetEnrollmentStatusesForOrganization.html
     */ public toGetEnrollmentStatusesForOrganization ( ) { return this . to ( 'GetEnrollmentStatusesForOrganization' ) ; } /**
     * Grants permission to get recommendations for the provided Lambda functions
     *
     * Access Level: List
     *
     * Dependent actions:
     * - lambda:ListFunctions
     * - lambda:ListProvisionedConcurrencyConfigs
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetLambdaFunctionRecommendations.html
     */ public toGetLambdaFunctionRecommendations ( ) { return this . to ( 'GetLambdaFunctionRecommendations' ) ; } /**
     * Grants permission to get recommendation preferences
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifResourceType()
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetRecommendationPreferences.html
     */ public toGetRecommendationPreferences ( ) { return this . to ( 'GetRecommendationPreferences' ) ; } /**
     * Grants permission to get the recommendation summaries for the specified account(s)
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_GetRecommendationSummaries.html
     */ public toGetRecommendationSummaries ( ) { return this . to ( 'GetRecommendationSummaries' ) ; } /**
     * Grants permission to put recommendation preferences
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifResourceType()
     *
     * Dependent actions:
     * - autoscaling:DescribeAutoScalingGroups
     * - autoscaling:DescribeAutoScalingInstances
     * - ec2:DescribeInstances
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_PutRecommendationPreferences.html
     */ public toPutRecommendationPreferences ( ) { return this . to ( 'PutRecommendationPreferences' ) ; } /**
     * Grants permission to update the enrollment status
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_UpdateEnrollmentStatus.html
     */ public toUpdateEnrollmentStatus ( ) { return this . to ( 'UpdateEnrollmentStatus' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'DeleteRecommendationPreferences' , 'ExportAutoScalingGroupRecommendations' , 'ExportEBSVolumeRecommendations' , 'ExportEC2InstanceRecommendations' , 'ExportLambdaFunctionRecommendations' , 'PutRecommendationPreferences' , 'UpdateEnrollmentStatus' ] , List : [ 'DescribeRecommendationExportJobs' , 'GetAutoScalingGroupRecommendations' , 'GetEBSVolumeRecommendations' , 'GetEC2InstanceRecommendations' , 'GetEC2RecommendationProjectedMetrics' , 'GetEnrollmentStatus' , 'GetEnrollmentStatusesForOrganization' , 'GetLambdaFunctionRecommendations' , 'GetRecommendationSummaries' ] , Read : [ 'GetEffectiveRecommendationPreferences' , 'GetRecommendationPreferences' ] } ; param value param operator public ifResourceType ( value , operator ? ) { return this . if ( `ResourceType` , value , operator || 'StringLike' ) ; } }