Skip to main content

profiling_groups

Creates, updates, deletes, gets or lists a profiling_groups resource.

Overview

Nameprofiling_groups
TypeResource
Idaws.codeguruprofiler.profiling_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the profiling group. (pattern: <code>^[\w-]+$</code>)
agent_orchestration_configobjectSpecifies whether profiling is enabled or disabled for a profiling group. It is used by ConfigureAgent to enable or disable profiling for a profiling group.
arnstringThe Amazon Resource Name (ARN) identifying the profiling group resource.
compute_platformstringThe 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. (Default, AWSLambda)
created_atstring (date-time)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.
profiling_statusobjectA 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.
tagsobjectA list of the tags that belong to this profiling group.
updated_atstring (date-time)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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_profiling_groupselectprofiling_group_name, regionReturns a ProfilingGroupDescription object that contains information about the requested profiling group.
list_profiling_groupsselectregionincludeDescription, maxResults, nextTokenReturns a list of profiling groups. The profiling groups are returned as ProfilingGroupDescription objects.
create_profiling_groupinsertclientToken, region, profilingGroupNameCreates a profiling group.
remove_permissionupdateaction_group, profiling_group_name, revisionId, regionRemoves permissions from a profiling group's resource-based policy that are provided using an action group. The one supported action group that can be removed is agentPermission which grants ConfigureAgent and PostAgent permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide, ConfigureAgent , and PostAgentProfile .
add_notification_channelsupdateprofiling_group_name, region, channelsAdd up to 2 anomaly notifications channels for a profiling group.
update_profiling_groupupdateprofiling_group_name, region, agentOrchestrationConfigUpdates a profiling group.
remove_notification_channelupdatechannel_id, profiling_group_name, regionRemove one anomaly notifications channel for a profiling group.
put_permissionreplaceaction_group, profiling_group_name, region, principalsAdds permissions to a profiling group's resource-based policy that are provided using an action group. If a profiling group doesn't have a resource-based policy, one is created for it using the permissions in the action group and the roles and users in the principals parameter. <p> The one supported action group that can be added is <code>agentPermission</code> which grants <code>ConfigureAgent</code> and <code>PostAgent</code> permissions. For more information, see <a href="https:​//docs.aws.amazon.com/codeguru/latest/profiler-ug/resource-based-policies.html">Resource-based policies in CodeGuru Profiler</a> in the <i>Amazon CodeGuru Profiler User Guide</i>, <a href="https:​//docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html"> <code>ConfigureAgent</code> </a>, and <a href="https:​//docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html"> <code>PostAgentProfile</code> </a>. </p> <p> The first time you call <code>PutPermission</code> on a profiling group, do not specify a <code>revisionId</code> because it doesn't have a resource-based policy. Subsequent calls must provide a <code>revisionId</code> to specify which revision of the resource-based policy to add the permissions to. </p> <p> The response contains the profiling group's JSON-formatted resource policy. </p>
delete_profiling_groupdeleteprofiling_group_name, regionDeletes a profiling group.
configure_agentexecprofiling_group_name, regionUsed by profiler agents to report their current state and to receive remote configuration updates. For example, ConfigureAgent can be used to tell an agent whether to profile or not and for how long to return profiling data.
post_agent_profileexecContent-Type, profiling_group_name, region, agentProfileprofileTokenSubmits profiling data to an aggregated profile of a profiling group. To get an aggregated profile that is created with this profiling data, use GetProfile .
submit_feedbackexecanomaly_instance_id, profiling_group_name, region, typeSends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is useful or not.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
Content-TypestringThe format of the submitted profiling data. The format maps to the Accept and Content-Type headers of the HTTP request. You can specify one of the following: or the default . <ul> <li> <p> <code>application/json</code> — standard JSON format </p> </li> <li> <p> <code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href="http:​//amzn.github.io/ion-docs/">Amazon Ion</a>. </p> </li> </ul>
action_groupstringSpecifies an action group that contains permissions to add to a profiling group resource. One action group is supported, agentPermissions, which grants permission to perform actions required by the profiling agent, ConfigureAgent and PostAgentProfile permissions.
anomaly_instance_idstringThe universally unique identifier (UUID) of the AnomalyInstance object that is included in the analysis data.
channel_idstringThe id of the channel that we want to stop receiving notifications.
clientTokenstringAmazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental creation of duplicate profiling groups if there are failures and retries.
profiling_group_namestringThe name of the profiling group that is associated with the analysis data.
regionstringAWS region (default: us-east-1)
revisionIdstringA universally unique identifier (UUID) for the revision of the resource-based policy from which you want to remove permissions.
includeDescriptionbooleanA 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.
maxResultsintegerThe 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.
nextTokenstringThe 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. 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.
profileTokenstringAmazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries.

SELECT examples

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

SELECT
name,
agent_orchestration_config,
arn,
compute_platform,
created_at,
profiling_status,
tags,
updated_at
FROM aws.codeguruprofiler.profiling_groups
WHERE profiling_group_name = '{{ profiling_group_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a profiling group.

INSERT INTO aws.codeguruprofiler.profiling_groups (
agentOrchestrationConfig,
computePlatform,
profilingGroupName,
tags,
clientToken,
region
)
SELECT
'{{ agentOrchestrationConfig }}',
'{{ computePlatform }}',
'{{ profilingGroupName }}' /* required */,
'{{ tags }}',
'{{ clientToken }}',
'{{ region }}'
RETURNING
profiling_group
;

UPDATE examples

Removes permissions from a profiling group's resource-based policy that are provided using an action group. The one supported action group that can be removed is agentPermission which grants ConfigureAgent and PostAgent permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide, ConfigureAgent , and PostAgentProfile .

UPDATE aws.codeguruprofiler.profiling_groups
SET
-- No updatable properties
WHERE
action_group = '{{ action_group }}' --required
AND profiling_group_name = '{{ profiling_group_name }}' --required
AND revisionId = '{{ revisionId }}' --required
AND region = '{{ region }}' --required
RETURNING
policy,
revision_id;

REPLACE examples

Adds permissions to a profiling group's resource-based policy that are provided using an action group. If a profiling group doesn't have a resource-based policy, one is created for it using the permissions in the action group and the roles and users in the principals parameter. <p> The one supported action group that can be added is <code>agentPermission</code> which grants <code>ConfigureAgent</code> and <code>PostAgent</code> permissions. For more information, see <a href="https:​//docs.aws.amazon.com/codeguru/latest/profiler-ug/resource-based-policies.html">Resource-based policies in CodeGuru Profiler</a> in the <i>Amazon CodeGuru Profiler User Guide</i>, <a href="https:​//docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html"> <code>ConfigureAgent</code> </a>, and <a href="https:​//docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html"> <code>PostAgentProfile</code> </a>. </p> <p> The first time you call <code>PutPermission</code> on a profiling group, do not specify a <code>revisionId</code> because it doesn't have a resource-based policy. Subsequent calls must provide a <code>revisionId</code> to specify which revision of the resource-based policy to add the permissions to. </p> <p> The response contains the profiling group's JSON-formatted resource policy. </p>

REPLACE aws.codeguruprofiler.profiling_groups
SET
principals = '{{ principals }}',
revisionId = '{{ revisionId }}'
WHERE
action_group = '{{ action_group }}' --required
AND profiling_group_name = '{{ profiling_group_name }}' --required
AND region = '{{ region }}' --required
AND principals = '{{ principals }}' --required
RETURNING
policy,
revision_id;

DELETE examples

Deletes a profiling group.

DELETE FROM aws.codeguruprofiler.profiling_groups
WHERE profiling_group_name = '{{ profiling_group_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

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

EXEC aws.codeguruprofiler.profiling_groups.configure_agent
@profiling_group_name='{{ profiling_group_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"fleetInstanceId": "{{ fleetInstanceId }}",
"metadata": "{{ metadata }}"
}'
;