interface HookConfigurationProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.aws_qbusiness.CfnDataSource.HookConfigurationProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsqbusiness#CfnDataSource_HookConfigurationProperty |
![]() | software.amazon.awscdk.services.qbusiness.CfnDataSource.HookConfigurationProperty |
![]() | aws_cdk.aws_qbusiness.CfnDataSource.HookConfigurationProperty |
![]() | aws-cdk-lib » aws_qbusiness » CfnDataSource » HookConfigurationProperty |
Provides the configuration information for invoking a Lambda function in AWS Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration
parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration
.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_qbusiness as qbusiness } from 'aws-cdk-lib';
const hookConfigurationProperty: qbusiness.CfnDataSource.HookConfigurationProperty = {
invocationCondition: {
key: 'key',
operator: 'operator',
// the properties below are optional
value: {
dateValue: 'dateValue',
longValue: 123,
stringListValue: ['stringListValue'],
stringValue: 'stringValue',
},
},
lambdaArn: 'lambdaArn',
roleArn: 'roleArn',
s3BucketName: 's3BucketName',
};
Properties
Name | Type | Description |
---|---|---|
invocation | IResolvable | Document | The condition used for when a Lambda function should be invoked. |
lambda | string | The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. |
role | string | The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process. |
s3 | string | Stores the original, raw documents or the structured, parsed documents before and after altering them. |
invocationCondition?
Type:
IResolvable
|
Document
(optional)
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
lambdaArn?
Type:
string
(optional)
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion.
For more information, see IAM roles for Custom Document Enrichment (CDE) .
roleArn?
Type:
string
(optional)
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration
and PostExtractionHookConfiguration
for altering document metadata and content during the document ingestion process.
s3BucketName?
Type:
string
(optional)
Stores the original, raw documents or the structured, parsed documents before and after altering them.
For more information, see Data contracts for Lambda functions .