2019/12/03 - Amazon CodeGuru Profiler - 9 new api methods
Changes (New Service) Amazon CodeGuru Profiler analyzes application CPU utilization and latency characteristics to show you where you are spending the most cycles in your application. This analysis is presented in an interactive flame graph that helps you easily understand which paths consume the most resources, verify that your application is performing as expected, and uncover areas that can be optimized further.
Provides the configuration to use for an agent of the profiling group.
See also: AWS API Documentation
Request Syntax
client.configure_agent( fleetInstanceId='string', profilingGroupName='string' )
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
string
[REQUIRED]
The name of the profiling group.
dict
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.
List profiling groups in the account.
See also: AWS API Documentation
Request Syntax
client.list_profiling_groups( includeDescription=True|False, maxResults=123, nextToken='string' )
boolean
If set to true, returns the full description of the profiling groups instead of the names. Defaults to false.
integer
Upper bound on the number of results to list in a single call.
string
Token for paginating results.
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) --
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.
Update a profiling group.
See also: AWS API Documentation
Request Syntax
client.update_profiling_group( agentOrchestrationConfig={ 'profilingEnabled': True|False }, profilingGroupName='string' )
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.
string
[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) --
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.
Delete a profiling group.
See also: AWS API Documentation
Request Syntax
client.delete_profiling_group( profilingGroupName='string' )
string
[REQUIRED]
The name of the profiling group.
dict
Response Syntax
{}
Response Structure
(dict) --
Response for DeleteProfilingGroup operation.
Submit profile collected by an agent belonging to a profiling group for aggregation.
See also: AWS API Documentation
Request Syntax
client.post_agent_profile( agentProfile=b'bytes'|file, contentType='string', profileToken='string', profilingGroupName='string' )
bytes or seekable file-like object
[REQUIRED]
The profile collected by an agent for a time range.
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.
string
Client generated token to deduplicate the agent profile during aggregation.
This field is autopopulated if not provided.
string
[REQUIRED]
The name of the profiling group.
dict
Response Syntax
{}
Response Structure
(dict) --
Response for PostAgentProfile operation.
Create a profiling group.
See also: AWS API Documentation
Request Syntax
client.create_profiling_group( agentOrchestrationConfig={ 'profilingEnabled': True|False }, clientToken='string', profilingGroupName='string' )
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.
string
[REQUIRED]
Client token for the request.
This field is autopopulated if not provided.
string
[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) --
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.
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
client.get_profile( accept='string', endTime=datetime(2015, 1, 1), maxDepth=123, period='string', profilingGroupName='string', startTime=datetime(2015, 1, 1) )
string
The format of the profile to return. Supports application/json or application/x-amzn-ion. Defaults to application/x-amzn-ion.
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.
integer
Limit the max depth of the profile.
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.
string
[REQUIRED]
The name of the profiling group.
datetime
The start time of the profile to get.
dict
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 (:class:`.StreamingBody`) --
The profile representing the aggregation of agent profiles of the profiling group for a time range.
Describe a profiling group.
See also: AWS API Documentation
Request Syntax
client.describe_profiling_group( profilingGroupName='string' )
string
[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) --
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.
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
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) )
datetime
[REQUIRED]
The end time of the time range to list profiles until.
integer
Upper bound on the number of results to list in a single call.
string
Token for paginating results.
string
The order (ascending or descending by start time of the profile) to list the profiles by. Defaults to TIMESTAMP_DESCENDING.
string
[REQUIRED]
The aggregation period to list the profiles for.
string
[REQUIRED]
The name of the profiling group.
datetime
[REQUIRED]
The start time of the time range to list the profiles from.
dict
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.