CODEGURU-PROFILER

AddNotificationChannels

enum_EventPublisher := [ "AnomalyDetection" ]

valid {
    input.Body.channels[_].eventPublishers[_] == enum_EventPublisher[_]
    input.Body.channels[_].id == STRING
    input.Body.channels[_].uri == STRING
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

BatchGetFrameMetricData

enum_AggregationPeriod := [ "PT5M", "PT1H", "P1D" ]
enum_MetricType := [ "AggregatedRelativeTotalTime" ]

valid {
    input.Body.frameMetrics[_].frameName == STRING
    input.Body.frameMetrics[_].threadStates[_] == STRING
    input.Body.frameMetrics[_].type == enum_MetricType[_]
    input.ReqMap.profilingGroupName == STRING
    input.Qs.endTime == TIMESTAMP
    input.Qs.period == STRING
    input.Qs.startTime == TIMESTAMP
    input.Qs.targetResolution == enum_AggregationPeriod[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ConfigureAgent

valid {
    input.Body.fleetInstanceId == STRING
    input.Body.metadata.ComputePlatform == STRING
    input.Body.metadata.AgentId == STRING
    input.Body.metadata.AwsRequestId == STRING
    input.Body.metadata.ExecutionEnvironment == STRING
    input.Body.metadata.LambdaFunctionArn == STRING
    input.Body.metadata.LambdaMemoryLimitInMB == STRING
    input.Body.metadata.LambdaRemainingTimeInMilliseconds == STRING
    input.Body.metadata.LambdaTimeGapBetweenInvokesInMilliseconds == STRING
    input.Body.metadata.LambdaPreviousExecutionTimeInMilliseconds == STRING
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateProfilingGroup

enum_ComputePlatform := [ "Default", "AWSLambda" ]

valid {
    input.Body.agentOrchestrationConfig.profilingEnabled == BOOLEAN
    input.Body.computePlatform == enum_ComputePlatform[_]
    input.Body.profilingGroupName == STRING
    input.Body.tags.STRING == STRING
    input.Qs.clientToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteProfilingGroup

valid {
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeProfilingGroup

valid {
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetFindingsReportAccountSummary

valid {
    input.Qs.dailyReportsOnly == BOOLEAN
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetNotificationConfiguration

valid {
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetPolicy

valid {
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetProfile

valid {
    input.ReqMap.profilingGroupName == STRING
    input.Qs.endTime == TIMESTAMP
    input.Qs.maxDepth == INTEGER
    input.Qs.period == STRING
    input.Qs.startTime == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetRecommendations

valid {
    input.ReqMap.profilingGroupName == STRING
    input.Qs.endTime == TIMESTAMP
    input.Qs.locale == STRING
    input.Qs.startTime == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListFindingsReports

valid {
    input.ReqMap.profilingGroupName == STRING
    input.Qs.dailyReportsOnly == BOOLEAN
    input.Qs.endTime == TIMESTAMP
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.startTime == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListProfileTimes

enum_AggregationPeriod := [ "PT5M", "PT1H", "P1D" ]
enum_OrderBy := [ "TimestampDescending", "TimestampAscending" ]

valid {
    input.ReqMap.profilingGroupName == STRING
    input.Qs.endTime == TIMESTAMP
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.orderBy == enum_OrderBy[_]
    input.Qs.period == enum_AggregationPeriod[_]
    input.Qs.startTime == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListProfilingGroups

valid {
    input.Qs.includeDescription == BOOLEAN
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

valid {
    input.ReqMap.resourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PostAgentProfile

valid {
    input.Body.agentProfile == BLOB
    input.ReqMap.profilingGroupName == STRING
    input.Qs.profileToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutPermission

enum_ActionGroup := [ "agentPermissions" ]

valid {
    input.Body.principals[_] == STRING
    input.Body.revisionId == STRING
    input.ReqMap.actionGroup == enum_ActionGroup[_]
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RemoveNotificationChannel

valid {
    input.ReqMap.channelId == STRING
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RemovePermission

enum_ActionGroup := [ "agentPermissions" ]

valid {
    input.ReqMap.actionGroup == enum_ActionGroup[_]
    input.ReqMap.profilingGroupName == STRING
    input.Qs.revisionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SubmitFeedback

enum_FeedbackType := [ "Positive", "Negative" ]

valid {
    input.Body.comment == STRING
    input.Body.type == enum_FeedbackType[_]
    input.ReqMap.anomalyInstanceId == STRING
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.tags.STRING == STRING
    input.ReqMap.resourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.ReqMap.resourceArn == STRING
    input.Qs.tagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateProfilingGroup

valid {
    input.Body.agentOrchestrationConfig.profilingEnabled == BOOLEAN
    input.ReqMap.profilingGroupName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}