CodeGuruProfiler

Table of Contents

Client

class CodeGuruProfiler.Client

A low-level client representing Amazon CodeGuru Profiler:

client = session.create_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)

See also: AWS API Documentation

Request Syntax

response = client.configure_agent(
    fleetInstanceId='string',
    profilingGroupName='string'
)
Parameters
  • fleetInstanceId (string) --
  • profilingGroupName (string) -- [REQUIRED]
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    The structure representing the configureAgentResponse.

    • configuration (dict) --
      • periodInSeconds (integer) --
      • shouldProfile (boolean) --

create_profiling_group(**kwargs)

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

    The agent orchestration configuration.

    • profilingEnabled (boolean) -- [REQUIRED]
  • clientToken (string) --

    [REQUIRED]

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    This parameter specifies a unique identifier for the new profiling group that helps ensure idempotency.

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

    The structure representing the createProfilingGroupResponse.

    • profilingGroup (dict) --

      Information about the new profiling group

      • agentOrchestrationConfig (dict) --

        • profilingEnabled (boolean) --
      • arn (string) --

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

      • createdAt (datetime) --

        The time, in milliseconds since the epoch, when the profiling group was created.

      • name (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        The status of the profiling group.

        • latestAgentOrchestratedAt (datetime) --

          The time, in milliseconds since the epoch, when the latest agent was orchestrated.

        • latestAgentProfileReportedAt (datetime) --

          The time, in milliseconds since the epoch, when the latest agent was reported..

        • latestAggregatedProfile (dict) --

          The latest aggregated profile

          • period (string) --

            The time period.

          • start (datetime) --

            The start time.

      • updatedAt (datetime) --

        The time, in milliseconds since the epoch, when the profiling group was last updated.

delete_profiling_group(**kwargs)

Deletes a profiling group.

See also: AWS API Documentation

Request Syntax

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

[REQUIRED]

The profiling group name to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

    The structure representing the deleteProfilingGroupResponse.

describe_profiling_group(**kwargs)

Describes a profiling group.

See also: AWS API Documentation

Request Syntax

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

[REQUIRED]

The profiling group name.

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

    The structure representing the describeProfilingGroupResponse.

    • profilingGroup (dict) --

      Information about a profiling group.

      • agentOrchestrationConfig (dict) --
        • profilingEnabled (boolean) --
      • arn (string) --

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

      • createdAt (datetime) --

        The time, in milliseconds since the epoch, when the profiling group was created.

      • name (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        The status of the profiling group.

        • latestAgentOrchestratedAt (datetime) --

          The time, in milliseconds since the epoch, when the latest agent was orchestrated.

        • latestAgentProfileReportedAt (datetime) --

          The time, in milliseconds since the epoch, when the latest agent was reported..

        • latestAggregatedProfile (dict) --

          The latest aggregated profile

          • period (string) --

            The time period.

          • start (datetime) --

            The start time.

      • updatedAt (datetime) --

        The time, in milliseconds since the epoch, 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)

Gets 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 is 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 example, if the requested time range is from 00:00 to 00:20 and the available profiles are from 00:15 to 00:25, the returned profile will be from 00:15 to 00:20.

You must specify exactly two of the following parameters: startTime , period , and endTime .

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. You can choose application/json or the default application/x-amzn-ion .
  • endTime (datetime) -- You must specify exactly two of the following parameters: startTime , period , and endTime .
  • maxDepth (integer) -- The maximum depth of the graph.
  • period (string) --

    The period of the profile to get. The time range must be in the past and not longer than one week.

    You must specify exactly two of the following parameters: startTime , period , and endTime .

  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group to get.

  • startTime (datetime) --

    The start time of the profile to get.

    You must specify exactly two of the following parameters: startTime , period , and endTime .

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    The structure representing the getProfileResponse.

    • contentEncoding (string) --

      The content encoding of the profile.

    • contentType (string) --

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

    • profile (StreamingBody) --

      Information about the profile.

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 from which to list the profiles.

  • maxResults (integer) -- 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 (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.

    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.

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

    [REQUIRED]

    The aggregation period.

  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group.

  • startTime (datetime) --

    [REQUIRED]

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

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    The structure representing the listProfileTimesResponse.

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

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

      • (dict) --

        Information about the profile time.

        • start (datetime) --

          The start time of the profile.

list_profiling_groups(**kwargs)

Lists profiling groups.

See also: AWS API Documentation

Request Syntax

response = client.list_profiling_groups(
    includeDescription=True|False,
    maxResults=123,
    nextToken='string'
)
Parameters
  • includeDescription (boolean) -- A Boolean value indicating whether to include a description.
  • maxResults (integer) -- 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 (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.

    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.

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

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

      Information about profiling group names.

      • (string) --
    • profilingGroups (list) --

      Information about profiling groups.

      • (dict) --

        The description of a profiling group.

        • agentOrchestrationConfig (dict) --

          • profilingEnabled (boolean) --
        • arn (string) --

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

        • createdAt (datetime) --

          The time, in milliseconds since the epoch, when the profiling group was created.

        • name (string) --

          The name of the profiling group.

        • profilingStatus (dict) --

          The status of the profiling group.

          • latestAgentOrchestratedAt (datetime) --

            The time, in milliseconds since the epoch, when the latest agent was orchestrated.

          • latestAgentProfileReportedAt (datetime) --

            The time, in milliseconds since the epoch, when the latest agent was reported..

          • latestAggregatedProfile (dict) --

            The latest aggregated profile

            • period (string) --

              The time period.

            • start (datetime) --

              The start time.

        • updatedAt (datetime) --

          The time, in milliseconds since the epoch, when the profiling group was last updated.

post_agent_profile(**kwargs)

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]
  • contentType (string) -- [REQUIRED]
  • profileToken (string) -- This field is autopopulated if not provided.
  • profilingGroupName (string) -- [REQUIRED]
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

    The structure representing the postAgentProfileResponse.

update_profiling_group(**kwargs)

Updates 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]

    • profilingEnabled (boolean) -- [REQUIRED]
  • profilingGroupName (string) --

    [REQUIRED]

    The name of the profiling group to update.

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

    The structure representing the updateProfilingGroupResponse.

    • profilingGroup (dict) --

      Updated information about the profiling group.

      • agentOrchestrationConfig (dict) --

        • profilingEnabled (boolean) --
      • arn (string) --

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

      • createdAt (datetime) --

        The time, in milliseconds since the epoch, when the profiling group was created.

      • name (string) --

        The name of the profiling group.

      • profilingStatus (dict) --

        The status of the profiling group.

        • latestAgentOrchestratedAt (datetime) --

          The time, in milliseconds since the epoch, when the latest agent was orchestrated.

        • latestAgentProfileReportedAt (datetime) --

          The time, in milliseconds since the epoch, when the latest agent was reported..

        • latestAggregatedProfile (dict) --

          The latest aggregated profile

          • period (string) --

            The time period.

          • start (datetime) --

            The start time.

      • updatedAt (datetime) --

        The time, in milliseconds since the epoch, when the profiling group was last updated.

Paginators

The available paginators are: