interface AgentAliasAttributes
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Bedrock.Alpha.AgentAliasAttributes |
![]() | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#AgentAliasAttributes |
![]() | software.amazon.awscdk.services.bedrock.alpha.AgentAliasAttributes |
![]() | aws_cdk.aws_bedrock_alpha.AgentAliasAttributes |
![]() | @aws-cdk/aws-bedrock-alpha ยป AgentAliasAttributes |
Attributes needed to create an import.
Example
const cmk = new kms.Key(this, 'cmk', {});
// Assuming you have an existing agent and alias
const agent = bedrock.Agent.fromAgentAttributes(this, 'ImportedAgent', {
agentArn: 'arn:aws:bedrock:region:account:agent/agent-id',
roleArn: 'arn:aws:iam::account:role/agent-role',
});
const agentAlias = bedrock.AgentAlias.fromAttributes(this, 'ImportedAlias', {
aliasId: 'alias-id',
aliasName: 'my-alias',
agentVersion: '1',
agent: agent,
});
const agentVariant = bedrock.PromptVariant.agent({
variantName: 'agent-variant',
model: bedrock.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: ['task'],
});
new bedrock.Prompt(this, 'agentPrompt', {
promptName: 'agent-prompt',
description: 'Prompt for agent interactions',
defaultVariant: agentVariant,
variants: [agentVariant],
kmsKey: cmk,
});
Properties
Name | Type | Description |
---|---|---|
agent | IAgent | The underlying agent for this alias. |
agent | string | The agent version for this alias. |
alias | string | The Id of the agent alias. |
alias | string | The name of the agent alias. |
agent
Type:
IAgent
The underlying agent for this alias.
agentVersion
Type:
string
The agent version for this alias.
aliasId
Type:
string
The Id of the agent alias.
aliasName?
Type:
string
(optional, default: undefined - No alias name is provided)
The name of the agent alias.