agent_versions
Creates, updates, deletes, gets or lists an agent_versions resource.
Overview
| Name | agent_versions |
| Type | Resource |
| Id | aws.bedrock_agent.agent_versions |
Fields
The following fields are returned by SELECT queries:
- get_agent_version
- list_agent_versions
| Name | Datatype | Description |
|---|---|---|
agent_arn | string | The Amazon Resource Name (ARN) of the agent that the version belongs to. (pattern: <code>arn:aws:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:agent/[0-9a-zA-Z]{10}</code>) |
agent_collaboration | string | The agent's collaboration settings. (SUPERVISOR, SUPERVISOR_ROUTER, DISABLED) |
agent_id | string | The unique identifier of the agent that the version belongs to. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
agent_name | string | The name of the agent that the version belongs to. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>) |
agent_resource_role_arn | string | The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>) |
agent_status | string | The status of the agent that the version belongs to. (CREATING, PREPARING, PREPARED, NOT_PREPARED, DELETING, FAILED, VERSIONING, UPDATING) |
created_at | string (date-time) | The time at which the version was created. |
customer_encryption_key_arn | string | The Amazon Resource Name (ARN) of the KMS key that encrypts the agent. (pattern: <code>arn:aws(|-cn|-us-gov):kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>) |
description | string | The description of the version. |
failure_reasons | array | A list of reasons that the API operation on the version failed. |
foundation_model | string | The foundation model that the version invokes. (pattern: <code>(arn:aws(-[^:]{1,12})?:(bedrock|sagemaker):[a-z0-9-]{1,20}:([0-9]{12})?:([a-z-]+/)?)?([a-zA-Z0-9.-]{1,63}){0,2}(([:][a-z0-9-]{1,63}){0,2})?(/[a-z0-9]{1,12})?</code>) |
guardrail_configuration | object | Details about a guardrail associated with a resource. |
idle_session_ttl_in_seconds | integer | The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout. |
instruction | string | The instructions provided to the agent. |
memory_configuration | object | Details of the memory configuration. |
prompt_override_configuration | object | Contains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts. |
recommended_actions | array | A list of recommended actions to take for the failed API operation on the version to succeed. |
updated_at | string (date-time) | The time at which the version was last updated. |
version | string | The version number. (pattern: <code>[0-9]{1,5}</code>) |
| Name | Datatype | Description |
|---|---|---|
agent_name | string | The name of the agent to which the version belongs. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>) |
agent_status | string | The status of the agent to which the version belongs. (CREATING, PREPARING, PREPARED, NOT_PREPARED, DELETING, FAILED, VERSIONING, UPDATING) |
agent_version | string | The version of the agent. (pattern: <code>(DRAFT|[0-9]{0,4}[1-9][0-9]{0,4})</code>) |
created_at | string (date-time) | The time at which the version was created. |
description | string | The description of the version of the agent. |
guardrail_configuration | object | Details about a guardrail associated with a resource. |
updated_at | string (date-time) | The time at which the version was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_agent_version | select | agent_id, agent_version, region | Gets details about a version of an agent. | |
list_agent_versions | select | agent_id, region | Lists the versions of an agent and information about each version. | |
delete_agent_version | delete | agent_id, agent_version, region | skipResourceInUseCheck | Deletes a version of an agent. |
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 |
|---|---|---|
agent_id | string | The unique identifier of the agent that the version belongs to. |
agent_version | string | The version of the agent to delete. |
region | string | AWS region (default: us-east-1) |
skipResourceInUseCheck | boolean | By default, this value is false and deletion is stopped if the resource is in use. If you set it to true, the resource will be deleted even if the resource is in use. |
SELECT examples
- get_agent_version
- list_agent_versions
Gets details about a version of an agent.
SELECT
agent_arn,
agent_collaboration,
agent_id,
agent_name,
agent_resource_role_arn,
agent_status,
created_at,
customer_encryption_key_arn,
description,
failure_reasons,
foundation_model,
guardrail_configuration,
idle_session_ttl_in_seconds,
instruction,
memory_configuration,
prompt_override_configuration,
recommended_actions,
updated_at,
version
FROM aws.bedrock_agent.agent_versions
WHERE agent_id = '{{ agent_id }}' -- required
AND agent_version = '{{ agent_version }}' -- required
AND region = '{{ region }}' -- required
;
Lists the versions of an agent and information about each version.
SELECT
agent_name,
agent_status,
agent_version,
created_at,
description,
guardrail_configuration,
updated_at
FROM aws.bedrock_agent.agent_versions
WHERE agent_id = '{{ agent_id }}' -- required
AND region = '{{ region }}' -- required
;
DELETE examples
- delete_agent_version
Deletes a version of an agent.
DELETE FROM aws.bedrock_agent.agent_versions
WHERE agent_id = '{{ agent_id }}' --required
AND agent_version = '{{ agent_version }}' --required
AND region = '{{ region }}' --required
AND skipResourceInUseCheck = '{{ skipResourceInUseCheck }}'
;