Interface AgentAliasAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AgentAliasAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:41:04.441Z")
@Stability(Experimental)
public interface AgentAliasAttributes
extends software.amazon.jsii.JsiiSerializable
(experimental) Attributes needed to create an import.
Example:
Key cmk = Key.Builder.create(this, "cmk").build();
// Assuming you have an existing agent and alias
IAgent agent = Agent.fromAgentAttributes(this, "ImportedAgent", AgentAttributes.builder()
.agentArn("arn:aws:bedrock:region:account:agent/agent-id")
.roleArn("arn:aws:iam::account:role/agent-role")
.build());
IAgentAlias agentAlias = AgentAlias.fromAttributes(this, "ImportedAlias", AgentAliasAttributes.builder()
.aliasId("alias-id")
.aliasName("my-alias")
.agentVersion("1")
.agent(agent)
.build());
IPromptVariant agentVariant = PromptVariant.agent(AgentPromptVariantProps.builder()
.variantName("agent-variant")
.model(BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0)
.agentAlias(agentAlias)
.promptText("Use the agent to help with: {{task}}. Please be thorough and provide detailed explanations.")
.promptVariables(List.of("task"))
.build());
Prompt.Builder.create(this, "agentPrompt")
.promptName("agent-prompt")
.description("Prompt for agent interactions")
.defaultVariant(agentVariant)
.variants(List.of(agentVariant))
.kmsKey(cmk)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAgentAliasAttributesstatic final classAn implementation forAgentAliasAttributes -
Method Summary
Modifier and TypeMethodDescriptionstatic AgentAliasAttributes.Builderbuilder()getAgent()(experimental) The underlying agent for this alias.(experimental) The agent version for this alias.(experimental) The Id of the agent alias.default String(experimental) The name of the agent alias.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAgent
(experimental) The underlying agent for this alias. -
getAgentVersion
(experimental) The agent version for this alias. -
getAliasId
(experimental) The Id of the agent alias. -
getAliasName
(experimental) The name of the agent alias.Default: undefined - No alias name is provided
-
builder
- Returns:
- a
AgentAliasAttributes.BuilderofAgentAliasAttributes
-