agent_contexts
Creates, updates, deletes, gets or lists an agent_contexts resource.
Overview
| Name | agent_contexts |
| Type | Resource |
| Id | aws.wellarchitected.agent_contexts |
Fields
The following fields are returned by SELECT queries:
- get_agent_context
- list_agent_contexts
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the context. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
application_type | string | The type of application described by this context. (SAS, DESKTOP_APPLICATION, OTHER) |
content | object | Typed content structure for a context. Contains application-specific fields that describe the environment used during recommendation generation. |
context_type | string | The type of the context. (APPLICATION) |
created_at | string (date-time) | The timestamp when the context was created. |
created_by | string | The identifier of the user or system that created this context. |
criticality | string | The business criticality of the application described by this context. (MISSION_CRITICAL, BUSINESS_CRITICAL, NON_CRITICAL, TEST_DEVELOPMENT) |
last_modified_at | string (date-time) | The timestamp when the context was last modified. |
last_modified_by | string | The identifier of the user or system that last modified this context. |
profile_arn | string | The Amazon Resource Name (ARN) of the associated profile. (pattern: <code>arn:aws([a-z0-9-]+)?:wellarchitected:[a-z0-9-]{6,64}:\d{12}:agent-profile/([a-zA-Z0-9_-]+)</code>) |
title_ | string | The title of the context. (pattern: <code>(?:(?!${[a-zA-Z]+:)[\P{C}])+</code>) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the context. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
application_type | string | The type of application described by this context. (SAS, DESKTOP_APPLICATION, OTHER) |
content | object | Typed content structure for a context. Contains application-specific fields that describe the environment used during recommendation generation. |
context_type | string | The type of the context. (APPLICATION) |
created_at | string (date-time) | The timestamp when the context was created. |
created_by | string | The identifier of the user or system that created this context. |
criticality | string | The business criticality of the application described by this context. (MISSION_CRITICAL, BUSINESS_CRITICAL, NON_CRITICAL, TEST_DEVELOPMENT) |
last_modified_at | string (date-time) | The timestamp when the context was last modified. |
last_modified_by | string | The identifier of the user or system that last modified this context. |
profile_arn | string | The Amazon Resource Name (ARN) of the associated profile. (pattern: <code>arn:aws([a-z0-9-]+)?:wellarchitected:[a-z0-9-]{6,64}:\d{12}:agent-profile/([a-zA-Z0-9_-]+)</code>) |
title_ | string | The title of the context. (pattern: <code>(?:(?!${[a-zA-Z]+:)[\P{C}])+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_agent_context | select | profile_arn, id, region | Retrieves detailed information about a specific context associated with a profile. | |
list_agent_contexts | select | profile_arn, region | maxResults, nextToken | Lists contexts associated with a profile. |
create_agent_context | insert | profile_arn, region, title, contextType, content | Creates a context associated with an optimization profile. Contexts provide application and environment information used during recommendation generation. | |
update_agent_context | update | profile_arn, id, region | Updates an existing context associated with a profile. | |
delete_agent_context | delete | profile_arn, id, region | Deletes a context associated with a profile. |
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 |
|---|---|---|
id | string | The unique identifier of the context to delete. |
profile_arn | string | The Amazon Resource Name (ARN) of the profile containing the context. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | |
nextToken | string |
SELECT examples
- get_agent_context
- list_agent_contexts
Retrieves detailed information about a specific context associated with a profile.
SELECT
id,
application_type,
content,
context_type,
created_at,
created_by,
criticality,
last_modified_at,
last_modified_by,
profile_arn,
title_
FROM aws.wellarchitected.agent_contexts
WHERE profile_arn = '{{ profile_arn }}' -- required
AND id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Lists contexts associated with a profile.
SELECT
id,
application_type,
content,
context_type,
created_at,
created_by,
criticality,
last_modified_at,
last_modified_by,
profile_arn,
title_
FROM aws.wellarchitected.agent_contexts
WHERE profile_arn = '{{ profile_arn }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_agent_context
- Manifest
Creates a context associated with an optimization profile. Contexts provide application and environment information used during recommendation generation.
INSERT INTO aws.wellarchitected.agent_contexts (
clientToken,
title,
contextType,
content,
profile_arn,
region
)
SELECT
'{{ clientToken }}',
'{{ title }}' /* required */,
'{{ contextType }}' /* required */,
'{{ content }}' /* required */,
'{{ profile_arn }}',
'{{ region }}'
RETURNING
context
;
# Description fields are for documentation purposes
- name: agent_contexts
props:
- name: profile_arn
value: "{{ profile_arn }}"
description: Required parameter for the agent_contexts resource.
- name: region
value: "{{ region }}"
description: Required parameter for the agent_contexts resource.
- name: clientToken
value: "{{ clientToken }}"
- name: title
value: "{{ title }}"
- name: contextType
value: "{{ contextType }}"
valid_values: ['APPLICATION']
- name: content
description: |
Typed content structure for a context. Contains application-specific fields that describe the environment used during recommendation generation.
value:
accountIds:
- "{{ accountIds }}"
regions:
- "{{ regions }}"
awsServices:
- "{{ awsServices }}"
resourceTypes:
- "{{ resourceTypes }}"
resourceTags:
- key: "{{ key }}"
value: "{{ value }}"
applicationOverview: "{{ applicationOverview }}"
industry: "{{ industry }}"
applicationType: "{{ applicationType }}"
criticality: "{{ criticality }}"
architectureOverview: "{{ architectureOverview }}"
additionalContext: "{{ additionalContext }}"
UPDATE examples
- update_agent_context
Updates an existing context associated with a profile.
UPDATE aws.wellarchitected.agent_contexts
SET
clientToken = '{{ clientToken }}',
title = '{{ title }}',
content = '{{ content }}'
WHERE
profile_arn = '{{ profile_arn }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
RETURNING
context;
DELETE examples
- delete_agent_context
Deletes a context associated with a profile.
DELETE FROM aws.wellarchitected.agent_contexts
WHERE profile_arn = '{{ profile_arn }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
;