agents
Creates, updates, deletes or gets an agent
resource or lists agents
in a region
Overview
Name | agents |
Type | Resource |
Description | Definition of AWS::Bedrock::Agent Resource Type |
Id | aws.bedrock.agents |
Fields
Name | Datatype | Description |
---|---|---|
action_groups | array | List of ActionGroups |
agent_arn | string | Arn representation of the Agent. |
agent_id | string | Identifier for a resource. |
agent_name | string | Name for a resource. |
agent_resource_role_arn | string | ARN of a IAM role. |
agent_status | string | Schema Type for Action APIs. |
agent_version | string | Draft Agent Version. |
auto_prepare | boolean | Specifies whether to automatically prepare after creating or updating the agent. |
created_at | string | Time Stamp. |
customer_encryption_key_arn | string | A KMS key ARN |
skip_resource_in_use_check_on_delete | boolean | Specifies whether to allow deleting agent while it is in use. |
description | string | Description of the Resource. |
failure_reasons | array | Failure Reasons for Error. |
foundation_model | string | ARN or name of a Bedrock model. |
idle_session_ttl_in_seconds | number | Max Session Time. |
instruction | string | Instruction for the agent. |
knowledge_bases | array | List of Agent Knowledge Bases |
prepared_at | string | Time Stamp. |
prompt_override_configuration | object | Configuration for prompt override. |
recommended_actions | array | The recommended actions users can take to resolve an error in failureReasons. |
tags | object | A map of tag keys and values |
test_alias_tags | object | A map of tag keys and values |
updated_at | string | Time Stamp. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | AgentName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all agents
in a region.
SELECT
region,
action_groups,
agent_arn,
agent_id,
agent_name,
agent_resource_role_arn,
agent_status,
agent_version,
auto_prepare,
created_at,
customer_encryption_key_arn,
skip_resource_in_use_check_on_delete,
description,
failure_reasons,
foundation_model,
idle_session_ttl_in_seconds,
instruction,
knowledge_bases,
prepared_at,
prompt_override_configuration,
recommended_actions,
tags,
test_alias_tags,
updated_at
FROM aws.bedrock.agents
WHERE region = 'us-east-1';
Gets all properties from an individual agent
.
SELECT
region,
action_groups,
agent_arn,
agent_id,
agent_name,
agent_resource_role_arn,
agent_status,
agent_version,
auto_prepare,
created_at,
customer_encryption_key_arn,
skip_resource_in_use_check_on_delete,
description,
failure_reasons,
foundation_model,
idle_session_ttl_in_seconds,
instruction,
knowledge_bases,
prepared_at,
prompt_override_configuration,
recommended_actions,
tags,
test_alias_tags,
updated_at
FROM aws.bedrock.agents
WHERE region = 'us-east-1' AND data__Identifier = '<AgentId>';
INSERT
example
Use the following StackQL query and manifest file to create a new agent
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.bedrock.agents (
AgentName,
region
)
SELECT
'{{ AgentName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.bedrock.agents (
ActionGroups,
AgentName,
AgentResourceRoleArn,
AutoPrepare,
CustomerEncryptionKeyArn,
SkipResourceInUseCheckOnDelete,
Description,
FoundationModel,
IdleSessionTTLInSeconds,
Instruction,
KnowledgeBases,
PromptOverrideConfiguration,
Tags,
TestAliasTags,
region
)
SELECT
'{{ ActionGroups }}',
'{{ AgentName }}',
'{{ AgentResourceRoleArn }}',
'{{ AutoPrepare }}',
'{{ CustomerEncryptionKeyArn }}',
'{{ SkipResourceInUseCheckOnDelete }}',
'{{ Description }}',
'{{ FoundationModel }}',
'{{ IdleSessionTTLInSeconds }}',
'{{ Instruction }}',
'{{ KnowledgeBases }}',
'{{ PromptOverrideConfiguration }}',
'{{ Tags }}',
'{{ TestAliasTags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: agent
props:
- name: ActionGroups
value:
- ActionGroupName: '{{ ActionGroupName }}'
Description: '{{ Description }}'
ParentActionGroupSignature: '{{ ParentActionGroupSignature }}'
ActionGroupExecutor: null
ApiSchema: null
ActionGroupState: '{{ ActionGroupState }}'
FunctionSchema:
Functions:
- Name: '{{ Name }}'
Description: '{{ Description }}'
Parameters: {}
SkipResourceInUseCheckOnDelete: '{{ SkipResourceInUseCheckOnDelete }}'
- name: AgentName
value: '{{ AgentName }}'
- name: AgentResourceRoleArn
value: '{{ AgentResourceRoleArn }}'
- name: AutoPrepare
value: '{{ AutoPrepare }}'
- name: CustomerEncryptionKeyArn
value: '{{ CustomerEncryptionKeyArn }}'
- name: SkipResourceInUseCheckOnDelete
value: '{{ SkipResourceInUseCheckOnDelete }}'
- name: Description
value: '{{ Description }}'
- name: FoundationModel
value: '{{ FoundationModel }}'
- name: IdleSessionTTLInSeconds
value: null
- name: Instruction
value: '{{ Instruction }}'
- name: KnowledgeBases
value:
- KnowledgeBaseId: '{{ KnowledgeBaseId }}'
Description: '{{ Description }}'
KnowledgeBaseState: '{{ KnowledgeBaseState }}'
- name: PromptOverrideConfiguration
value:
PromptConfigurations:
- PromptType: '{{ PromptType }}'
PromptCreationMode: '{{ PromptCreationMode }}'
PromptState: '{{ PromptState }}'
BasePromptTemplate: '{{ BasePromptTemplate }}'
InferenceConfiguration:
Temperature: null
TopP: null
TopK: null
MaximumLength: null
StopSequences:
- '{{ StopSequences[0] }}'
ParserMode: null
OverrideLambda: '{{ OverrideLambda }}'
- name: Tags
value: {}
- name: TestAliasTags
value: null
DELETE
example
/*+ delete */
DELETE FROM aws.bedrock.agents
WHERE data__Identifier = '<AgentId>'
AND region = 'us-east-1';
Permissions
To operate on the agents
resource, the following permissions are required:
Create
bedrock:CreateAgent,
bedrock:GetAgent,
bedrock:PrepareAgent,
bedrock:GetAgentKnowledgeBase,
bedrock:AssociateAgentKnowledgeBase,
bedrock:ListAgentKnowledgeBases,
bedrock:CreateAgentActionGroup,
bedrock:GetAgentActionGroup,
bedrock:ListAgentActionGroups,
bedrock:TagResource,
bedrock:ListTagsForResource,
iam:PassRole
Read
bedrock:GetAgent,
bedrock:GetAgentActionGroup,
bedrock:ListAgentActionGroups,
bedrock:GetAgentKnowledgeBase,
bedrock:ListAgentKnowledgeBases,
bedrock:ListTagsForResource
Update
bedrock:GetAgent,
bedrock:UpdateAgent,
bedrock:PrepareAgent,
bedrock:GetAgentKnowledgeBase,
bedrock:UpdateAgentKnowledgeBase,
bedrock:AssociateAgentKnowledgeBase,
bedrock:DisassociateAgentKnowledgeBase,
bedrock:ListAgentKnowledgeBases,
bedrock:CreateAgentActionGroup,
bedrock:GetAgentActionGroup,
bedrock:UpdateAgentActionGroup,
bedrock:DeleteAgentActionGroup,
bedrock:ListAgentActionGroups,
bedrock:TagResource,
bedrock:UntagResource,
bedrock:ListTagsForResource,
iam:PassRole
Delete
bedrock:GetAgent,
bedrock:DeleteAgent
List
bedrock:ListAgents