AWS::Bedrock::AgentAlias
Specifies an agent alias as a resource in a top-level template. Minimally, you must specify the following properties:
-
AgentAliasName – Specify a name for the alias.
For more information about creating aliases for an agent in Amazon Bedrock, see Deploy an Amazon Bedrock agent.
See the Properties section below for descriptions of both the required and optional properties.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Bedrock::AgentAlias", "Properties" : { "AgentAliasName" :
String
, "AgentId" :String
, "Description" :String
, "RoutingConfiguration" :[ AgentAliasRoutingConfigurationListItem, ... ]
, "Tags" :{
} }Key
:Value
, ...}
YAML
Type: AWS::Bedrock::AgentAlias Properties: AgentAliasName:
String
AgentId:String
Description:String
RoutingConfiguration:- AgentAliasRoutingConfigurationListItem
Tags:
Key
:Value
Properties
AgentAliasName
-
The name of the alias of the agent.
Required: Yes
Type: String
Pattern:
^([0-9a-zA-Z][_-]?){1,100}$
Update requires: No interruption
AgentId
-
The unique identifier of the agent.
Required: Yes
Type: String
Pattern:
^[0-9a-zA-Z]{10}$
Update requires: Replacement
Description
-
The description of the alias of the agent.
Required: No
Type: String
Minimum:
1
Maximum:
200
Update requires: No interruption
RoutingConfiguration
-
Contains details about the routing configuration of the alias.
Required: No
Type: Array of AgentAliasRoutingConfigurationListItem
Maximum:
1
Update requires: No interruption
-
Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
Required: No
Type: Object of String
Pattern:
^[a-zA-Z0-9\s._:/=+@-]*$
Minimum:
0
Maximum:
256
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the agent ID and the agent alias ID, separated by a pipe (|
).
For example, { "Ref": "myAgentAlias" }
could return the value "AGENT12345|ALIAS12345"
.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
AgentAliasArn
-
The Amazon Resource Name (ARN) of the alias of the agent.
AgentAliasHistoryEvents
-
Contains details about the history of the alias.
AgentAliasId
-
The unique identifier of the alias of the agent.
AgentAliasStatus
-
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.
-
CreatedAt
-
The time at which the alias of the agent was created.
UpdatedAt
-
The time at which the alias was last updated.
Examples
Create an alias for an agent
The following example creates an alias that points to version 1 of an agent.
YAML
AWSTemplateFormatVersion: 2010-09-09 Description: "CFN stack for creating an AgentAlias" Resources: ExampleAgentAliasResource: Type: AWS::Bedrock::AgentAlias Properties: AgentId: "1234567890" AgentAliasName: "TestAlias" Description: "Alias for testing" RoutingConfiguration: - AgentVersion: "1"
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "CFN stack for creating an AgentAlias", "Resources": { "ExampleAgentAliasResource": { "Type": "AWS::Bedrock::AgentAlias", "Properties": { "AgentId": "1234567890", "AgentAliasName": "TestAlias", "Description": "Alias for testing", "RoutingConfiguration": { "AgentVersion": "1" } } } } }