agent_alias
Creates, updates, deletes, gets or lists an agent_alias resource.
Overview
| Name | agent_alias |
| Type | Resource |
| Id | aws.bedrock_agent.agent_alias |
Fields
The following fields are returned by SELECT queries:
- get_agent_alias
| Name | Datatype | Description |
|---|---|---|
agent_alias_arn | string | The 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_events | array | Contains details about the history of the alias. |
agent_alias_id | string | The unique identifier of the alias of the agent. (pattern: <code>(\bTSTALIASID\b|[0-9a-zA-Z]+)</code>) |
agent_alias_name | string | The name of the alias of the agent. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>) |
agent_alias_status | string | The 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_id | string | The unique identifier of the agent. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
alias_invocation_state | string | The 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_token | string | A 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_at | string (date-time) | The time at which the alias of the agent was created. |
description | string | The description of the alias of the agent. |
failure_reasons | array | Information on the failure of Provisioned Throughput assigned to an agent alias. |
routing_configuration | array | Contains details about the routing configuration of the alias. |
updated_at | string (date-time) | The time at which the alias was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_agent_alias | select | agent_id, agent_alias_id, region | Gets information about an alias of an agent. | |
create_agent_alias | insert | agent_id, region, agentAliasName | Creates an alias of an agent that can be used to deploy the agent. | |
update_agent_alias | update | agent_id, agent_alias_id, region, agentAliasName | Updates configurations for an alias of an agent. | |
delete_agent_alias | delete | agent_id, agent_alias_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
agent_alias_id | string | The unique identifier of the alias to delete. |
agent_id | string | The unique identifier of the agent that the alias belongs to. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_agent_alias
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
- create_agent_alias
- Manifest
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
;
# Description fields are for documentation purposes
- name: agent_alias
props:
- name: agent_id
value: "{{ agent_id }}"
description: Required parameter for the agent_alias resource.
- name: region
value: "{{ region }}"
description: Required parameter for the agent_alias resource.
- name: agentAliasName
value: "{{ agentAliasName }}"
- name: clientToken
value: "{{ clientToken }}"
- name: description
value: "{{ description }}"
- name: routingConfiguration
value:
- agentVersion: "{{ agentVersion }}"
provisionedThroughput: "{{ provisionedThroughput }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_agent_alias
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
- delete_agent_alias
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
;