Interface AgentAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AgentAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-09-02T11:25:42.763Z")
@Stability(Experimental)
public interface AgentAttributes
extends software.amazon.jsii.JsiiSerializable
(experimental) Attributes for specifying an imported Bedrock Agent.
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 class
A builder forAgentAttributes
static final class
An implementation forAgentAttributes
-
Method Summary
Modifier and TypeMethodDescriptionstatic AgentAttributes.Builder
builder()
(experimental) The ARN of the agent.default String
(experimental) The agent version.default String
(experimental) Optional KMS encryption key associated with this agent.default String
(experimental) When this agent was last updated.(experimental) The ARN of the IAM role associated to the agent.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAgentArn
(experimental) The ARN of the agent. -
getRoleArn
(experimental) The ARN of the IAM role associated to the agent. -
getAgentVersion
(experimental) The agent version.If no explicit versions have been created, leave this empty to use the DRAFT version. Otherwise, use the version number (e.g. 1).
Default: 'DRAFT'
-
getKmsKeyArn
(experimental) Optional KMS encryption key associated with this agent.Default: undefined - An AWS managed key is used
-
getLastUpdated
(experimental) When this agent was last updated.Default: undefined - No last updated timestamp is provided
-
builder
- Returns:
- a
AgentAttributes.Builder
ofAgentAttributes
-