@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class HookConfiguration extends Object implements Serializable, Cloneable, StructuredPojo
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using PreExtractionHookConfiguration 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.
Constructor and Description |
---|
HookConfiguration() |
Modifier and Type | Method and Description |
---|---|
HookConfiguration |
clone() |
boolean |
equals(Object obj) |
DocumentAttributeCondition |
getInvocationCondition()
The condition used for when a Lambda function should be invoked.
|
String |
getLambdaArn()
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion.
|
String |
getRoleArn()
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. |
String |
getS3BucketName()
Stores the original, raw documents or the structured, parsed documents before and after altering them.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setInvocationCondition(DocumentAttributeCondition invocationCondition)
The condition used for when a Lambda function should be invoked.
|
void |
setLambdaArn(String lambdaArn)
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion.
|
void |
setRoleArn(String roleArn)
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. |
void |
setS3BucketName(String s3BucketName)
Stores the original, raw documents or the structured, parsed documents before and after altering them.
|
String |
toString()
Returns a string representation of this object.
|
HookConfiguration |
withInvocationCondition(DocumentAttributeCondition invocationCondition)
The condition used for when a Lambda function should be invoked.
|
HookConfiguration |
withLambdaArn(String lambdaArn)
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion.
|
HookConfiguration |
withRoleArn(String roleArn)
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. |
HookConfiguration |
withS3BucketName(String s3BucketName)
Stores the original, raw documents or the structured, parsed documents before and after altering them.
|
public void setInvocationCondition(DocumentAttributeCondition invocationCondition)
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.
invocationCondition
- 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.
public DocumentAttributeCondition getInvocationCondition()
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.
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.
public HookConfiguration withInvocationCondition(DocumentAttributeCondition invocationCondition)
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.
invocationCondition
- 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.
public void setLambdaArn(String lambdaArn)
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).
lambdaArn
- 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).public String getLambdaArn()
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).
public HookConfiguration withLambdaArn(String lambdaArn)
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).
lambdaArn
- 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).public void setRoleArn(String roleArn)
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.
roleArn
- 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.public String getRoleArn()
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.
PreExtractionHookConfiguration
and PostExtractionHookConfiguration
for altering
document metadata and content during the document ingestion process.public HookConfiguration withRoleArn(String roleArn)
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.
roleArn
- 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.public void setS3BucketName(String s3BucketName)
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
s3BucketName
- Stores the original, raw documents or the structured, parsed documents before and after altering them. For
more information, see Data contracts for Lambda functions.public String getS3BucketName()
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
public HookConfiguration withS3BucketName(String s3BucketName)
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
s3BucketName
- Stores the original, raw documents or the structured, parsed documents before and after altering them. For
more information, see Data contracts for Lambda functions.public String toString()
toString
in class Object
Object.toString()
public HookConfiguration clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.