SDK for PHP 3.x

Client: Aws\CodeGuruProfiler\CodeGuruProfilerClient
Service ID: codeguruprofiler
Version: 2019-07-18

This page describes the parameters and results for the operations of the Amazon CodeGuru Profiler (2019-07-18), and shows how to use the Aws\CodeGuruProfiler\CodeGuruProfilerClient object to call the described operations. This documentation is specific to the 2019-07-18 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AddNotificationChannels ( array $params = [] )
Add up to 2 anomaly notifications channels for a profiling group.
BatchGetFrameMetricData ( array $params = [] )
Returns the time series of values for a requested list of frame metrics from a time period.
ConfigureAgent ( array $params = [] )
Used by profiler agents to report their current state and to receive remote configuration updates.
CreateProfilingGroup ( array $params = [] )
Creates a profiling group.
DeleteProfilingGroup ( array $params = [] )
Deletes a profiling group.
DescribeProfilingGroup ( array $params = [] )
Returns a ProfilingGroupDescription object that contains information about the requested profiling group.
GetFindingsReportAccountSummary ( array $params = [] )
Returns a list of FindingsReportSummary objects that contain analysis results for all profiling groups in your AWS account.
GetNotificationConfiguration ( array $params = [] )
Get the current configuration for anomaly notifications for a profiling group.
GetPolicy ( array $params = [] )
Returns the JSON-formatted resource-based policy on a profiling group.
GetProfile ( array $params = [] )
Gets the aggregated profile of a profiling group for a specified time range.
GetRecommendations ( array $params = [] )
Returns a list of Recommendation objects that contain recommendations for a profiling group for a given time period.
ListFindingsReports ( array $params = [] )
List the available reports for a given profiling group and time range.
ListProfileTimes ( array $params = [] )
Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.
ListProfilingGroups ( array $params = [] )
Returns a list of profiling groups.
ListTagsForResource ( array $params = [] )
Returns a list of the tags that are assigned to a specified resource.
PostAgentProfile ( array $params = [] )
Submits profiling data to an aggregated profile of a profiling group.
PutPermission ( array $params = [] )
Adds permissions to a profiling group's resource-based policy that are provided using an action group.
RemoveNotificationChannel ( array $params = [] )
Remove one anomaly notifications channel for a profiling group.
RemovePermission ( array $params = [] )
Removes permissions from a profiling group's resource-based policy that are provided using an action group.
SubmitFeedback ( array $params = [] )
Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is useful or not.
TagResource ( array $params = [] )
Use to assign one or more tags to a resource.
UntagResource ( array $params = [] )
Use to remove one or more tags from a resource.
UpdateProfilingGroup ( array $params = [] )
Updates a profiling group.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

GetFindingsReportAccountSummary
ListFindingsReports
ListProfileTimes
ListProfilingGroups

Operations

AddNotificationChannels

$result = $client->addNotificationChannels([/* ... */]);
$promise = $client->addNotificationChannelsAsync([/* ... */]);

Add up to 2 anomaly notifications channels for a profiling group.

Parameter Syntax

$result = $client->addNotificationChannels([
    'channels' => [ // REQUIRED
        [
            'eventPublishers' => ['<string>', ...], // REQUIRED
            'id' => '<string>',
            'uri' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
channels
Required: Yes
Type: Array of Channel structures

One or 2 channels to report to when anomalies are detected.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group that we are setting up notifications for.

Result Syntax

[
    'notificationConfiguration' => [
        'channels' => [
            [
                'eventPublishers' => ['<string>', ...],
                'id' => '<string>',
                'uri' => '<string>',
            ],
            // ...
        ],
    ],
]

Result Details

Members
notificationConfiguration
Type: NotificationConfiguration structure

The new notification configuration for this profiling group.

Errors

ServiceQuotaExceededException:

You have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

BatchGetFrameMetricData

$result = $client->batchGetFrameMetricData([/* ... */]);
$promise = $client->batchGetFrameMetricDataAsync([/* ... */]);

Returns the time series of values for a requested list of frame metrics from a time period.

Parameter Syntax

$result = $client->batchGetFrameMetricData([
    'endTime' => <integer || string || DateTime>,
    'frameMetrics' => [
        [
            'frameName' => '<string>', // REQUIRED
            'threadStates' => ['<string>', ...], // REQUIRED
            'type' => 'AggregatedRelativeTotalTime', // REQUIRED
        ],
        // ...
    ],
    'period' => '<string>',
    'profilingGroupName' => '<string>', // REQUIRED
    'startTime' => <integer || string || DateTime>,
    'targetResolution' => 'PT5M|PT1H|P1D',
]);

Parameter Details

Members
endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the time period for the returned time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

frameMetrics
Type: Array of FrameMetric structures

The details of the metrics that are used to request a time series of values. The metric includes the name of the frame, the aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for the metric value of the frame.

period
Type: string

The duration of the frame metrics used to return the time series values. Specify using the ISO 8601 format. The maximum period duration is one day (PT24H or P1D).

profilingGroupName
Required: Yes
Type: string

The name of the profiling group associated with the the frame metrics used to return the time series values.

startTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the time period for the frame metrics used to return the time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

targetResolution
Type: string

The requested resolution of time steps for the returned time series of values. If the requested target resolution is not available due to data not being retained we provide a best effort result by falling back to the most granular available resolution after the target resolution. There are 3 valid values.

  • P1D — 1 day

  • PT1H — 1 hour

  • PT5M — 5 minutes

Result Syntax

[
    'endTime' => <DateTime>,
    'endTimes' => [
        [
            'value' => <DateTime>,
        ],
        // ...
    ],
    'frameMetricData' => [
        [
            'frameMetric' => [
                'frameName' => '<string>',
                'threadStates' => ['<string>', ...],
                'type' => 'AggregatedRelativeTotalTime',
            ],
            'values' => [<float>, ...],
        ],
        // ...
    ],
    'resolution' => 'PT5M|PT1H|P1D',
    'startTime' => <DateTime>,
    'unprocessedEndTimes' => [
        '<String>' => [
            [
                'value' => <DateTime>,
            ],
            // ...
        ],
        // ...
    ],
]

Result Details

Members
endTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the time period for the returned time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

endTimes
Required: Yes
Type: Array of TimestampStructure structures

List of instances, or time steps, in the time series. For example, if the period is one day (PT24H)), and the resolution is five minutes (PT5M), then there are 288 endTimes in the list that are each five minutes appart.

frameMetricData
Required: Yes
Type: Array of FrameMetricDatum structures

Details of the metrics to request a time series of values. The metric includes the name of the frame, the aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for the metric value of the frame.

resolution
Required: Yes
Type: string

Resolution or granularity of the profile data used to generate the time series. This is the value used to jump through time steps in a time series. There are 3 valid values.

  • P1D — 1 day

  • PT1H — 1 hour

  • PT5M — 5 minutes

startTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the time period for the returned time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

unprocessedEndTimes
Required: Yes
Type: Associative array of custom strings keys (String) to TimestampStructure structuress

List of instances which remained unprocessed. This will create a missing time step in the list of end times.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

ConfigureAgent

$result = $client->configureAgent([/* ... */]);
$promise = $client->configureAgentAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->configureAgent([
    'fleetInstanceId' => '<string>',
    'metadata' => ['<string>', ...],
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
fleetInstanceId
Type: string

A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is an Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's task ID.

metadata
Type: Associative array of custom strings keys (MetadataField) to strings

Metadata captured about the compute platform the agent is running on. It includes information about sampling and reporting. The valid fields are:

  • COMPUTE_PLATFORM - The compute platform on which the agent is running

  • AGENT_ID - The ID for an agent instance.

  • AWS_REQUEST_ID - The AWS request ID of a Lambda invocation.

  • EXECUTION_ENVIRONMENT - The execution environment a Lambda function is running on.

  • LAMBDA_FUNCTION_ARN - The Amazon Resource Name (ARN) that is used to invoke a Lambda function.

  • LAMBDA_MEMORY_LIMIT_IN_MB - The memory allocated to a Lambda function.

  • LAMBDA_REMAINING_TIME_IN_MILLISECONDS - The time in milliseconds before execution of a Lambda function times out.

  • LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS - The time in milliseconds between two invocations of a Lambda function.

  • LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS - The time in milliseconds for the previous Lambda invocation.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group for which the configured agent is collecting profiling data.

Result Syntax

[
    'configuration' => [
        'agentParameters' => ['<string>', ...],
        'periodInSeconds' => <integer>,
        'shouldProfile' => true || false,
    ],
]

Result Details

Members
configuration
Required: Yes
Type: AgentConfiguration structure

An AgentConfiguration object that specifies if an agent profiles or not and for how long to return profiling data.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

CreateProfilingGroup

$result = $client->createProfilingGroup([/* ... */]);
$promise = $client->createProfilingGroupAsync([/* ... */]);

Creates a profiling group.

Parameter Syntax

$result = $client->createProfilingGroup([
    'agentOrchestrationConfig' => [
        'profilingEnabled' => true || false, // REQUIRED
    ],
    'clientToken' => '<string>', // REQUIRED
    'computePlatform' => 'Default|AWSLambda',
    'profilingGroupName' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
agentOrchestrationConfig
Type: AgentOrchestrationConfig structure

Specifies whether profiling is enabled or disabled for the created profiling group.

clientToken
Required: Yes
Type: string

Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental creation of duplicate profiling groups if there are failures and retries.

computePlatform
Type: string

The compute platform of the profiling group. Use AWSLambda if your application runs on AWS Lambda. Use Default if your application runs on a compute platform that is not AWS Lambda, such an Amazon EC2 instance, an on-premises server, or a different platform. If not specified, Default is used.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group to create.

tags
Type: Associative array of custom strings keys (String) to strings

A list of tags to add to the created profiling group.

Result Syntax

[
    'profilingGroup' => [
        'agentOrchestrationConfig' => [
            'profilingEnabled' => true || false,
        ],
        'arn' => '<string>',
        'computePlatform' => 'Default|AWSLambda',
        'createdAt' => <DateTime>,
        'name' => '<string>',
        'profilingStatus' => [
            'latestAgentOrchestratedAt' => <DateTime>,
            'latestAgentProfileReportedAt' => <DateTime>,
            'latestAggregatedProfile' => [
                'period' => 'PT5M|PT1H|P1D',
                'start' => <DateTime>,
            ],
        ],
        'tags' => ['<string>', ...],
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
profilingGroup
Required: Yes
Type: ProfilingGroupDescription structure

The returned ProfilingGroupDescription object that contains information about the created profiling group.

Errors

ServiceQuotaExceededException:

You have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

DeleteProfilingGroup

$result = $client->deleteProfilingGroup([/* ... */]);
$promise = $client->deleteProfilingGroupAsync([/* ... */]);

Deletes a profiling group.

Parameter Syntax

$result = $client->deleteProfilingGroup([
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
profilingGroupName
Required: Yes
Type: string

The name of the profiling group to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

DescribeProfilingGroup

$result = $client->describeProfilingGroup([/* ... */]);
$promise = $client->describeProfilingGroupAsync([/* ... */]);

Returns a ProfilingGroupDescription object that contains information about the requested profiling group.

Parameter Syntax

$result = $client->describeProfilingGroup([
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
profilingGroupName
Required: Yes
Type: string

The name of the profiling group to get information about.

Result Syntax

[
    'profilingGroup' => [
        'agentOrchestrationConfig' => [
            'profilingEnabled' => true || false,
        ],
        'arn' => '<string>',
        'computePlatform' => 'Default|AWSLambda',
        'createdAt' => <DateTime>,
        'name' => '<string>',
        'profilingStatus' => [
            'latestAgentOrchestratedAt' => <DateTime>,
            'latestAgentProfileReportedAt' => <DateTime>,
            'latestAggregatedProfile' => [
                'period' => 'PT5M|PT1H|P1D',
                'start' => <DateTime>,
            ],
        ],
        'tags' => ['<string>', ...],
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
profilingGroup
Required: Yes
Type: ProfilingGroupDescription structure

The returned ProfilingGroupDescription object that contains information about the requested profiling group.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

GetFindingsReportAccountSummary

$result = $client->getFindingsReportAccountSummary([/* ... */]);
$promise = $client->getFindingsReportAccountSummaryAsync([/* ... */]);

Returns a list of FindingsReportSummary objects that contain analysis results for all profiling groups in your AWS account.

Parameter Syntax

$result = $client->getFindingsReportAccountSummary([
    'dailyReportsOnly' => true || false,
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
dailyReportsOnly
Type: boolean

A Boolean value indicating whether to only return reports from daily profiles. If set to True, only analysis data from daily profiles is returned. If set to False, analysis data is returned from smaller time windows (for example, one hour).

maxResults
Type: int

The maximum number of results returned by GetFindingsReportAccountSummary in paginated output. When this parameter is used, GetFindingsReportAccountSummary only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another GetFindingsReportAccountSummary request with the returned nextToken value.

nextToken
Type: string

The nextToken value returned from a previous paginated GetFindingsReportAccountSummary request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

Result Syntax

[
    'nextToken' => '<string>',
    'reportSummaries' => [
        [
            'id' => '<string>',
            'profileEndTime' => <DateTime>,
            'profileStartTime' => <DateTime>,
            'profilingGroupName' => '<string>',
            'totalNumberOfFindings' => <integer>,
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

The nextToken value to include in a future GetFindingsReportAccountSummary request. When the results of a GetFindingsReportAccountSummary request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

reportSummaries
Required: Yes
Type: Array of FindingsReportSummary structures

The return list of FindingsReportSummary objects taht contain summaries of analysis results for all profiling groups in your AWS account.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

GetNotificationConfiguration

$result = $client->getNotificationConfiguration([/* ... */]);
$promise = $client->getNotificationConfigurationAsync([/* ... */]);

Get the current configuration for anomaly notifications for a profiling group.

Parameter Syntax

$result = $client->getNotificationConfiguration([
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
profilingGroupName
Required: Yes
Type: string

The name of the profiling group we want to get the notification configuration for.

Result Syntax

[
    'notificationConfiguration' => [
        'channels' => [
            [
                'eventPublishers' => ['<string>', ...],
                'id' => '<string>',
                'uri' => '<string>',
            ],
            // ...
        ],
    ],
]

Result Details

Members
notificationConfiguration
Required: Yes
Type: NotificationConfiguration structure

The current notification configuration for this profiling group.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

GetPolicy

$result = $client->getPolicy([/* ... */]);
$promise = $client->getPolicyAsync([/* ... */]);

Returns the JSON-formatted resource-based policy on a profiling group.

Parameter Syntax

$result = $client->getPolicy([
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
profilingGroupName
Required: Yes
Type: string

The name of the profiling group.

Result Syntax

[
    'policy' => '<string>',
    'revisionId' => '<string>',
]

Result Details

Members
policy
Required: Yes
Type: string

The JSON-formatted resource-based policy attached to the ProfilingGroup.

revisionId
Required: Yes
Type: string

A unique identifier for the current revision of the returned policy.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

GetProfile

$result = $client->getProfile([/* ... */]);
$promise = $client->getProfileAsync([/* ... */]);

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> 

Parameter Syntax

$result = $client->getProfile([
    'accept' => '<string>',
    'endTime' => <integer || string || DateTime>,
    'maxDepth' => <integer>,
    'period' => '<string>',
    'profilingGroupName' => '<string>', // REQUIRED
    'startTime' => <integer || string || DateTime>,
]);

Parameter Details

Members
accept
Type: string

The format of the returned profiling data. The format maps to the Accept and Content-Type headers of the HTTP request. You can specify one of the following: or the default .

 <ul> <li> <p> <code>application/json</code> — standard JSON format </p> </li> <li> <p> <code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href="http://amzn.github.io/ion-docs/">Amazon Ion</a>. </p> </li> </ul> 
endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the requested profile. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

If you specify endTime, then you must also specify period or startTime, but not both.

maxDepth
Type: int

The maximum depth of the stacks in the code that is represented in the aggregated profile. For example, if CodeGuru Profiler finds a method A, which calls method B, which calls method C, which calls method D, then the depth is 4. If the maxDepth is set to 2, then the aggregated profile contains representations of methods A and B.

period
Type: string

Used with startTime or endTime to specify the time range for the returned aggregated profile. Specify using the ISO 8601 format. For example, P1DT1H1M1S.

 <p> To get the latest aggregated profile, specify only <code>period</code>. </p> 
profilingGroupName
Required: Yes
Type: string

The name of the profiling group to get.

startTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the profile to get. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

 <p> If you specify <code>startTime</code>, then you must also specify <code>period</code> or <code>endTime</code>, but not both. </p> 

Result Syntax

[
    'contentEncoding' => '<string>',
    'contentType' => '<string>',
    'profile' => <string || resource || Psr\Http\Message\StreamInterface>,
]

Result Details

Members
contentEncoding
Type: string

The content encoding of the profile.

contentType
Required: Yes
Type: string

The content type of the profile in the payload. It is either application/json or the default application/x-amzn-ion.

profile
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

Information about the profile.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

GetRecommendations

$result = $client->getRecommendations([/* ... */]);
$promise = $client->getRecommendationsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getRecommendations([
    'endTime' => <integer || string || DateTime>, // REQUIRED
    'locale' => '<string>',
    'profilingGroupName' => '<string>', // REQUIRED
    'startTime' => <integer || string || DateTime>, // REQUIRED
]);

Parameter Details

Members
endTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the profile to get analysis data about. You must specify startTime and endTime. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

locale
Type: string

The language used to provide analysis. Specify using a string that is one of the following BCP 47 language codes.

  • de-DE - German, Germany

  • en-GB - English, United Kingdom

  • en-US - English, United States

  • es-ES - Spanish, Spain

  • fr-FR - French, France

  • it-IT - Italian, Italy

  • ja-JP - Japanese, Japan

  • ko-KR - Korean, Republic of Korea

  • pt-BR - Portugese, Brazil

  • zh-CN - Chinese, China

  • zh-TW - Chinese, Taiwan

profilingGroupName
Required: Yes
Type: string

The name of the profiling group to get analysis data about.

startTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the profile to get analysis data about. You must specify startTime and endTime. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

Result Syntax

[
    'anomalies' => [
        [
            'instances' => [
                [
                    'endTime' => <DateTime>,
                    'id' => '<string>',
                    'startTime' => <DateTime>,
                    'userFeedback' => [
                        'type' => 'Positive|Negative',
                    ],
                ],
                // ...
            ],
            'metric' => [
                'frameName' => '<string>',
                'threadStates' => ['<string>', ...],
                'type' => 'AggregatedRelativeTotalTime',
            ],
            'reason' => '<string>',
        ],
        // ...
    ],
    'profileEndTime' => <DateTime>,
    'profileStartTime' => <DateTime>,
    'profilingGroupName' => '<string>',
    'recommendations' => [
        [
            'allMatchesCount' => <integer>,
            'allMatchesSum' => <float>,
            'endTime' => <DateTime>,
            'pattern' => [
                'countersToAggregate' => ['<string>', ...],
                'description' => '<string>',
                'id' => '<string>',
                'name' => '<string>',
                'resolutionSteps' => '<string>',
                'targetFrames' => [
                    ['<string>', ...],
                    // ...
                ],
                'thresholdPercent' => <float>,
            ],
            'startTime' => <DateTime>,
            'topMatches' => [
                [
                    'frameAddress' => '<string>',
                    'targetFramesIndex' => <integer>,
                    'thresholdBreachValue' => <float>,
                ],
                // ...
            ],
        ],
        // ...
    ],
]

Result Details

Members
anomalies
Required: Yes
Type: Array of Anomaly structures

The list of anomalies that the analysis has found for this profile.

profileEndTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

profileStartTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group the analysis data is about.

recommendations
Required: Yes
Type: Array of Recommendation structures

The list of recommendations that the analysis found for this profile.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

ListFindingsReports

$result = $client->listFindingsReports([/* ... */]);
$promise = $client->listFindingsReportsAsync([/* ... */]);

List the available reports for a given profiling group and time range.

Parameter Syntax

$result = $client->listFindingsReports([
    'dailyReportsOnly' => true || false,
    'endTime' => <integer || string || DateTime>, // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'profilingGroupName' => '<string>', // REQUIRED
    'startTime' => <integer || string || DateTime>, // REQUIRED
]);

Parameter Details

Members
dailyReportsOnly
Type: boolean

A Boolean value indicating whether to only return reports from daily profiles. If set to True, only analysis data from daily profiles is returned. If set to False, analysis data is returned from smaller time windows (for example, one hour).

endTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the profile to get analysis data about. You must specify startTime and endTime. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

maxResults
Type: int

The maximum number of report results returned by ListFindingsReports in paginated output. When this parameter is used, ListFindingsReports only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListFindingsReports request with the returned nextToken value.

nextToken
Type: string

The nextToken value returned from a previous paginated ListFindingsReportsRequest request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group from which to search for analysis data.

startTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the profile to get analysis data about. You must specify startTime and endTime. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

Result Syntax

[
    'findingsReportSummaries' => [
        [
            'id' => '<string>',
            'profileEndTime' => <DateTime>,
            'profileStartTime' => <DateTime>,
            'profilingGroupName' => '<string>',
            'totalNumberOfFindings' => <integer>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
findingsReportSummaries
Required: Yes
Type: Array of FindingsReportSummary structures

The list of analysis results summaries.

nextToken
Type: string

The nextToken value to include in a future ListFindingsReports request. When the results of a ListFindingsReports request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

ListProfileTimes

$result = $client->listProfileTimes([/* ... */]);
$promise = $client->listProfileTimesAsync([/* ... */]);

Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.

Parameter Syntax

$result = $client->listProfileTimes([
    'endTime' => <integer || string || DateTime>, // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'orderBy' => 'TimestampDescending|TimestampAscending',
    'period' => 'PT5M|PT1H|P1D', // REQUIRED
    'profilingGroupName' => '<string>', // REQUIRED
    'startTime' => <integer || string || DateTime>, // REQUIRED
]);

Parameter Details

Members
endTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the time range from which to list the profiles.

maxResults
Type: int

The maximum number of profile time results returned by ListProfileTimes in paginated output. When this parameter is used, ListProfileTimes only returns maxResults results in a single page with a nextToken response element. The remaining results of the initial request can be seen by sending another ListProfileTimes request with the returned nextToken value.

nextToken
Type: string

The nextToken value returned from a previous paginated ListProfileTimes request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

orderBy
Type: string

The order (ascending or descending by start time of the profile) to use when listing profiles. Defaults to TIMESTAMP_DESCENDING.

period
Required: Yes
Type: string

The aggregation period. This specifies the period during which an aggregation profile collects posted agent profiles for a profiling group. There are 3 valid values.

  • P1D — 1 day

  • PT1H — 1 hour

  • PT5M — 5 minutes

profilingGroupName
Required: Yes
Type: string

The name of the profiling group.

startTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the time range from which to list the profiles.

Result Syntax

[
    'nextToken' => '<string>',
    'profileTimes' => [
        [
            'start' => <DateTime>,
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

The nextToken value to include in a future ListProfileTimes request. When the results of a ListProfileTimes request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

profileTimes
Required: Yes
Type: Array of ProfileTime structures

The list of start times of the available profiles for the aggregation period in the specified time range.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

ListProfilingGroups

$result = $client->listProfilingGroups([/* ... */]);
$promise = $client->listProfilingGroupsAsync([/* ... */]);

Returns a list of profiling groups. The profiling groups are returned as ProfilingGroupDescription objects.

Parameter Syntax

$result = $client->listProfilingGroups([
    'includeDescription' => true || false,
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
includeDescription
Type: boolean

A Boolean value indicating whether to include a description. If true, then a list of ProfilingGroupDescription objects that contain detailed information about profiling groups is returned. If false, then a list of profiling group names is returned.

maxResults
Type: int

The maximum number of profiling groups results returned by ListProfilingGroups in paginated output. When this parameter is used, ListProfilingGroups only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListProfilingGroups request with the returned nextToken value.

nextToken
Type: string

The nextToken value returned from a previous paginated ListProfilingGroups request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

Result Syntax

[
    'nextToken' => '<string>',
    'profilingGroupNames' => ['<string>', ...],
    'profilingGroups' => [
        [
            'agentOrchestrationConfig' => [
                'profilingEnabled' => true || false,
            ],
            'arn' => '<string>',
            'computePlatform' => 'Default|AWSLambda',
            'createdAt' => <DateTime>,
            'name' => '<string>',
            'profilingStatus' => [
                'latestAgentOrchestratedAt' => <DateTime>,
                'latestAgentProfileReportedAt' => <DateTime>,
                'latestAggregatedProfile' => [
                    'period' => 'PT5M|PT1H|P1D',
                    'start' => <DateTime>,
                ],
            ],
            'tags' => ['<string>', ...],
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

The nextToken value to include in a future ListProfilingGroups request. When the results of a ListProfilingGroups request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

profilingGroupNames
Required: Yes
Type: Array of strings

A returned list of profiling group names. A list of the names is returned only if includeDescription is false, otherwise a list of ProfilingGroupDescription objects is returned.

profilingGroups
Type: Array of ProfilingGroupDescription structures

A returned list ProfilingGroupDescription objects. A list of ProfilingGroupDescription objects is returned only if includeDescription is true, otherwise a list of profiling group names is returned.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ThrottlingException:

The request was denied due to request throttling.

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Returns a list of the tags that are assigned to a specified resource.

Parameter Syntax

$result = $client->listTagsForResource([
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource that contains the tags to return.

Result Syntax

[
    'tags' => ['<string>', ...],
]

Result Details

Members
tags
Type: Associative array of custom strings keys (String) to strings

The list of tags assigned to the specified resource. This is the list of tags returned in the response.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ResourceNotFoundException:

The resource specified in the request does not exist.

PostAgentProfile

$result = $client->postAgentProfile([/* ... */]);
$promise = $client->postAgentProfileAsync([/* ... */]);

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 .

Parameter Syntax

$result = $client->postAgentProfile([
    'agentProfile' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
    'contentType' => '<string>', // REQUIRED
    'profileToken' => '<string>',
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentProfile
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The submitted profiling data.

contentType
Required: Yes
Type: string

The format of the submitted profiling data. The format maps to the Accept and Content-Type headers of the HTTP request. You can specify one of the following: or the default .

 <ul> <li> <p> <code>application/json</code> — standard JSON format </p> </li> <li> <p> <code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href="http://amzn.github.io/ion-docs/">Amazon Ion</a>. </p> </li> </ul> 
profileToken
Type: string

Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group with the aggregated profile that receives the submitted profiling data.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

PutPermission

$result = $client->putPermission([/* ... */]);
$promise = $client->putPermissionAsync([/* ... */]);

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> 

Parameter Syntax

$result = $client->putPermission([
    'actionGroup' => 'agentPermissions', // REQUIRED
    'principals' => ['<string>', ...], // REQUIRED
    'profilingGroupName' => '<string>', // REQUIRED
    'revisionId' => '<string>',
]);

Parameter Details

Members
actionGroup
Required: Yes
Type: string

Specifies an action group that contains permissions to add to a profiling group resource. One action group is supported, agentPermissions, which grants permission to perform actions required by the profiling agent, ConfigureAgent and PostAgentProfile permissions.

principals
Required: Yes
Type: Array of strings

A list ARNs for the roles and users you want to grant access to the profiling group. Wildcards are not are supported in the ARNs.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group to grant access to.

revisionId
Type: string

A universally unique identifier (UUID) for the revision of the policy you are adding to the profiling group. Do not specify this when you add permissions to a profiling group for the first time. If a policy already exists on the profiling group, you must specify the revisionId.

Result Syntax

[
    'policy' => '<string>',
    'revisionId' => '<string>',
]

Result Details

Members
policy
Required: Yes
Type: string

The JSON-formatted resource-based policy on the profiling group that includes the added permissions.

revisionId
Required: Yes
Type: string

A universally unique identifier (UUID) for the revision of the resource-based policy that includes the added permissions. The JSON-formatted policy is in the policy element of the response.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

RemoveNotificationChannel

$result = $client->removeNotificationChannel([/* ... */]);
$promise = $client->removeNotificationChannelAsync([/* ... */]);

Remove one anomaly notifications channel for a profiling group.

Parameter Syntax

$result = $client->removeNotificationChannel([
    'channelId' => '<string>', // REQUIRED
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
channelId
Required: Yes
Type: string

The id of the channel that we want to stop receiving notifications.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group we want to change notification configuration for.

Result Syntax

[
    'notificationConfiguration' => [
        'channels' => [
            [
                'eventPublishers' => ['<string>', ...],
                'id' => '<string>',
                'uri' => '<string>',
            ],
            // ...
        ],
    ],
]

Result Details

Members
notificationConfiguration
Type: NotificationConfiguration structure

The new notification configuration for this profiling group.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

RemovePermission

$result = $client->removePermission([/* ... */]);
$promise = $client->removePermissionAsync([/* ... */]);

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 .

Parameter Syntax

$result = $client->removePermission([
    'actionGroup' => 'agentPermissions', // REQUIRED
    'profilingGroupName' => '<string>', // REQUIRED
    'revisionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
actionGroup
Required: Yes
Type: string

Specifies an action group that contains the permissions to remove from a profiling group's resource-based policy. One action group is supported, agentPermissions, which grants ConfigureAgent and PostAgentProfile permissions.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group.

revisionId
Required: Yes
Type: string

A universally unique identifier (UUID) for the revision of the resource-based policy from which you want to remove permissions.

Result Syntax

[
    'policy' => '<string>',
    'revisionId' => '<string>',
]

Result Details

Members
policy
Required: Yes
Type: string

The JSON-formatted resource-based policy on the profiling group after the specified permissions were removed.

revisionId
Required: Yes
Type: string

A universally unique identifier (UUID) for the revision of the resource-based policy after the specified permissions were removed. The updated JSON-formatted policy is in the policy element of the response.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

SubmitFeedback

$result = $client->submitFeedback([/* ... */]);
$promise = $client->submitFeedbackAsync([/* ... */]);

Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is useful or not.

Parameter Syntax

$result = $client->submitFeedback([
    'anomalyInstanceId' => '<string>', // REQUIRED
    'comment' => '<string>',
    'profilingGroupName' => '<string>', // REQUIRED
    'type' => 'Positive|Negative', // REQUIRED
]);

Parameter Details

Members
anomalyInstanceId
Required: Yes
Type: string

The universally unique identifier (UUID) of the AnomalyInstance object that is included in the analysis data.

comment
Type: string

Optional feedback about this anomaly.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group that is associated with the analysis data.

type
Required: Yes
Type: string

The feedback tpye. Thee are two valid values, Positive and Negative.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Use to assign one or more tags to a resource.

Parameter Syntax

$result = $client->tagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource that the tags are added to.

tags
Required: Yes
Type: Associative array of custom strings keys (String) to strings

The list of tags that are added to the specified resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ResourceNotFoundException:

The resource specified in the request does not exist.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Use to remove one or more tags from a resource.

Parameter Syntax

$result = $client->untagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource that contains the tags to remove.

tagKeys
Required: Yes
Type: Array of strings

A list of tag keys. Existing tags of resources with keys in this list are removed from the specified resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ValidationException:

The parameter is not valid.

ResourceNotFoundException:

The resource specified in the request does not exist.

UpdateProfilingGroup

$result = $client->updateProfilingGroup([/* ... */]);
$promise = $client->updateProfilingGroupAsync([/* ... */]);

Updates a profiling group.

Parameter Syntax

$result = $client->updateProfilingGroup([
    'agentOrchestrationConfig' => [ // REQUIRED
        'profilingEnabled' => true || false, // REQUIRED
    ],
    'profilingGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentOrchestrationConfig
Required: Yes
Type: AgentOrchestrationConfig structure

Specifies whether profiling is enabled or disabled for a profiling group.

profilingGroupName
Required: Yes
Type: string

The name of the profiling group to update.

Result Syntax

[
    'profilingGroup' => [
        'agentOrchestrationConfig' => [
            'profilingEnabled' => true || false,
        ],
        'arn' => '<string>',
        'computePlatform' => 'Default|AWSLambda',
        'createdAt' => <DateTime>,
        'name' => '<string>',
        'profilingStatus' => [
            'latestAgentOrchestratedAt' => <DateTime>,
            'latestAgentProfileReportedAt' => <DateTime>,
            'latestAggregatedProfile' => [
                'period' => 'PT5M|PT1H|P1D',
                'start' => <DateTime>,
            ],
        ],
        'tags' => ['<string>', ...],
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
profilingGroup
Required: Yes
Type: ProfilingGroupDescription structure

A ProfilingGroupDescription that contains information about the returned updated profiling group.

Errors

InternalServerException:

The server encountered an internal error and is unable to complete the request.

ConflictException:

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

ValidationException:

The parameter is not valid.

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The resource specified in the request does not exist.

Shapes

AgentConfiguration

Description

The response of ConfigureAgent that specifies if an agent profiles or not and for how long to return profiling data.

Members
agentParameters
Type: Associative array of custom strings keys (AgentParameterField) to strings

Parameters used by the profiler. The valid parameters are:

  • MaxStackDepth - The maximum depth of the stacks in the code that is represented in the profile. For example, if CodeGuru Profiler finds a method A, which calls method B, which calls method C, which calls method D, then the depth is 4. If the maxDepth is set to 2, then the profiler evaluates A and B.

  • MemoryUsageLimitPercent - The percentage of memory that is used by the profiler.

  • MinimumTimeForReportingInMilliseconds - The minimum time in milliseconds between sending reports.

  • ReportingIntervalInMilliseconds - The reporting interval in milliseconds used to report profiles.

  • SamplingIntervalInMilliseconds - The sampling interval in milliseconds that is used to profile samples.

periodInSeconds
Required: Yes
Type: int

How long a profiling agent should send profiling data using ConfigureAgent . For example, if this is set to 300, the profiling agent calls ConfigureAgent every 5 minutes to submit the profiled data collected during that period.

shouldProfile
Required: Yes
Type: boolean

A Boolean that specifies whether the profiling agent collects profiling data or not. Set to true to enable profiling.

AgentOrchestrationConfig

Description

Specifies whether profiling is enabled or disabled for a profiling group. It is used by ConfigureAgent to enable or disable profiling for a profiling group.

Members
profilingEnabled
Required: Yes
Type: boolean

A Boolean that specifies whether the profiling agent collects profiling data or not. Set to true to enable profiling.

AggregatedProfileTime

Description

Specifies the aggregation period and aggregation start time for an aggregated profile. An aggregated profile is used to collect posted agent profiles during an aggregation period. There are three possible aggregation periods (1 day, 1 hour, or 5 minutes).

Members
period
Type: string

The aggregation period. This indicates the period during which an aggregation profile collects posted agent profiles for a profiling group. Use one of three valid durations that are specified using the ISO 8601 format.

  • P1D — 1 day

  • PT1H — 1 hour

  • PT5M — 5 minutes

start
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time that aggregation of posted agent profiles for a profiling group starts. The aggregation profile contains profiles posted by the agent starting at this time for an aggregation period specified by the period property of the AggregatedProfileTime object.

Specify start using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

Anomaly

Description

Details about an anomaly in a specific metric of application profile. The anomaly is detected using analysis of the metric data over a period of time.

Members
instances
Required: Yes
Type: Array of AnomalyInstance structures

A list of the instances of the detected anomalies during the requested period.

metric
Required: Yes
Type: Metric structure

Details about the metric that the analysis used when it detected the anomaly. The metric includes the name of the frame that was analyzed with the type and thread states used to derive the metric value for that frame.

reason
Required: Yes
Type: string

The reason for which metric was flagged as anomalous.

AnomalyInstance

Description

The specific duration in which the metric is flagged as anomalous.

Members
endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the period during which the metric is flagged as anomalous. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

id
Required: Yes
Type: string

The universally unique identifier (UUID) of an instance of an anomaly in a metric.

startTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the period during which the metric is flagged as anomalous. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

userFeedback
Type: UserFeedback structure

Feedback type on a specific instance of anomaly submitted by the user.

Channel

Description

Notification medium for users to get alerted for events that occur in application profile. We support SNS topic as a notification channel.

Members
eventPublishers
Required: Yes
Type: Array of strings

List of publishers for different type of events that may be detected in an application from the profile. Anomaly detection is the only event publisher in Profiler.

id
Type: string

Unique identifier for each Channel in the notification configuration of a Profiling Group. A random UUID for channelId is used when adding a channel to the notification configuration if not specified in the request.

uri
Required: Yes
Type: string

Unique arn of the resource to be used for notifications. We support a valid SNS topic arn as a channel uri.

ConflictException

Description

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

Members
message
Required: Yes
Type: string

FindingsReportSummary

Description

Information about potential recommendations that might be created from the analysis of profiling data.

Members
id
Type: string

The universally unique identifier (UUID) of the recommendation report.

profileEndTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the period during which the metric is flagged as anomalous. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

profileStartTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

profilingGroupName
Type: string

The name of the profiling group that is associated with the analysis data.

totalNumberOfFindings
Type: int

The total number of different recommendations that were found by the analysis.

FrameMetric

Description

The frame name, metric type, and thread states. These are used to derive the value of the metric for the frame.

Members
frameName
Required: Yes
Type: string

Name of the method common across the multiple occurrences of a frame in an application profile.

threadStates
Required: Yes
Type: Array of strings

List of application runtime thread states used to get the counts for a frame a derive a metric value.

type
Required: Yes
Type: string

A type of aggregation that specifies how a metric for a frame is analyzed. The supported value AggregatedRelativeTotalTime is an aggregation of the metric value for one frame that is calculated across the occurrences of all frames in a profile.

FrameMetricDatum

Description

Information about a frame metric and its values.

Members
frameMetric
Required: Yes
Type: FrameMetric structure

The frame name, metric type, and thread states. These are used to derive the value of the metric for the frame.

values
Required: Yes
Type: Array of doubles

A list of values that are associated with a frame metric.

InternalServerException

Description

The server encountered an internal error and is unable to complete the request.

Members
message
Required: Yes
Type: string

Match

Description

The part of a profile that contains a recommendation found during analysis.

Members
frameAddress
Type: string

The location in the profiling graph that contains a recommendation found during analysis.

targetFramesIndex
Type: int

The target frame that triggered a match.

thresholdBreachValue
Type: double

The value in the profile data that exceeded the recommendation threshold.

Metric

Description

Details about the metric that the analysis used when it detected the anomaly. The metric what is analyzed to create recommendations. It includes the name of the frame that was analyzed and the type and thread states used to derive the metric value for that frame.

Members
frameName
Required: Yes
Type: string

The name of the method that appears as a frame in any stack in a profile.

threadStates
Required: Yes
Type: Array of strings

The list of application runtime thread states that is used to calculate the metric value for the frame.

type
Required: Yes
Type: string

A type that specifies how a metric for a frame is analyzed. The supported value AggregatedRelativeTotalTime is an aggregation of the metric value for one frame that is calculated across the occurences of all frames in a profile.

NotificationConfiguration

Description

The configuration for notifications stored for each profiling group. This includes up to to two channels and a list of event publishers associated with each channel.

Members
channels
Type: Array of Channel structures

List of up to two channels to be used for sending notifications for events detected from the application profile.

Pattern

Description

A set of rules used to make a recommendation during an analysis.

Members
countersToAggregate
Type: Array of strings

A list of the different counters used to determine if there is a match.

description
Type: string

The description of the recommendation. This explains a potential inefficiency in a profiled application.

id
Type: string

The universally unique identifier (UUID) of this pattern.

name
Type: string

The name for this pattern.

resolutionSteps
Type: string

A string that contains the steps recommended to address the potential inefficiency.

targetFrames
Type: Array of stringss

A list of frame names that were searched during the analysis that generated a recommendation.

thresholdPercent
Type: double

The percentage of time an application spends in one method that triggers a recommendation. The percentage of time is the same as the percentage of the total gathered sample counts during analysis.

ProfileTime

Description

Contains the start time of a profile.

Members
start
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of a profile. It is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

ProfilingGroupDescription

Description

Contains information about a profiling group.

Members
agentOrchestrationConfig
Type: AgentOrchestrationConfig structure

An AgentOrchestrationConfig object that indicates if the profiling group is enabled for profiled or not.

arn
Type: string

The Amazon Resource Name (ARN) identifying the profiling group resource.

computePlatform
Type: string

The compute platform of the profiling group. If it is set to AWSLambda, then the profiled application runs on AWS Lambda. If it is set to Default, then the profiled application runs on a compute platform that is not AWS Lambda, such an Amazon EC2 instance, an on-premises server, or a different platform. The default is Default.

createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the profiling group was created. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

name
Type: string

The name of the profiling group.

profilingStatus
Type: ProfilingStatus structure

A ProfilingStatus object that includes information about the last time a profile agent pinged back, the last time a profile was received, and the aggregation period and start time for the most recent aggregated profile.

tags
Type: Associative array of custom strings keys (String) to strings

A list of the tags that belong to this profiling group.

updatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the profiling group was last updated. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

ProfilingStatus

Description

Profiling status includes information about the last time a profile agent pinged back, the last time a profile was received, and the aggregation period and start time for the most recent aggregated profile.

Members
latestAgentOrchestratedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the profiling agent most recently pinged back. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

latestAgentProfileReportedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the most recent profile was received. Specify using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

latestAggregatedProfile
Type: AggregatedProfileTime structure

An AggregatedProfileTime object that contains the aggregation period and start time for an aggregated profile.

Recommendation

Description

A potential improvement that was found from analyzing the profiling data.

Members
allMatchesCount
Required: Yes
Type: int

How many different places in the profile graph triggered a match.

allMatchesSum
Required: Yes
Type: double

How much of the total sample count is potentially affected.

endTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

End time of the profile that was used by this analysis. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

pattern
Required: Yes
Type: Pattern structure

The pattern that analysis recognized in the profile to make this recommendation.

startTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the profile that was used by this analysis. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

topMatches
Required: Yes
Type: Array of Match structures

List of the matches with most impact.

ResourceNotFoundException

Description

The resource specified in the request does not exist.

Members
message
Required: Yes
Type: string

ServiceQuotaExceededException

Description

You have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.

Members
message
Required: Yes
Type: string

ThrottlingException

Description

The request was denied due to request throttling.

Members
message
Required: Yes
Type: string

TimestampStructure

Description

A data type that contains a Timestamp object. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

Members
value
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

A Timestamp. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

UserFeedback

Description

Feedback that can be submitted for each instance of an anomaly by the user. Feedback is be used for improvements in generating recommendations for the application.

Members
type
Required: Yes
Type: string

Optional Positive or Negative feedback submitted by the user about whether the recommendation is useful or not.

ValidationException

Description

The parameter is not valid.

Members
message
Required: Yes
Type: string