Skip to main content

agent_versions

Creates, updates, deletes, gets or lists an agent_versions resource.

Overview

Nameagent_versions
TypeResource
Idaws.bedrock_agent.agent_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_arnstringThe 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_collaborationstringThe agent's collaboration settings. (SUPERVISOR, SUPERVISOR_ROUTER, DISABLED)
agent_idstringThe unique identifier of the agent that the version belongs to. (pattern: <code>[0-9a-zA-Z]{10}</code>)
agent_namestringThe name of the agent that the version belongs to. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>)
agent_resource_role_arnstringThe 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_statusstringThe status of the agent that the version belongs to. (CREATING, PREPARING, PREPARED, NOT_PREPARED, DELETING, FAILED, VERSIONING, UPDATING)
created_atstring (date-time)The time at which the version was created.
customer_encryption_key_arnstringThe 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>)
descriptionstringThe description of the version.
failure_reasonsarrayA list of reasons that the API operation on the version failed.
foundation_modelstringThe 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_configurationobjectDetails about a guardrail associated with a resource.
idle_session_ttl_in_secondsintegerThe 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.
instructionstringThe instructions provided to the agent.
memory_configurationobjectDetails of the memory configuration.
prompt_override_configurationobjectContains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts.
recommended_actionsarrayA list of recommended actions to take for the failed API operation on the version to succeed.
updated_atstring (date-time)The time at which the version was last updated.
versionstringThe version number. (pattern: <code>[0-9]{1,5}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_agent_versionselectagent_id, agent_version, regionGets details about a version of an agent.
list_agent_versionsselectagent_id, regionLists the versions of an agent and information about each version.
delete_agent_versiondeleteagent_id, agent_version, regionskipResourceInUseCheckDeletes 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.

NameDatatypeDescription
agent_idstringThe unique identifier of the agent that the version belongs to.
agent_versionstringThe version of the agent to delete.
regionstringAWS region (default: us-east-1)
skipResourceInUseCheckbooleanBy 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

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
;

DELETE examples

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 }}'
;