CodeGuruProfiler

Table of Contents

Client

class CodeGuruProfiler.Client

A low-level client representing Amazon CodeGuru Profiler:

import boto3

client = boto3.client('codeguruprofiler')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
configure_agent(**kwargs)

Provides the configuration to use for an agent of the profiling group.

See also: AWS API Documentation

Request Syntax

response = client.configure_agent(
    fleetInstanceId='string',
    profilingGroupName='string'
)
Parameters
  • fleetInstanceId (string) -- Identifier of the instance of compute fleet being profiled by the agent. For instance, host name in EC2, task id for ECS, function name for AWS Lambda
  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    Response for ConfigureAgent operation.

    • configuration (dict) --

      The configuration for the agent to use.

      • periodInSeconds (integer) --

        Specifies the period to follow the configuration (to profile or not) and call back to get a new configuration.

      • shouldProfile (boolean) --

        Specifies if the profiling should be enabled by the agent.

create_profiling_group(**kwargs)

Create a profiling group.

See also: AWS API Documentation

Request Syntax

response = client.create_profiling_group(
    agentOrchestrationConfig={
        'profilingEnabled': True|False
    },
    clientToken='string',
    profilingGroupName='string'
)
Parameters
  • agentOrchestrationConfig (dict) --

    Configuration to orchestrate agents to create and report agent profiles of the profiling group. Agents are orchestrated if they follow the agent orchestration protocol.

    • profilingEnabled (boolean) -- [REQUIRED]

      If the agents should be enabled to create and report profiles.

  • clientToken (string) --

    [REQUIRED]

    Client token for the request.

    This field is autopopulated if not provided.

  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group.

Return type

dict

Returns

Response Syntax

{
    'profilingGroup': {
        'agentOrchestrationConfig': {
            'profilingEnabled': True|False
        },
        'arn': 'string',
        '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) --

    Response for CreateProfilingGroup operation.

    • profilingGroup (dict) --

      The description of a profiling group.

      • agentOrchestrationConfig (dict) --

        Configuration to orchestrate agents to create and report agent profiles of the profiling group. Agents are orchestrated if they follow the agent orchestration protocol.

        • profilingEnabled (boolean) --

          If the agents should be enabled to create and report profiles.

      • arn (string) --

        The ARN of the profiling group.

      • createdAt (datetime) --

        The timestamp of when the profiling group was created.

      • name (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        The status of profiling of a profiling group.

        • latestAgentOrchestratedAt (datetime) --

          Timestamp of when the last interaction of the agent with configureAgent API for orchestration.

        • latestAgentProfileReportedAt (datetime) --

          Timestamp of when the latest agent profile was successfully reported.

        • latestAggregatedProfile (dict) --

          The time range of latest aggregated profile available.

          • period (string) --

            The aggregation period of the aggregated profile.

          • start (datetime) --

            The start time of the aggregated profile.

      • updatedAt (datetime) --

        The timestamp of when the profiling group was last updated.

delete_profiling_group(**kwargs)

Delete a profiling group.

See also: AWS API Documentation

Request Syntax

response = client.delete_profiling_group(
    profilingGroupName='string'
)
Parameters
profilingGroupName (string) --

[REQUIRED]

The name of the profiling group.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

    Response for DeleteProfilingGroup operation.

describe_profiling_group(**kwargs)

Describe a profiling group.

See also: AWS API Documentation

Request Syntax

response = client.describe_profiling_group(
    profilingGroupName='string'
)
Parameters
profilingGroupName (string) --

[REQUIRED]

The name of the profiling group.

Return type
dict
Returns
Response Syntax
{
    'profilingGroup': {
        'agentOrchestrationConfig': {
            'profilingEnabled': True|False
        },
        'arn': 'string',
        '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) --

    Response for DescribeProfilingGroup operation.

    • profilingGroup (dict) --

      The description of a profiling group.

      • agentOrchestrationConfig (dict) --

        Configuration to orchestrate agents to create and report agent profiles of the profiling group. Agents are orchestrated if they follow the agent orchestration protocol.

        • profilingEnabled (boolean) --

          If the agents should be enabled to create and report profiles.

      • arn (string) --

        The ARN of the profiling group.

      • createdAt (datetime) --

        The timestamp of when the profiling group was created.

      • name (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        The status of profiling of a profiling group.

        • latestAgentOrchestratedAt (datetime) --

          Timestamp of when the last interaction of the agent with configureAgent API for orchestration.

        • latestAgentProfileReportedAt (datetime) --

          Timestamp of when the latest agent profile was successfully reported.

        • latestAggregatedProfile (dict) --

          The time range of latest aggregated profile available.

          • period (string) --

            The aggregation period of the aggregated profile.

          • start (datetime) --

            The start time of the aggregated profile.

      • updatedAt (datetime) --

        The timestamp of when the profiling group was last updated.

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_profile(**kwargs)

Get the aggregated profile of a profiling group for the specified time range. If the requested time range does not align with the available aggregated profiles, it will be expanded to attain alignment. If aggregated profiles are available only for part of the period requested, the profile is returned from the earliest available to the latest within the requested time range. For instance, if the requested time range is from 00:00 to 00:20 and the available profiles are from 00:15 to 00:25, then the returned profile will be from 00:15 to 00:20.

See also: AWS API Documentation

Request Syntax

response = client.get_profile(
    accept='string',
    endTime=datetime(2015, 1, 1),
    maxDepth=123,
    period='string',
    profilingGroupName='string',
    startTime=datetime(2015, 1, 1)
)
Parameters
  • accept (string) -- The format of the profile to return. Supports application/json or application/x-amzn-ion. Defaults to application/x-amzn-ion.
  • endTime (datetime) -- The end time of the profile to get. Either period or endTime must be specified. Must be greater than start and the overall time range to be in the past and not larger than a week.
  • maxDepth (integer) -- Limit the max depth of the profile.
  • period (string) -- The period of the profile to get. Exactly two of startTime , period and endTime must be specified. Must be positive and the overall time range to be in the past and not larger than a week.
  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group.

  • startTime (datetime) -- The start time of the profile to get.
Return type

dict

Returns

Response Syntax

{
    'contentEncoding': 'string',
    'contentType': 'string',
    'profile': StreamingBody()
}

Response Structure

  • (dict) --

    Response for GetProfile operation.

    • contentEncoding (string) --

      The content encoding of the profile in the payload.

    • contentType (string) --

      The content type of the profile in the payload. Will be application/json or application/x-amzn-ion based on Accept header in the request.

    • profile (StreamingBody) --

      The profile representing the aggregation of agent profiles of the profiling group for a time range.

get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_profile_times(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.list_profile_times(
    endTime=datetime(2015, 1, 1),
    maxResults=123,
    nextToken='string',
    orderBy='TimestampAscending'|'TimestampDescending',
    period='P1D'|'PT1H'|'PT5M',
    profilingGroupName='string',
    startTime=datetime(2015, 1, 1)
)
Parameters
  • endTime (datetime) --

    [REQUIRED]

    The end time of the time range to list profiles until.

  • maxResults (integer) -- Upper bound on the number of results to list in a single call.
  • nextToken (string) -- Token for paginating results.
  • orderBy (string) -- The order (ascending or descending by start time of the profile) to list the profiles by. Defaults to TIMESTAMP_DESCENDING.
  • period (string) --

    [REQUIRED]

    The aggregation period to list the profiles for.

  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group.

  • startTime (datetime) --

    [REQUIRED]

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

Return type

dict

Returns

Response Syntax

{
    'nextToken': 'string',
    'profileTimes': [
        {
            'start': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Response for ListProfileTimes operation.

    • nextToken (string) --

      Token for paginating results.

    • profileTimes (list) --

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

      • (dict) --

        Periods of time used for aggregation of profiles, represented using ISO 8601 format.

        • start (datetime) --

          The start time of the profile.

list_profiling_groups(**kwargs)

List profiling groups in the account.

See also: AWS API Documentation

Request Syntax

response = client.list_profiling_groups(
    includeDescription=True|False,
    maxResults=123,
    nextToken='string'
)
Parameters
  • includeDescription (boolean) -- If set to true, returns the full description of the profiling groups instead of the names. Defaults to false.
  • maxResults (integer) -- Upper bound on the number of results to list in a single call.
  • nextToken (string) -- Token for paginating results.
Return type

dict

Returns

Response Syntax

{
    'nextToken': 'string',
    'profilingGroupNames': [
        'string',
    ],
    'profilingGroups': [
        {
            'agentOrchestrationConfig': {
                'profilingEnabled': True|False
            },
            'arn': 'string',
            '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) --

    Response for ListProfilingGroups operation.

    • nextToken (string) --

      Token for paginating results.

    • profilingGroupNames (list) --

      List of profiling group names.

      • (string) --

        The name of the profiling group.

    • profilingGroups (list) --

      List of profiling group descriptions.

      • (dict) --

        The description of a profiling group.

        • agentOrchestrationConfig (dict) --

          Configuration to orchestrate agents to create and report agent profiles of the profiling group. Agents are orchestrated if they follow the agent orchestration protocol.

          • profilingEnabled (boolean) --

            If the agents should be enabled to create and report profiles.

        • arn (string) --

          The ARN of the profiling group.

        • createdAt (datetime) --

          The timestamp of when the profiling group was created.

        • name (string) --

          The name of the profiling group.

        • profilingStatus (dict) --

          The status of profiling of a profiling group.

          • latestAgentOrchestratedAt (datetime) --

            Timestamp of when the last interaction of the agent with configureAgent API for orchestration.

          • latestAgentProfileReportedAt (datetime) --

            Timestamp of when the latest agent profile was successfully reported.

          • latestAggregatedProfile (dict) --

            The time range of latest aggregated profile available.

            • period (string) --

              The aggregation period of the aggregated profile.

            • start (datetime) --

              The start time of the aggregated profile.

        • updatedAt (datetime) --

          The timestamp of when the profiling group was last updated.

post_agent_profile(**kwargs)

Submit profile collected by an agent belonging to a profiling group for aggregation.

See also: AWS API Documentation

Request Syntax

response = client.post_agent_profile(
    agentProfile=b'bytes'|file,
    contentType='string',
    profileToken='string',
    profilingGroupName='string'
)
Parameters
  • agentProfile (bytes or seekable file-like object) --

    [REQUIRED]

    The profile collected by an agent for a time range.

  • contentType (string) --

    [REQUIRED]

    The content type of the agent profile in the payload. Recommended to send the profile gzipped with content-type application/octet-stream. Other accepted values are application/x-amzn-ion and application/json for unzipped Ion and JSON respectively.

  • profileToken (string) --

    Client generated token to deduplicate the agent profile during aggregation.

    This field is autopopulated if not provided.

  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

    Response for PostAgentProfile operation.

update_profiling_group(**kwargs)

Update a profiling group.

See also: AWS API Documentation

Request Syntax

response = client.update_profiling_group(
    agentOrchestrationConfig={
        'profilingEnabled': True|False
    },
    profilingGroupName='string'
)
Parameters
  • agentOrchestrationConfig (dict) --

    [REQUIRED]

    Remote configuration to configure the agents of the profiling group.

    • profilingEnabled (boolean) -- [REQUIRED]

      If the agents should be enabled to create and report profiles.

  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group.

Return type

dict

Returns

Response Syntax

{
    'profilingGroup': {
        'agentOrchestrationConfig': {
            'profilingEnabled': True|False
        },
        'arn': 'string',
        '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) --

    Response for UpdateProfilingGroup operation.

    • profilingGroup (dict) --

      The description of a profiling group.

      • agentOrchestrationConfig (dict) --

        Configuration to orchestrate agents to create and report agent profiles of the profiling group. Agents are orchestrated if they follow the agent orchestration protocol.

        • profilingEnabled (boolean) --

          If the agents should be enabled to create and report profiles.

      • arn (string) --

        The ARN of the profiling group.

      • createdAt (datetime) --

        The timestamp of when the profiling group was created.

      • name (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        The status of profiling of a profiling group.

        • latestAgentOrchestratedAt (datetime) --

          Timestamp of when the last interaction of the agent with configureAgent API for orchestration.

        • latestAgentProfileReportedAt (datetime) --

          Timestamp of when the latest agent profile was successfully reported.

        • latestAggregatedProfile (dict) --

          The time range of latest aggregated profile available.

          • period (string) --

            The aggregation period of the aggregated profile.

          • start (datetime) --

            The start time of the aggregated profile.

      • updatedAt (datetime) --

        The timestamp of when the profiling group was last updated.

Paginators

The available paginators are: