interface HarnessHookProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.BedrockAgentCore.CfnHarness.HarnessHookProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrockagentcore#CfnHarness_HarnessHookProperty |
Java | software.amazon.awscdk.services.bedrockagentcore.CfnHarness.HarnessHookProperty |
Python | aws_cdk.aws_bedrockagentcore.CfnHarness.HarnessHookProperty |
TypeScript | aws-cdk-lib » aws_bedrockagentcore » CfnHarness » HarnessHookProperty |
A lifecycle hook configured for one phase of the agent loop.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const harnessHookProperty: bedrockagentcore.CfnHarness.HarnessHookProperty = {
afterInvocation: {
name: 'name',
target: {
eventBridge: {
arn: 'arn',
},
lambda: {
arn: 'arn',
// the properties below are optional
failureMode: 'failureMode',
timeoutSeconds: 123,
},
sns: {
arn: 'arn',
},
},
},
afterToolCall: {
name: 'name',
target: {
eventBridge: {
arn: 'arn',
},
lambda: {
arn: 'arn',
// the properties below are optional
failureMode: 'failureMode',
timeoutSeconds: 123,
},
sns: {
arn: 'arn',
},
},
},
beforeInvocation: {
name: 'name',
target: {
eventBridge: {
arn: 'arn',
},
lambda: {
arn: 'arn',
// the properties below are optional
failureMode: 'failureMode',
timeoutSeconds: 123,
},
sns: {
arn: 'arn',
},
},
},
beforeToolCall: {
name: 'name',
target: {
eventBridge: {
arn: 'arn',
},
lambda: {
arn: 'arn',
// the properties below are optional
failureMode: 'failureMode',
timeoutSeconds: 123,
},
sns: {
arn: 'arn',
},
},
},
};
Properties
| Name | Type | Description |
|---|---|---|
| after | IResolvable | Harness | A hook that runs after an agent invocation. |
| after | IResolvable | Harness | A hook that runs after each tool call. |
| before | IResolvable | Harness | A hook that runs before an agent invocation. |
| before | IResolvable | Harness | A hook that runs before each tool call. |
afterInvocation?
Type:
IResolvable | Harness
(optional)
A hook that runs after an agent invocation.
afterToolCall?
Type:
IResolvable | Harness
(optional)
A hook that runs after each tool call.
beforeInvocation?
Type:
IResolvable | Harness
(optional)
A hook that runs before an agent invocation.
beforeToolCall?
Type:
IResolvable | Harness
(optional)
A hook that runs before each tool call.

.NET
Go
Java
Python
TypeScript