profiling_groups
Creates, updates, deletes, gets or lists a profiling_groups resource.
Overview
| Name | profiling_groups |
| Type | Resource |
| Id | aws.codeguruprofiler.profiling_groups |
Fields
The following fields are returned by SELECT queries:
- describe_profiling_group
- list_profiling_groups
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the profiling group. (pattern: <code>^[\w-]+$</code>) |
agent_orchestration_config | object | Specifies whether profiling is enabled or disabled for a profiling group. It is used by ConfigureAgent to enable or disable profiling for a profiling group. |
arn | string | The Amazon Resource Name (ARN) identifying the profiling group resource. |
compute_platform | string | The 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_at | string (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_status | object | A 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. |
tags | object | A list of the tags that belong to this profiling group. |
updated_at | string (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. |
| Name | Datatype | Description |
|---|---|---|
next_token | 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. (pattern: <code>^[\w-]+$</code>) |
profiling_group_names | array | A returned list of profiling group names. A list of the names is returned only if includeDescription is false, otherwise a list of ProfilingGroupDescription objects is returned. |
profiling_groups | array | A returned list ProfilingGroupDescription objects. A list of ProfilingGroupDescription objects is returned only if includeDescription is true, otherwise a list of profiling group names is returned. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_profiling_group | select | profiling_group_name, region | Returns a ProfilingGroupDescription object that contains information about the requested profiling group. | |
list_profiling_groups | select | region | includeDescription, maxResults, nextToken | Returns a list of profiling groups. The profiling groups are returned as ProfilingGroupDescription objects. |
create_profiling_group | insert | clientToken, region, profilingGroupName | Creates a profiling group. | |
remove_permission | update | action_group, profiling_group_name, revisionId, region | 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 . | |
add_notification_channels | update | profiling_group_name, region, channels | Add up to 2 anomaly notifications channels for a profiling group. | |
update_profiling_group | update | profiling_group_name, region, agentOrchestrationConfig | Updates a profiling group. | |
remove_notification_channel | update | channel_id, profiling_group_name, region | Remove one anomaly notifications channel for a profiling group. | |
put_permission | replace | action_group, profiling_group_name, region, principals | 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> | |
delete_profiling_group | delete | profiling_group_name, region | Deletes a profiling group. | |
configure_agent | exec | profiling_group_name, region | 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. | |
post_agent_profile | exec | Content-Type, profiling_group_name, region, agentProfile | profileToken | Submits 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_feedback | exec | anomaly_instance_id, profiling_group_name, region, type | Sends 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.
| Name | Datatype | Description |
|---|---|---|
Content-Type | string | The 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_group | string | Specifies 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_id | string | The universally unique identifier (UUID) of the AnomalyInstance object that is included in the analysis data. |
channel_id | string | The id of the channel that we want to stop receiving notifications. |
clientToken | string | Amazon 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_name | string | The name of the profiling group that is associated with the analysis data. |
region | string | AWS region (default: us-east-1) |
revisionId | string | A universally unique identifier (UUID) for the revision of the resource-based policy from which you want to remove permissions. |
includeDescription | boolean | A 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. |
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. 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. |
profileToken | string | Amazon 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
- describe_profiling_group
- list_profiling_groups
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
;
Returns a list of profiling groups. The profiling groups are returned as ProfilingGroupDescription objects.
SELECT
next_token,
profiling_group_names,
profiling_groups
FROM aws.codeguruprofiler.profiling_groups
WHERE region = '{{ region }}' -- required
AND includeDescription = '{{ includeDescription }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_profiling_group
- Manifest
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
;
# Description fields are for documentation purposes
- name: profiling_groups
props:
- name: clientToken
value: "{{ clientToken }}"
description: Required parameter for the profiling_groups resource.
- name: region
value: "{{ region }}"
description: Required parameter for the profiling_groups resource.
- name: agentOrchestrationConfig
description: |
Specifies whether profiling is enabled or disabled for a profiling group. It is used by ConfigureAgent to enable or disable profiling for a profiling group.
value:
profilingEnabled: {{ profilingEnabled }}
- name: computePlatform
value: "{{ computePlatform }}"
valid_values: ['Default', 'AWSLambda']
- name: profilingGroupName
value: "{{ profilingGroupName }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- remove_permission
- add_notification_channels
- update_profiling_group
- remove_notification_channel
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;
Add up to 2 anomaly notifications channels for a profiling group.
UPDATE aws.codeguruprofiler.profiling_groups
SET
channels = '{{ channels }}'
WHERE
profiling_group_name = '{{ profiling_group_name }}' --required
AND region = '{{ region }}' --required
AND channels = '{{ channels }}' --required
RETURNING
notification_configuration;
Updates a profiling group.
UPDATE aws.codeguruprofiler.profiling_groups
SET
agentOrchestrationConfig = '{{ agentOrchestrationConfig }}'
WHERE
profiling_group_name = '{{ profiling_group_name }}' --required
AND region = '{{ region }}' --required
AND agentOrchestrationConfig = '{{ agentOrchestrationConfig }}' --required
RETURNING
profiling_group;
Remove one anomaly notifications channel for a profiling group.
UPDATE aws.codeguruprofiler.profiling_groups
SET
-- No updatable properties
WHERE
channel_id = '{{ channel_id }}' --required
AND profiling_group_name = '{{ profiling_group_name }}' --required
AND region = '{{ region }}' --required
RETURNING
notification_configuration;
REPLACE examples
- put_permission
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
- delete_profiling_group
Deletes a profiling group.
DELETE FROM aws.codeguruprofiler.profiling_groups
WHERE profiling_group_name = '{{ profiling_group_name }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- configure_agent
- post_agent_profile
- submit_feedback
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 }}"
}'
;
Submits profiling data to an aggregated profile of a profiling group. To get an aggregated profile that is created with this profiling data, use GetProfile .
EXEC aws.codeguruprofiler.profiling_groups.post_agent_profile
@Content-Type='{{ Content-Type }}' --required,
@profiling_group_name='{{ profiling_group_name }}' --required,
@region='{{ region }}' --required,
@profileToken='{{ profileToken }}'
@@json=
'{
"agentProfile": "{{ agentProfile }}"
}'
;
Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is useful or not.
EXEC aws.codeguruprofiler.profiling_groups.submit_feedback
@anomaly_instance_id='{{ anomaly_instance_id }}' --required,
@profiling_group_name='{{ profiling_group_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"comment": "{{ comment }}",
"type": "{{ type }}"
}'
;