class CfnAgentPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.Bedrock.Mixins.CfnAgentPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsbedrock/mixins#CfnAgentPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.bedrock.mixins.CfnAgentPropsMixin |
Python | aws_cdk.mixins_preview.aws_bedrock.mixins.CfnAgentPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_bedrock » mixins » CfnAgentPropsMixin |
Implements
IMixin
Extends
Mixin
Specifies an agent as a resource in a top-level template. Minimally, you must specify the following properties:.
- AgentName – Specify a name for the agent.
- AgentResourceRoleArn – Specify the Amazon Resource Name (ARN) of the service role with permissions to invoke API operations on the agent. For more information, see Create a service role for Agents for Amazon Bedrock .
- FoundationModel – Specify the model ID of a foundation model to use when invoking the agent. For more information, see Supported regions and models for Agents for Amazon Bedrock .
For more information about using agents in Amazon Bedrock , see Agents for Amazon Bedrock .
See the Properties section below for descriptions of both the required and optional properties.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as bedrock_mixins } from '@aws-cdk/mixins-preview/aws-bedrock';
declare const additionalModelRequestFields: any;
const cfnAgentPropsMixin = new bedrock_mixins.CfnAgentPropsMixin({
actionGroups: [{
actionGroupExecutor: {
customControl: 'customControl',
lambda: 'lambda',
},
actionGroupName: 'actionGroupName',
actionGroupState: 'actionGroupState',
apiSchema: {
payload: 'payload',
s3: {
s3BucketName: 's3BucketName',
s3ObjectKey: 's3ObjectKey',
},
},
description: 'description',
functionSchema: {
functions: [{
description: 'description',
name: 'name',
parameters: {
parametersKey: {
description: 'description',
required: false,
type: 'type',
},
},
requireConfirmation: 'requireConfirmation',
}],
},
parentActionGroupSignature: 'parentActionGroupSignature',
skipResourceInUseCheckOnDelete: false,
}],
agentCollaboration: 'agentCollaboration',
agentCollaborators: [{
agentDescriptor: {
aliasArn: 'aliasArn',
},
collaborationInstruction: 'collaborationInstruction',
collaboratorName: 'collaboratorName',
relayConversationHistory: 'relayConversationHistory',
}],
agentName: 'agentName',
agentResourceRoleArn: 'agentResourceRoleArn',
autoPrepare: false,
customerEncryptionKeyArn: 'customerEncryptionKeyArn',
customOrchestration: {
executor: {
lambda: 'lambda',
},
},
description: 'description',
foundationModel: 'foundationModel',
guardrailConfiguration: {
guardrailIdentifier: 'guardrailIdentifier',
guardrailVersion: 'guardrailVersion',
},
idleSessionTtlInSeconds: 123,
instruction: 'instruction',
knowledgeBases: [{
description: 'description',
knowledgeBaseId: 'knowledgeBaseId',
knowledgeBaseState: 'knowledgeBaseState',
}],
memoryConfiguration: {
enabledMemoryTypes: ['enabledMemoryTypes'],
sessionSummaryConfiguration: {
maxRecentSessions: 123,
},
storageDays: 123,
},
orchestrationType: 'orchestrationType',
promptOverrideConfiguration: {
overrideLambda: 'overrideLambda',
promptConfigurations: [{
additionalModelRequestFields: additionalModelRequestFields,
basePromptTemplate: 'basePromptTemplate',
foundationModel: 'foundationModel',
inferenceConfiguration: {
maximumLength: 123,
stopSequences: ['stopSequences'],
temperature: 123,
topK: 123,
topP: 123,
},
parserMode: 'parserMode',
promptCreationMode: 'promptCreationMode',
promptState: 'promptState',
promptType: 'promptType',
}],
},
skipResourceInUseCheckOnDelete: false,
tags: {
tagsKey: 'tags',
},
testAliasTags: {
testAliasTagsKey: 'testAliasTags',
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnAgentPropsMixin(props: CfnAgentMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Agent Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::Bedrock::Agent.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript