import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class CodeguruProfiler extends PolicyStatement { public servicePrefix = 'codeguru-profiler' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to add up to 2 topic ARNs of existing AWS SNS topics to publish notifications
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AddNotificationChannels.html
     */ public toAddNotificationChannels ( ) { return this . to ( 'AddNotificationChannels' ) ; } /**
     * Grants permission to get the frame metric data for a Profiling Group
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_BatchGetFrameMetricData.html
     */ public toBatchGetFrameMetricData ( ) { return this . to ( 'BatchGetFrameMetricData' ) ; } /**
     * Grants permission for an agent to register with the orchestration service and retrieve profiling configuration information
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html
     */ public toConfigureAgent ( ) { return this . to ( 'ConfigureAgent' ) ; } /**
     * Grants permission to create a profiling group
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsRequestTag()
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_CreateProfilingGroup.html
     */ public toCreateProfilingGroup ( ) { return this . to ( 'CreateProfilingGroup' ) ; } /**
     * Grants permission to delete a profiling group
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_DeleteProfilingGroup.html
     */ public toDeleteProfilingGroup ( ) { return this . to ( 'DeleteProfilingGroup' ) ; } /**
     * Grants permission to describe a profiling group
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_DescribeProfilingGroup.html
     */ public toDescribeProfilingGroup ( ) { return this . to ( 'DescribeProfilingGroup' ) ; } /**
     * Grants permission to get a summary of recent recommendations for each profiling group in the account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_GetFindingsReportAccountSummary.html
     */ public toGetFindingsReportAccountSummary ( ) { return this . to ( 'GetFindingsReportAccountSummary' ) ; } /**
     * Grants permission to get the notification configuration
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_GetNotificationConfiguration.html
     */ public toGetNotificationConfiguration ( ) { return this . to ( 'GetNotificationConfiguration' ) ; } /**
     * Grants permission to get the resource policy associated with the specified Profiling Group.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_GetPolicy.html
     */ public toGetPolicy ( ) { return this . to ( 'GetPolicy' ) ; } /**
     * Grants permission to get aggregated profiles for a specific profiling group
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_GetProfile.html
     */ public toGetProfile ( ) { return this . to ( 'GetProfile' ) ; } /**
     * Grants permission to get recommendations
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_GetRecommendations.html
     */ public toGetRecommendations ( ) { return this . to ( 'GetRecommendations' ) ; } /**
     * Grants permission to list the available recommendations reports for a specific profiling group
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ListFindingsReports.html
     */ public toListFindingsReports ( ) { return this . to ( 'ListFindingsReports' ) ; } /**
     * Grants permission to list the start times of the available aggregated profiles for a specific profiling group
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ListProfileTimes.html
     */ public toListProfileTimes ( ) { return this . to ( 'ListProfileTimes' ) ; } /**
     * Grants permission to list profiling groups in the account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ListProfilingGroups.html
     */ public toListProfilingGroups ( ) { return this . to ( 'ListProfilingGroups' ) ; } /**
     * Grants permission to list tags for a Profiling Group
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to submit a profile collected by an agent belonging to a specific profiling group for aggregation
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html
     */ public toPostAgentProfile ( ) { return this . to ( 'PostAgentProfile' ) ; } /**
     * Grants permission to update the list of principals allowed for an action group in the resource policy associated with the specified Profiling Group.
     *
     * Access Level: Permissions management
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_PutPermission.html
     */ public toPutPermission ( ) { return this . to ( 'PutPermission' ) ; } /**
     * Grants permission to delete an already configured SNStopic arn from the notification configuration
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_RemoveNotificationChannel.html
     */ public toRemoveNotificationChannel ( ) { return this . to ( 'RemoveNotificationChannel' ) ; } /**
     * Grants permission to remove the permission of specified Action Group from the resource policy associated with the specified Profiling Group.
     *
     * Access Level: Permissions management
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_RemovePermission.html
     */ public toRemovePermission ( ) { return this . to ( 'RemovePermission' ) ; } /**
     * Grants permission to submit user feedback for useful or non useful anomaly
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_SubmitFeedback.html
     */ public toSubmitFeedback ( ) { return this . to ( 'SubmitFeedback' ) ; } /**
     * Grants permission to add or overwrite tags to a Profiling Group
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsRequestTag()
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to remove tags from a Profiling Group
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsRequestTag()
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to update a specific profiling group
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_UpdateProfilingGroup.html
     */ public toUpdateProfilingGroup ( ) { return this . to ( 'UpdateProfilingGroup' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'AddNotificationChannels' , 'ConfigureAgent' , 'CreateProfilingGroup' , 'DeleteProfilingGroup' , 'PostAgentProfile' , 'RemoveNotificationChannel' , 'SubmitFeedback' , 'UpdateProfilingGroup' ] , List : [ 'BatchGetFrameMetricData' , 'ListFindingsReports' , 'ListProfileTimes' , 'ListProfilingGroups' , 'ListTagsForResource' ] , Read : [ 'DescribeProfilingGroup' , 'GetFindingsReportAccountSummary' , 'GetNotificationConfiguration' , 'GetPolicy' , 'GetProfile' , 'GetRecommendations' ] , 'Permissions management' : [ 'PutPermission' , 'RemovePermission' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param profilingGroupName param account param region param partition public onProfilingGroup ( profilingGroupName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:codeguru-profiler:${ region || '*' }:${ account || '*' }:profilingGroup/${ profilingGroupName }` ) ; } }