Class AgentAlias
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.bedrock.alpha.AgentAliasBase
software.amazon.awscdk.services.bedrock.alpha.AgentAlias
- All Implemented Interfaces:
IResource,IAgentAlias,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:23.090Z")
@Stability(Experimental)
public class AgentAlias
extends AgentAliasBase
(experimental) Class to create an Agent Alias with CDK.
Example:
// Create a specialized agent
Agent customerSupportAgent = Agent.Builder.create(this, "CustomerSupportAgent")
.instruction("You specialize in answering customer support questions.")
.foundationModel(BedrockFoundationModel.AMAZON_NOVA_LITE_V1)
.build();
// Create an agent alias
AgentAlias customerSupportAlias = AgentAlias.Builder.create(this, "CustomerSupportAlias")
.agent(customerSupportAgent)
.agentAliasName("production")
.build();
// Create a main agent that collaborates with the specialized agent
Agent mainAgent = Agent.Builder.create(this, "MainAgent")
.instruction("You route specialized questions to other agents.")
.foundationModel(BedrockFoundationModel.AMAZON_NOVA_LITE_V1)
.agentCollaboration(Map.of(
"type", AgentCollaboratorType.SUPERVISOR,
"collaborators", List.of(
AgentCollaborator.Builder.create()
.agentAlias(customerSupportAlias)
.collaborationInstruction("Route customer support questions to this agent.")
.collaboratorName("CustomerSupport")
.relayConversationHistory(true)
.build())))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forAgentAlias.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrock.alpha.IAgentAlias
IAgentAlias.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAgentAlias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAgentAlias(software.amazon.jsii.JsiiObjectRef objRef) AgentAlias(software.constructs.Construct scope, String id, AgentAliasProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IAgentAliasfromAttributes(software.constructs.Construct scope, String id, AgentAliasAttributes attrs) (experimental) Brings an Agent Alias from an existing one created outside of CDK.getAgent()(experimental) The underlying agent for this alias.(experimental) The ARN of the agent alias.(experimental) The unique identifier of the agent alias.(experimental) The name of the agent alias.Methods inherited from class software.amazon.awscdk.services.bedrock.alpha.AgentAliasBase
grant, grantGet, grantInvoke, onCloudTrailEvent, onCloudTrailEventMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
AgentAlias
protected AgentAlias(software.amazon.jsii.JsiiObjectRef objRef) -
AgentAlias
protected AgentAlias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AgentAlias
@Stability(Experimental) public AgentAlias(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AgentAliasProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromAttributes
@Stability(Experimental) @NotNull public static IAgentAlias fromAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AgentAliasAttributes attrs) (experimental) Brings an Agent Alias from an existing one created outside of CDK.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
getAgent
(experimental) The underlying agent for this alias.- Specified by:
getAgentin interfaceIAgentAlias- Specified by:
getAgentin classAgentAliasBase
-
getAliasArn
(experimental) The ARN of the agent alias.- Specified by:
getAliasArnin interfaceIAgentAlias- Specified by:
getAliasArnin classAgentAliasBase
-
getAliasId
(experimental) The unique identifier of the agent alias.- Specified by:
getAliasIdin interfaceIAgentAlias- Specified by:
getAliasIdin classAgentAliasBase
-
getAliasName
(experimental) The name of the agent alias.This is either provided by the user or generated from a hash.
-