Skip to main content

agent_alias

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

Overview

Nameagent_alias
TypeResource
Idaws.bedrock_agent.agent_alias

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_alias_arnstringThe Amazon Resource Name (ARN) of the alias of the agent. (pattern: <code>arn:aws:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:agent-alias/[0-9a-zA-Z]{10}/[0-9a-zA-Z]{10}</code>)
agent_alias_history_eventsarrayContains details about the history of the alias.
agent_alias_idstringThe unique identifier of the alias of the agent. (pattern: <code>(\bTSTALIASID\b|[0-9a-zA-Z]+)</code>)
agent_alias_namestringThe name of the alias of the agent. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>)
agent_alias_statusstringThe status of the alias of the agent and whether it is ready for use. The following statuses are possible: CREATING – The agent alias is being created. PREPARED – The agent alias is finished being created or updated and is ready to be invoked. FAILED – The agent alias API operation failed. UPDATING – The agent alias is being updated. DELETING – The agent alias is being deleted. DISSOCIATED - The agent alias has no version associated with it. (CREATING, PREPARED, FAILED, UPDATING, DELETING, DISSOCIATED)
agent_idstringThe unique identifier of the agent. (pattern: <code>[0-9a-zA-Z]{10}</code>)
alias_invocation_statestringThe invocation state for the agent alias. If the agent alias is running, the value is ACCEPT_INVOCATIONS. If the agent alias is paused, the value is REJECT_INVOCATIONS. Use the UpdateAgentAlias operation to change the invocation state. (ACCEPT_INVOCATIONS, REJECT_INVOCATIONS)
client_tokenstringA unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,256}</code>)
created_atstring (date-time)The time at which the alias of the agent was created.
descriptionstringThe description of the alias of the agent.
failure_reasonsarrayInformation on the failure of Provisioned Throughput assigned to an agent alias.
routing_configurationarrayContains details about the routing configuration of the alias.
updated_atstring (date-time)The time at which the alias was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_agent_aliasselectagent_id, agent_alias_id, regionGets information about an alias of an agent.
create_agent_aliasinsertagent_id, region, agentAliasNameCreates an alias of an agent that can be used to deploy the agent.
update_agent_aliasupdateagent_id, agent_alias_id, region, agentAliasNameUpdates configurations for an alias of an agent.
delete_agent_aliasdeleteagent_id, agent_alias_id, regionDeletes an alias 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_alias_idstringThe unique identifier of the alias to delete.
agent_idstringThe unique identifier of the agent that the alias belongs to.
regionstringAWS region (default: us-east-1)

SELECT examples

Gets information about an alias of an agent.

SELECT
agent_alias_arn,
agent_alias_history_events,
agent_alias_id,
agent_alias_name,
agent_alias_status,
agent_id,
alias_invocation_state,
client_token,
created_at,
description,
failure_reasons,
routing_configuration,
updated_at
FROM aws.bedrock_agent.agent_alias
WHERE agent_id = '{{ agent_id }}' -- required
AND agent_alias_id = '{{ agent_alias_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an alias of an agent that can be used to deploy the agent.

INSERT INTO aws.bedrock_agent.agent_alias (
agentAliasName,
clientToken,
description,
routingConfiguration,
tags,
agent_id,
region
)
SELECT
'{{ agentAliasName }}' /* required */,
'{{ clientToken }}',
'{{ description }}',
'{{ routingConfiguration }}',
'{{ tags }}',
'{{ agent_id }}',
'{{ region }}'
RETURNING
agent_alias
;

UPDATE examples

Updates configurations for an alias of an agent.

UPDATE aws.bedrock_agent.agent_alias
SET
agentAliasName = '{{ agentAliasName }}',
description = '{{ description }}',
routingConfiguration = '{{ routingConfiguration }}',
aliasInvocationState = '{{ aliasInvocationState }}'
WHERE
agent_id = '{{ agent_id }}' --required
AND agent_alias_id = '{{ agent_alias_id }}' --required
AND region = '{{ region }}' --required
AND agentAliasName = '{{ agentAliasName }}' --required
RETURNING
agent_alias;

DELETE examples

Deletes an alias of an agent.

DELETE FROM aws.bedrock_agent.agent_alias
WHERE agent_id = '{{ agent_id }}' --required
AND agent_alias_id = '{{ agent_alias_id }}' --required
AND region = '{{ region }}' --required
;