Amazon CodeGuru Profiler

2020/06/29 - Amazon CodeGuru Profiler - 8 new 5 updated api methods

Changes  Amazon CodeGuru Profiler is now generally available. The Profiler helps developers to optimize their software, troubleshoot issues in production, and identify their most expensive lines of code. As part of general availability, we are launching: Profiling of AWS Lambda functions, Anomaly detection in CPU profiles, Color My Code on flame graphs, Expanding presence to 10 AWS regions.

RemoveNotificationChannel (new) Link ¶

Remove one anomaly notifications channel for a profiling group.

See also: AWS API Documentation

Request Syntax

client.remove_notification_channel(
    channelId='string',
    profilingGroupName='string'
)
type channelId

string

param channelId

[REQUIRED]

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

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'notificationConfiguration': {
        'channels': [
            {
                'eventPublishers': [
                    'AnomalyDetection',
                ],
                'id': 'string',
                'uri': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    The structure representing the RemoveNotificationChannelResponse.

    • notificationConfiguration (dict) --

      The new notification configuration for this profiling group.

      • channels (list) --

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

        • (dict) --

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

          • eventPublishers (list) --

            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.

            • (string) --

          • id (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 (string) --

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

AddNotificationChannels (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.add_notification_channels(
    channels=[
        {
            'eventPublishers': [
                'AnomalyDetection',
            ],
            'id': 'string',
            'uri': 'string'
        },
    ],
    profilingGroupName='string'
)
type channels

list

param channels

[REQUIRED]

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

  • (dict) --

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

    • eventPublishers (list) -- [REQUIRED]

      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.

      • (string) --

    • id (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 (string) -- [REQUIRED]

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

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'notificationConfiguration': {
        'channels': [
            {
                'eventPublishers': [
                    'AnomalyDetection',
                ],
                'id': 'string',
                'uri': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    The structure representing the AddNotificationChannelsResponse.

    • notificationConfiguration (dict) --

      The new notification configuration for this profiling group.

      • channels (list) --

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

        • (dict) --

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

          • eventPublishers (list) --

            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.

            • (string) --

          • id (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 (string) --

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

ListFindingsReports (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.list_findings_reports(
    dailyReportsOnly=True|False,
    endTime=datetime(2015, 1, 1),
    maxResults=123,
    nextToken='string',
    profilingGroupName='string',
    startTime=datetime(2015, 1, 1)
)
type dailyReportsOnly

boolean

param dailyReportsOnly

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).

type endTime

datetime

param endTime

[REQUIRED]

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.

type maxResults

integer

param maxResults

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.

type nextToken

string

param nextToken

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.

Note

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.

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

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

type startTime

datetime

param startTime

[REQUIRED]

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.

rtype

dict

returns

Response Syntax

{
    'findingsReportSummaries': [
        {
            'id': 'string',
            'profileEndTime': datetime(2015, 1, 1),
            'profileStartTime': datetime(2015, 1, 1),
            'profilingGroupName': 'string',
            'totalNumberOfFindings': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The structure representing the ListFindingsReportsResponse.

    • findingsReportSummaries (list) --

      The list of analysis results summaries.

      • (dict) --

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

        • id (string) --

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

        • profileEndTime (datetime) --

          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 (datetime) --

          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 (string) --

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

        • totalNumberOfFindings (integer) --

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

    • nextToken (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.

SubmitFeedback (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.submit_feedback(
    anomalyInstanceId='string',
    comment='string',
    profilingGroupName='string',
    type='Negative'|'Positive'
)
type anomalyInstanceId

string

param anomalyInstanceId

[REQUIRED]

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

type comment

string

param comment

Optional feedback about this anomaly.

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

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

type type

string

param type

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    The structure representing the SubmitFeedbackResponse.

GetFindingsReportAccountSummary (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.get_findings_report_account_summary(
    dailyReportsOnly=True|False,
    maxResults=123,
    nextToken='string'
)
type dailyReportsOnly

boolean

param dailyReportsOnly

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).

type maxResults

integer

param maxResults

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.

type nextToken

string

param nextToken

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.

Note

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.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'reportSummaries': [
        {
            'id': 'string',
            'profileEndTime': datetime(2015, 1, 1),
            'profileStartTime': datetime(2015, 1, 1),
            'profilingGroupName': 'string',
            'totalNumberOfFindings': 123
        },
    ]
}

Response Structure

  • (dict) --

    The structure representing the GetFindingsReportAccountSummaryResponse.

    • nextToken (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 (list) --

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

      • (dict) --

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

        • id (string) --

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

        • profileEndTime (datetime) --

          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 (datetime) --

          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 (string) --

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

        • totalNumberOfFindings (integer) --

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

BatchGetFrameMetricData (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.batch_get_frame_metric_data(
    endTime=datetime(2015, 1, 1),
    frameMetrics=[
        {
            'frameName': 'string',
            'threadStates': [
                'string',
            ],
            'type': 'AggregatedRelativeTotalTime'
        },
    ],
    period='string',
    profilingGroupName='string',
    startTime=datetime(2015, 1, 1),
    targetResolution='P1D'|'PT1H'|'PT5M'
)
type endTime

datetime

param endTime

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.

type frameMetrics

list

param frameMetrics

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.

  • (dict) --

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

    • frameName (string) -- [REQUIRED]

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

    • threadStates (list) -- [REQUIRED]

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

      • (string) --

    • type (string) -- [REQUIRED]

      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.

type period

string

param period

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 ).

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

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

type startTime

datetime

param startTime

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.

type targetResolution

string

param targetResolution

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

rtype

dict

returns

Response Syntax

{
    'endTime': datetime(2015, 1, 1),
    'endTimes': [
        {
            'value': datetime(2015, 1, 1)
        },
    ],
    'frameMetricData': [
        {
            'frameMetric': {
                'frameName': 'string',
                'threadStates': [
                    'string',
                ],
                'type': 'AggregatedRelativeTotalTime'
            },
            'values': [
                123.0,
            ]
        },
    ],
    'resolution': 'P1D'|'PT1H'|'PT5M',
    'startTime': datetime(2015, 1, 1),
    'unprocessedEndTimes': {
        'string': [
            {
                'value': datetime(2015, 1, 1)
            },
        ]
    }
}

Response Structure

  • (dict) --

    The structure representing the BatchGetFrameMetricDataResponse.

    • endTime (datetime) --

      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 (list) --

      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.

      • (dict) --

        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.

        • value (datetime) --

          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.

    • frameMetricData (list) --

      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.

      • (dict) --

        Information about a frame metric and its values.

        • frameMetric (dict) --

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

          • frameName (string) --

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

          • threadStates (list) --

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

            • (string) --

          • 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.

        • values (list) --

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

          • (float) --

    • resolution (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 (datetime) --

      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 (dict) --

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

      • (string) --

        • (list) --

          • (dict) --

            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.

            • value (datetime) --

              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.

GetRecommendations (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.get_recommendations(
    endTime=datetime(2015, 1, 1),
    locale='string',
    profilingGroupName='string',
    startTime=datetime(2015, 1, 1)
)
type endTime

datetime

param endTime

[REQUIRED]

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.

type locale

string

param locale

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

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

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

type startTime

datetime

param startTime

[REQUIRED]

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.

rtype

dict

returns

Response Syntax

{
    'anomalies': [
        {
            'instances': [
                {
                    'endTime': datetime(2015, 1, 1),
                    'id': 'string',
                    'startTime': datetime(2015, 1, 1),
                    'userFeedback': {
                        'type': 'Negative'|'Positive'
                    }
                },
            ],
            'metric': {
                'frameName': 'string',
                'threadStates': [
                    'string',
                ],
                'type': 'AggregatedRelativeTotalTime'
            },
            'reason': 'string'
        },
    ],
    'profileEndTime': datetime(2015, 1, 1),
    'profileStartTime': datetime(2015, 1, 1),
    'profilingGroupName': 'string',
    'recommendations': [
        {
            'allMatchesCount': 123,
            'allMatchesSum': 123.0,
            'endTime': datetime(2015, 1, 1),
            'pattern': {
                'countersToAggregate': [
                    'string',
                ],
                'description': 'string',
                'id': 'string',
                'name': 'string',
                'resolutionSteps': 'string',
                'targetFrames': [
                    [
                        'string',
                    ],
                ],
                'thresholdPercent': 123.0
            },
            'startTime': datetime(2015, 1, 1),
            'topMatches': [
                {
                    'frameAddress': 'string',
                    'targetFramesIndex': 123,
                    'thresholdBreachValue': 123.0
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    The structure representing the GetRecommendationsResponse.

    • anomalies (list) --

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

      • (dict) --

        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.

        • instances (list) --

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

          • (dict) --

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

            • endTime (datetime) --

              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 (string) --

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

            • startTime (datetime) --

              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 (dict) --

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

              • type (string) --

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

        • metric (dict) --

          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.

          • frameName (string) --

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

          • threadStates (list) --

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

            • (string) --

          • 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.

        • reason (string) --

          The reason for which metric was flagged as anomalous.

    • profileEndTime (datetime) --

      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 (datetime) --

      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 (string) --

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

    • recommendations (list) --

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

      • (dict) --

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

        • allMatchesCount (integer) --

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

        • allMatchesSum (float) --

          How much of the total sample count is potentially affected.

        • endTime (datetime) --

          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 (dict) --

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

          • countersToAggregate (list) --

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

            • (string) --

          • description (string) --

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

          • id (string) --

            The universally unique identifier (UUID) of this pattern.

          • name (string) --

            The name for this pattern.

          • resolutionSteps (string) --

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

          • targetFrames (list) --

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

            • (list) --

              • (string) --

          • thresholdPercent (float) --

            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.

        • startTime (datetime) --

          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 (list) --

          List of the matches with most impact.

          • (dict) --

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

            • frameAddress (string) --

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

            • targetFramesIndex (integer) --

              The target frame that triggered a match.

            • thresholdBreachValue (float) --

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

GetNotificationConfiguration (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.get_notification_configuration(
    profilingGroupName='string'
)
type profilingGroupName

string

param profilingGroupName

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'notificationConfiguration': {
        'channels': [
            {
                'eventPublishers': [
                    'AnomalyDetection',
                ],
                'id': 'string',
                'uri': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    The structure representing the GetNotificationConfigurationResponse.

    • notificationConfiguration (dict) --

      The current notification configuration for this profiling group.

      • channels (list) --

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

        • (dict) --

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

          • eventPublishers (list) --

            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.

            • (string) --

          • id (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 (string) --

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

ConfigureAgent (updated) Link ¶
Changes (request, response)
Request
{'metadata': {'AgentId | AwsRequestId | ComputePlatform | ExecutionEnvironment | LambdaFunctionArn | LambdaMemoryLimitInMB | LambdaPreviousExecutionTimeInMilliseconds | LambdaRemainingTimeInMilliseconds | LambdaTimeGapBetweenInvokesInMilliseconds': 'string'}}
Response
{'configuration': {'agentParameters': {'MaxStackDepth | MemoryUsageLimitPercent | MinimumTimeForReportingInMilliseconds | ReportingIntervalInMilliseconds | SamplingIntervalInMilliseconds': 'string'}}}

Used by profiler agents to report their current state and to receive remote configuration updates. For example, ConfigureAgent can be used to tell and agent whether to profile or not and for how long to return profiling data.

See also: AWS API Documentation

Request Syntax

client.configure_agent(
    fleetInstanceId='string',
    metadata={
        'string': 'string'
    },
    profilingGroupName='string'
)
type fleetInstanceId

string

param fleetInstanceId

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.

type metadata

dict

param metadata

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.

  • (string) --

    • (string) --

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'configuration': {
        'agentParameters': {
            'string': 'string'
        },
        'periodInSeconds': 123,
        'shouldProfile': True|False
    }
}

Response Structure

  • (dict) --

    The structure representing the configureAgentResponse.

    • configuration (dict) --

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

      • agentParameters (dict) --

        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.

        • (string) --

          • (string) --

      • periodInSeconds (integer) --

        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 (boolean) --

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

CreateProfilingGroup (updated) Link ¶
Changes (request, response)
Request
{'computePlatform': 'AWSLambda | Default'}
Response
{'profilingGroup': {'computePlatform': 'AWSLambda | Default'}}

Creates a profiling group.

See also: AWS API Documentation

Request Syntax

client.create_profiling_group(
    agentOrchestrationConfig={
        'profilingEnabled': True|False
    },
    clientToken='string',
    computePlatform='AWSLambda'|'Default',
    profilingGroupName='string'
)
type agentOrchestrationConfig

dict

param agentOrchestrationConfig

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

  • profilingEnabled (boolean) -- [REQUIRED]

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

type clientToken

string

param clientToken

[REQUIRED]

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

This field is autopopulated if not provided.

type computePlatform

string

param computePlatform

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.

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

The name of the profiling group to create.

rtype

dict

returns

Response Syntax

{
    'profilingGroup': {
        'agentOrchestrationConfig': {
            'profilingEnabled': True|False
        },
        'arn': 'string',
        'computePlatform': 'AWSLambda'|'Default',
        'createdAt': datetime(2015, 1, 1),
        'name': 'string',
        'profilingStatus': {
            'latestAgentOrchestratedAt': datetime(2015, 1, 1),
            'latestAgentProfileReportedAt': datetime(2015, 1, 1),
            'latestAggregatedProfile': {
                'period': 'P1D'|'PT1H'|'PT5M',
                'start': datetime(2015, 1, 1)
            }
        },
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    The structure representing the createProfilingGroupResponse.

    • profilingGroup (dict) --

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

      • agentOrchestrationConfig (dict) --

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

        • profilingEnabled (boolean) --

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

      • arn (string) --

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

      • computePlatform (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 (datetime) --

        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 (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        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.

        • latestAgentOrchestratedAt (datetime) --

          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 (datetime) --

          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 (dict) --

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

          • period (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 (datetime) --

            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.

      • updatedAt (datetime) --

        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.

DescribeProfilingGroup (updated) Link ¶
Changes (response)
{'profilingGroup': {'computePlatform': 'AWSLambda | Default'}}

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

See also: AWS API Documentation

Request Syntax

client.describe_profiling_group(
    profilingGroupName='string'
)
type profilingGroupName

string

param profilingGroupName

[REQUIRED]

The name of the profiling group to get information about.

rtype

dict

returns

Response Syntax

{
    'profilingGroup': {
        'agentOrchestrationConfig': {
            'profilingEnabled': True|False
        },
        'arn': 'string',
        'computePlatform': 'AWSLambda'|'Default',
        'createdAt': datetime(2015, 1, 1),
        'name': 'string',
        'profilingStatus': {
            'latestAgentOrchestratedAt': datetime(2015, 1, 1),
            'latestAgentProfileReportedAt': datetime(2015, 1, 1),
            'latestAggregatedProfile': {
                'period': 'P1D'|'PT1H'|'PT5M',
                'start': datetime(2015, 1, 1)
            }
        },
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    The structure representing the describeProfilingGroupResponse.

    • profilingGroup (dict) --

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

      • agentOrchestrationConfig (dict) --

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

        • profilingEnabled (boolean) --

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

      • arn (string) --

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

      • computePlatform (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 (datetime) --

        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 (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        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.

        • latestAgentOrchestratedAt (datetime) --

          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 (datetime) --

          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 (dict) --

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

          • period (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 (datetime) --

            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.

      • updatedAt (datetime) --

        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.

ListProfilingGroups (updated) Link ¶
Changes (response)
{'profilingGroups': {'computePlatform': 'AWSLambda | Default'}}

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

See also: AWS API Documentation

Request Syntax

client.list_profiling_groups(
    includeDescription=True|False,
    maxResults=123,
    nextToken='string'
)
type includeDescription

boolean

param includeDescription

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.

type maxResults

integer

param maxResults

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.

type nextToken

string

param nextToken

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.

Note

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.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'profilingGroupNames': [
        'string',
    ],
    'profilingGroups': [
        {
            'agentOrchestrationConfig': {
                'profilingEnabled': True|False
            },
            'arn': 'string',
            'computePlatform': 'AWSLambda'|'Default',
            'createdAt': datetime(2015, 1, 1),
            'name': 'string',
            'profilingStatus': {
                'latestAgentOrchestratedAt': datetime(2015, 1, 1),
                'latestAgentProfileReportedAt': datetime(2015, 1, 1),
                'latestAggregatedProfile': {
                    'period': 'P1D'|'PT1H'|'PT5M',
                    'start': datetime(2015, 1, 1)
                }
            },
            'updatedAt': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    The structure representing the listProfilingGroupsResponse.

    • nextToken (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 (list) --

      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.

      • (string) --

    • profilingGroups (list) --

      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.

      • (dict) --

        Contains information about a profiling group.

        • agentOrchestrationConfig (dict) --

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

          • profilingEnabled (boolean) --

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

        • arn (string) --

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

        • computePlatform (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 (datetime) --

          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 (string) --

          The name of the profiling group.

        • profilingStatus (dict) --

          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.

          • latestAgentOrchestratedAt (datetime) --

            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 (datetime) --

            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 (dict) --

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

            • period (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 (datetime) --

              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.

        • updatedAt (datetime) --

          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.

UpdateProfilingGroup (updated) Link ¶
Changes (response)
{'profilingGroup': {'computePlatform': 'AWSLambda | Default'}}

Updates a profiling group.

See also: AWS API Documentation

Request Syntax

client.update_profiling_group(
    agentOrchestrationConfig={
        'profilingEnabled': True|False
    },
    profilingGroupName='string'
)
type agentOrchestrationConfig

dict

param agentOrchestrationConfig

[REQUIRED]

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

  • profilingEnabled (boolean) -- [REQUIRED]

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

type profilingGroupName

string

param profilingGroupName

[REQUIRED]

The name of the profiling group to update.

rtype

dict

returns

Response Syntax

{
    'profilingGroup': {
        'agentOrchestrationConfig': {
            'profilingEnabled': True|False
        },
        'arn': 'string',
        'computePlatform': 'AWSLambda'|'Default',
        'createdAt': datetime(2015, 1, 1),
        'name': 'string',
        'profilingStatus': {
            'latestAgentOrchestratedAt': datetime(2015, 1, 1),
            'latestAgentProfileReportedAt': datetime(2015, 1, 1),
            'latestAggregatedProfile': {
                'period': 'P1D'|'PT1H'|'PT5M',
                'start': datetime(2015, 1, 1)
            }
        },
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    The structure representing the updateProfilingGroupResponse.

    • profilingGroup (dict) --

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

      • agentOrchestrationConfig (dict) --

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

        • profilingEnabled (boolean) --

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

      • arn (string) --

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

      • computePlatform (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 (datetime) --

        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 (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        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.

        • latestAgentOrchestratedAt (datetime) --

          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 (datetime) --

          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 (dict) --

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

          • period (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 (datetime) --

            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.

      • updatedAt (datetime) --

        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.