CodeGuruProfiler
Service object for interacting with AWS CodeGuruProfiler service.
public struct CodeGuruProfiler: AWSService
This section provides documentation for the Amazon CodeGuru Profiler API operations.
Amazon CodeGuru Profiler collects runtime performance data from your live applications, and provides recommendations that can help you fine-tune your application performance. Using machine learning algorithms, CodeGuru Profiler can help you find your most expensive lines of code and suggest ways you can improve efficiency and remove CPU bottlenecks.
Amazon CodeGuru Profiler provides different visualizations of profiling data to help you identify what code is running on the CPU, see how much time is consumed, and suggest ways to reduce CPU utilization.
Amazon CodeGuru Profiler currently supports applications written in all Java virtual machine (JVM) languages and Python. While CodeGuru Profiler supports both visualizations and recommendations for applications written in Java, it can also generate visualizations and a subset of recommendations for applications written in other JVM languages and Python.
For more information, see What is Amazon CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide.
Inheritance
AWSService
Initializers
init(client:region:partition:endpoint:timeout:byteBufferAllocator:options:)
Initialize the CodeGuruProfiler client
public init(
client: AWSClient,
region: SotoCore.Region? = nil,
partition: AWSPartition = .aws,
endpoint: String? = nil,
timeout: TimeAmount? = nil,
byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
options: AWSServiceConfig.Options = []
)
Parameters
- client: AWSClient used to process requests
- region: Region of server you want to communicate with. This will override the partition parameter.
- partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
- endpoint: Custom endpoint URL to use instead of standard AWS servers
- timeout: Timeout value for HTTP requests
init(from:patch:)
Initializer required by AWSService.with(middlewares:timeout:byteBufferAllocator:options)
. You are not able to use this initializer directly as there are no public initializers for AWSServiceConfig.Patch
. Please use AWSService.with(middlewares:timeout:byteBufferAllocator:options)
instead.
public init(from: CodeGuruProfiler, patch: AWSServiceConfig.Patch)
Properties
client
Client used for communication with AWS
public let client: AWSClient
config
Service configuration
public let config: AWSServiceConfig
Methods
addNotificationChannels(_:logger:on:)
public func addNotificationChannels(_ input: AddNotificationChannelsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<AddNotificationChannelsResponse>
Add up to 2 anomaly notifications channels for a profiling group.
batchGetFrameMetricData(_:logger:on:)
public func batchGetFrameMetricData(_ input: BatchGetFrameMetricDataRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<BatchGetFrameMetricDataResponse>
Returns the time series of values for a requested list of frame metrics from a time period.
configureAgent(_:logger:on:)
public func configureAgent(_ input: ConfigureAgentRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ConfigureAgentResponse>
Used by profiler agents to report their current state and to receive remote
configuration updates. For example, ConfigureAgent
can be used
to tell an agent whether to profile or not and for how long to return profiling data.
createProfilingGroup(_:logger:on:)
public func createProfilingGroup(_ input: CreateProfilingGroupRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<CreateProfilingGroupResponse>
Creates a profiling group.
deleteProfilingGroup(_:logger:on:)
public func deleteProfilingGroup(_ input: DeleteProfilingGroupRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DeleteProfilingGroupResponse>
Deletes a profiling group.
describeProfilingGroup(_:logger:on:)
public func describeProfilingGroup(_ input: DescribeProfilingGroupRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DescribeProfilingGroupResponse>
Returns a
ProfilingGroupDescription
object that contains information about the requested profiling group.
getFindingsReportAccountSummary(_:logger:on:)
public func getFindingsReportAccountSummary(_ input: GetFindingsReportAccountSummaryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<GetFindingsReportAccountSummaryResponse>
Returns a list of
FindingsReportSummary
objects that contain analysis results for all profiling groups in your AWS account.
getNotificationConfiguration(_:logger:on:)
public func getNotificationConfiguration(_ input: GetNotificationConfigurationRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<GetNotificationConfigurationResponse>
Get the current configuration for anomaly notifications for a profiling group.
getPolicy(_:logger:on:)
public func getPolicy(_ input: GetPolicyRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<GetPolicyResponse>
Returns the JSON-formatted resource-based policy on a profiling group.
getProfile(_:logger:on:)
public func getProfile(_ input: GetProfileRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<GetProfileResponse>
Gets the aggregated profile of a profiling group for a specified time range. Amazon CodeGuru Profiler collects posted agent profiles for a profiling group into aggregated profiles.
<note>
<p>
Because aggregated profiles expire over time <code>GetProfile</code> is not idempotent.
</p>
</note>
<p>
Specify the time range for the requested aggregated profile using 1 or 2 of the following parameters: <code>startTime</code>,
<code>endTime</code>, <code>period</code>. The maximum time range allowed is 7 days. If you specify all 3 parameters,
an exception is thrown. If you specify only <code>period</code>, the latest aggregated profile is returned.
</p>
<p>
Aggregated profiles are available with aggregation periods of 5 minutes, 1 hour, and 1 day, aligned to
UTC. The aggregation period of an aggregated profile determines how long it is retained. For more
information, see <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AggregatedProfileTime.html">
<code>AggregatedProfileTime</code>
</a>. The aggregated profile's aggregation period determines how long
it is retained by CodeGuru Profiler.
</p>
<ul>
<li>
<p>
If the aggregation period is 5 minutes, the aggregated profile is retained for 15 days.
</p>
</li>
<li>
<p>
If the aggregation period is 1 hour, the aggregated profile is retained for 60 days.
</p>
</li>
<li>
<p>
If the aggregation period is 1 day, the aggregated profile is retained for 3 years.
</p>
</li>
</ul>
<p>There are two use cases for calling <code>GetProfile</code>.</p>
<ol>
<li>
<p>
If you want to return an aggregated profile that already exists, use
<a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ListProfileTimes.html">
<code>ListProfileTimes</code>
</a> to
view the time ranges of existing aggregated profiles. Use them in a <code>GetProfile</code> request to return a specific,
existing aggregated profile.
</p>
</li>
<li>
<p>
If you want to return an aggregated profile for a time range that doesn't align with an existing aggregated profile,
then CodeGuru Profiler makes a best effort to combine existing aggregated profiles from the requested time
range and return them as one aggregated profile.
</p>
<p> If aggregated profiles do not exist for the full time range requested, then
aggregated profiles for a smaller time range are returned. For example, if the
requested time range is from 00:00 to 00:20, and the existing aggregated profiles are
from 00:15 and 00:25, then the aggregated profiles from 00:15 to 00:20 are returned. </p>
</li>
</ol>
getRecommendations(_:logger:on:)
public func getRecommendations(_ input: GetRecommendationsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<GetRecommendationsResponse>
Returns a list of
Recommendation
objects that contain recommendations for a profiling group for a given time period. A list of
Anomaly
objects that contains details about anomalies detected in the profiling group for the same time period is also
returned.
listFindingsReports(_:logger:on:)
public func listFindingsReports(_ input: ListFindingsReportsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListFindingsReportsResponse>
List the available reports for a given profiling group and time range.
listProfileTimes(_:logger:on:)
public func listProfileTimes(_ input: ListProfileTimesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListProfileTimesResponse>
Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.
listProfilingGroups(_:logger:on:)
public func listProfilingGroups(_ input: ListProfilingGroupsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListProfilingGroupsResponse>
Returns a list of profiling groups. The profiling groups are returned as
ProfilingGroupDescription
objects.
listTagsForResource(_:logger:on:)
public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListTagsForResourceResponse>
Returns a list of the tags that are assigned to a specified resource.
postAgentProfile(_:logger:on:)
public func postAgentProfile(_ input: PostAgentProfileRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<PostAgentProfileResponse>
Submits profiling data to an aggregated profile of a profiling group. To get an
aggregated profile that is created with this profiling data, use
GetProfile
.
putPermission(_:logger:on:)
public func putPermission(_ input: PutPermissionRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<PutPermissionResponse>
Adds permissions to a profiling group's resource-based policy
that are provided using an action group. If a profiling group doesn't have
a resource-based policy, one is created for it using the permissions in the action group and
the roles and users in the principals
parameter.
<p> The one supported action group that can be added is <code>agentPermission</code>
which grants <code>ConfigureAgent</code> and <code>PostAgent</code> permissions. For
more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-ug/resource-based-policies.html">Resource-based
policies in CodeGuru Profiler</a> in the <i>Amazon CodeGuru Profiler User
Guide</i>, <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html">
<code>ConfigureAgent</code>
</a>, and <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html">
<code>PostAgentProfile</code>
</a>. </p>
<p>
The first time you call <code>PutPermission</code> on a profiling group, do not specify a <code>revisionId</code> because
it doesn't have a resource-based policy. Subsequent calls must provide a <code>revisionId</code> to specify
which revision of the resource-based policy to add the permissions to.
</p>
<p>
The response contains the profiling group's JSON-formatted resource policy.
</p>
removeNotificationChannel(_:logger:on:)
public func removeNotificationChannel(_ input: RemoveNotificationChannelRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<RemoveNotificationChannelResponse>
Remove one anomaly notifications channel for a profiling group.
removePermission(_:logger:on:)
public func removePermission(_ input: RemovePermissionRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<RemovePermissionResponse>
Removes permissions from a profiling group's resource-based policy that are provided
using an action group. The one supported action group that can be removed is
agentPermission
which grants ConfigureAgent
and
PostAgent
permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon
CodeGuru Profiler User Guide,
ConfigureAgent
, and
PostAgentProfile
.
submitFeedback(_:logger:on:)
public func submitFeedback(_ input: SubmitFeedbackRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<SubmitFeedbackResponse>
Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is useful or not.
tagResource(_:logger:on:)
public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<TagResourceResponse>
Use to assign one or more tags to a resource.
untagResource(_:logger:on:)
public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<UntagResourceResponse>
Use to remove one or more tags from a resource.
updateProfilingGroup(_:logger:on:)
public func updateProfilingGroup(_ input: UpdateProfilingGroupRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<UpdateProfilingGroupResponse>
Updates a profiling group.
getFindingsReportAccountSummaryPaginator(_:logger:on:)
compiler(>=5.5.2) && canImport(_Concurrency)
public func getFindingsReportAccountSummaryPaginator( _ input: GetFindingsReportAccountSummaryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil ) -> AWSClient.PaginatorSequence<GetFindingsReportAccountSummaryRequest, GetFindingsReportAccountSummaryResponse>
Returns a list of
Return PaginatorSequence for operation. - Parameters: - input: Input for request - logger: Logger used flot logging - eventLoop: EventLoop to run this process onFindingsReportSummary
objects that contain analysis results for all profiling groups in your AWS account.
listFindingsReportsPaginator(_:logger:on:)
compiler(>=5.5.2) && canImport(_Concurrency)
public func listFindingsReportsPaginator( _ input: ListFindingsReportsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil ) -> AWSClient.PaginatorSequence<ListFindingsReportsRequest, ListFindingsReportsResponse>
List the available reports for a given profiling group and time range.
Return PaginatorSequence for operation. - Parameters: - input: Input for request - logger: Logger used flot logging - eventLoop: EventLoop to run this process on
listProfileTimesPaginator(_:logger:on:)
compiler(>=5.5.2) && canImport(_Concurrency)
public func listProfileTimesPaginator( _ input: ListProfileTimesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil ) -> AWSClient.PaginatorSequence<ListProfileTimesRequest, ListProfileTimesResponse>
Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.
Return PaginatorSequence for operation. - Parameters: - input: Input for request - logger: Logger used flot logging - eventLoop: EventLoop to run this process on
listProfilingGroupsPaginator(_:logger:on:)
compiler(>=5.5.2) && canImport(_Concurrency)
public func listProfilingGroupsPaginator( _ input: ListProfilingGroupsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil ) -> AWSClient.PaginatorSequence<ListProfilingGroupsRequest, ListProfilingGroupsResponse>
Returns a list of profiling groups. The profiling groups are returned as
Return PaginatorSequence for operation. - Parameters: - input: Input for request - logger: Logger used flot logging - eventLoop: EventLoop to run this process onProfilingGroupDescription
objects.
getFindingsReportAccountSummaryPaginator(_:_:logger:on:onPage:)
Provide paginated results to closure onPage
for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result
.
public func getFindingsReportAccountSummaryPaginator<Result>(
_ input: GetFindingsReportAccountSummaryRequest,
_ initialValue: Result,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (Result, GetFindingsReportAccountSummaryResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>
) -> EventLoopFuture<Result>
Returns a list of
FindingsReportSummary
objects that contain analysis results for all profiling groups in your AWS account.
Parameters:
- input: Input for request
- initialValue: The value to use as the initial accumulating value.
initialValue
is passed toonPage
the first time it is called.
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.
getFindingsReportAccountSummaryPaginator(_:logger:on:onPage:)
Provide paginated results to closure onPage
.
public func getFindingsReportAccountSummaryPaginator(
_ input: GetFindingsReportAccountSummaryRequest,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (GetFindingsReportAccountSummaryResponse, EventLoop) -> EventLoopFuture<Bool>
) -> EventLoopFuture<Void>
Parameters
- input: Input for request
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.
listFindingsReportsPaginator(_:_:logger:on:onPage:)
Provide paginated results to closure onPage
for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result
.
public func listFindingsReportsPaginator<Result>(
_ input: ListFindingsReportsRequest,
_ initialValue: Result,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (Result, ListFindingsReportsResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>
) -> EventLoopFuture<Result>
List the available reports for a given profiling group and time range.
Parameters:
- input: Input for request
- initialValue: The value to use as the initial accumulating value.
initialValue
is passed toonPage
the first time it is called.
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.
listFindingsReportsPaginator(_:logger:on:onPage:)
Provide paginated results to closure onPage
.
public func listFindingsReportsPaginator(
_ input: ListFindingsReportsRequest,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (ListFindingsReportsResponse, EventLoop) -> EventLoopFuture<Bool>
) -> EventLoopFuture<Void>
Parameters
- input: Input for request
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.
listProfileTimesPaginator(_:_:logger:on:onPage:)
Provide paginated results to closure onPage
for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result
.
public func listProfileTimesPaginator<Result>(
_ input: ListProfileTimesRequest,
_ initialValue: Result,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (Result, ListProfileTimesResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>
) -> EventLoopFuture<Result>
Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.
Parameters:
- input: Input for request
- initialValue: The value to use as the initial accumulating value.
initialValue
is passed toonPage
the first time it is called.
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.
listProfileTimesPaginator(_:logger:on:onPage:)
Provide paginated results to closure onPage
.
public func listProfileTimesPaginator(
_ input: ListProfileTimesRequest,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (ListProfileTimesResponse, EventLoop) -> EventLoopFuture<Bool>
) -> EventLoopFuture<Void>
Parameters
- input: Input for request
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.
listProfilingGroupsPaginator(_:_:logger:on:onPage:)
Provide paginated results to closure onPage
for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result
.
public func listProfilingGroupsPaginator<Result>(
_ input: ListProfilingGroupsRequest,
_ initialValue: Result,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (Result, ListProfilingGroupsResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>
) -> EventLoopFuture<Result>
Returns a list of profiling groups. The profiling groups are returned as
ProfilingGroupDescription
objects.
Parameters:
- input: Input for request
- initialValue: The value to use as the initial accumulating value.
initialValue
is passed toonPage
the first time it is called.
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.
listProfilingGroupsPaginator(_:logger:on:onPage:)
Provide paginated results to closure onPage
.
public func listProfilingGroupsPaginator(
_ input: ListProfilingGroupsRequest,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (ListProfilingGroupsResponse, EventLoop) -> EventLoopFuture<Bool>
) -> EventLoopFuture<Void>
Parameters
- input: Input for request
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.