Table of Contents
A low-level client representing Amazon CodeGuru Profiler:
import boto3
client = boto3.client('codeguruprofiler')
These are the available methods:
Check if an operation can be paginated.
See also: AWS API Documentation
Request Syntax
response = client.configure_agent(
fleetInstanceId='string',
profilingGroupName='string'
)
dict
Response Syntax
{
'configuration': {
'periodInSeconds': 123,
'shouldProfile': True|False
}
}
Response Structure
(dict) --
The structure representing the configureAgentResponse.
Exceptions
Creates a profiling group.
See also: AWS API Documentation
Request Syntax
response = client.create_profiling_group(
agentOrchestrationConfig={
'profilingEnabled': True|False
},
clientToken='string',
profilingGroupName='string'
)
The agent orchestration configuration.
[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.
[REQUIRED]
The name of the profiling group.
dict
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) --
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.
Exceptions
Deletes a profiling group.
See also: AWS API Documentation
Request Syntax
response = client.delete_profiling_group(
profilingGroupName='string'
)
[REQUIRED]
The profiling group name to delete.
{}
Response Structure
The structure representing the deleteProfilingGroupResponse.
Exceptions
Describes a profiling group.
See also: AWS API Documentation
Request Syntax
response = client.describe_profiling_group(
profilingGroupName='string'
)
[REQUIRED]
The profiling group name.
{
'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
The structure representing the describeProfilingGroupResponse.
Information about a profiling group.
The Amazon Resource Name (ARN) identifying the profiling group.
The time, in milliseconds since the epoch, when the profiling group was created.
The name of the profiling group.
The status of the profiling group.
The time, in milliseconds since the epoch, when the latest agent was orchestrated.
The time, in milliseconds since the epoch, when the latest agent was reported..
The latest aggregated profile
The time period.
The start time.
The time, in milliseconds since the epoch, when the profiling group was last updated.
Exceptions
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Gets the profiling group policy.
See also: AWS API Documentation
Request Syntax
response = client.get_policy(
profilingGroupName='string'
)
[REQUIRED]
The name of the profiling group.
{
'policy': 'string',
'revisionId': 'string'
}
Response Structure
The structure representing the getPolicyResponse.
The resource-based policy attached to the ProfilingGroup .
A unique identifier for the current revision of the policy.
Exceptions
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)
)
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 .
[REQUIRED]
The name of the profiling group to get.
The start time of the profile to get.
You must specify exactly two of the following parameters: startTime , period , and endTime .
dict
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.
Exceptions
Returns an object that can wait for some condition.
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)
)
[REQUIRED]
The end time of the time range from which to list the profiles.
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.
[REQUIRED]
The aggregation period.
[REQUIRED]
The name of the profiling group.
[REQUIRED]
The start time of the time range from which to list the profiles.
dict
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.
Exceptions
Lists profiling groups.
See also: AWS API Documentation
Request Syntax
response = client.list_profiling_groups(
includeDescription=True|False,
maxResults=123,
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.
dict
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.
profilingGroups (list) --
Information about profiling groups.
(dict) --
The description of a profiling group.
agentOrchestrationConfig (dict) --
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.
Exceptions
See also: AWS API Documentation
Request Syntax
response = client.post_agent_profile(
agentProfile=b'bytes'|file,
contentType='string',
profileToken='string',
profilingGroupName='string'
)
dict
Response Syntax
{}
Response Structure
(dict) --
The structure representing the postAgentProfileResponse.
Exceptions
Provides permission to the principals. This overwrites the existing permissions, and is not additive.
See also: AWS API Documentation
Request Syntax
response = client.put_permission(
actionGroup='agentPermissions',
principals=[
'string',
],
profilingGroupName='string',
revisionId='string'
)
[REQUIRED]
The list of actions that the users and roles can perform on the profiling group.
[REQUIRED]
The list of role and user ARNs or the accountId that needs access (wildcards are not allowed).
[REQUIRED]
The name of the profiling group.
dict
Response Syntax
{
'policy': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
The structure representing the putPermissionResponse.
policy (string) --
The resource-based policy.
revisionId (string) --
A unique identifier for the current revision of the policy.
Exceptions
Removes statement for the provided action group from the policy.
See also: AWS API Documentation
Request Syntax
response = client.remove_permission(
actionGroup='agentPermissions',
profilingGroupName='string',
revisionId='string'
)
[REQUIRED]
The list of actions that the users and roles can perform on the profiling group.
[REQUIRED]
The name of the profiling group.
[REQUIRED]
A unique identifier for the current revision of the policy.
dict
Response Syntax
{
'policy': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
The structure representing the removePermissionResponse.
policy (string) --
The resource-based policy.
revisionId (string) --
A unique identifier for the current revision of the policy.
Exceptions
Updates a profiling group.
See also: AWS API Documentation
Request Syntax
response = client.update_profiling_group(
agentOrchestrationConfig={
'profilingEnabled': True|False
},
profilingGroupName='string'
)
[REQUIRED]
[REQUIRED]
The name of the profiling group to update.
dict
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) --
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.
Exceptions
The available paginators are:
paginator = client.get_paginator('list_profile_times')
Creates an iterator that will paginate through responses from CodeGuruProfiler.Client.list_profile_times().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
endTime=datetime(2015, 1, 1),
orderBy='TimestampAscending'|'TimestampDescending',
period='P1D'|'PT1H'|'PT5M',
profilingGroupName='string',
startTime=datetime(2015, 1, 1),
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The end time of the time range from which to list the profiles.
[REQUIRED]
The aggregation period.
[REQUIRED]
The name of the profiling group.
[REQUIRED]
The start time of the time range from which to list the profiles.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'profileTimes': [
{
'start': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
The structure representing the listProfileTimesResponse.
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.
NextToken (string) --
A token to resume pagination.