Class: AWSCDK::QBusiness::CfnDataSource::HookConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::QBusiness::CfnDataSource::HookConfigurationProperty
- Defined in:
- q_business/cfn_data_source.rb
Overview
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 .
Instance Attribute Summary collapse
-
#invocation_condition ⇒ AWSCDK::IResolvable, ...
readonly
The condition used for when a Lambda function should be invoked.
-
#lambda_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the Lambda function during ingestion.
-
#role_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of a role with permission to run
PreExtractionHookConfigurationandPostExtractionHookConfigurationfor altering document metadata and content during the document ingestion process. -
#s3_bucket_name ⇒ String?
readonly
Stores the original, raw documents or the structured, parsed documents before and after altering them.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(invocation_condition: nil, lambda_arn: nil, role_arn: nil, s3_bucket_name: nil) ⇒ HookConfigurationProperty
constructor
A new instance of HookConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(invocation_condition: nil, lambda_arn: nil, role_arn: nil, s3_bucket_name: nil) ⇒ HookConfigurationProperty
Returns a new instance of HookConfigurationProperty.
1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 |
# File 'q_business/cfn_data_source.rb', line 1043 def initialize(invocation_condition: nil, lambda_arn: nil, role_arn: nil, s3_bucket_name: nil) @invocation_condition = invocation_condition.is_a?(Hash) ? ::AWSCDK::QBusiness::CfnDataSource::DocumentAttributeConditionProperty.new(**invocation_condition.transform_keys(&:to_sym)) : invocation_condition Jsii::Type.check_type(@invocation_condition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xYnVzaW5lc3MuQ2ZuRGF0YVNvdXJjZS5Eb2N1bWVudEF0dHJpYnV0ZUNvbmRpdGlvblByb3BlcnR5In1dfX0=")), "invocationCondition") unless @invocation_condition.nil? @lambda_arn = lambda_arn Jsii::Type.check_type(@lambda_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lambdaArn") unless @lambda_arn.nil? @role_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") unless @role_arn.nil? @s3_bucket_name = s3_bucket_name Jsii::Type.check_type(@s3_bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3BucketName") unless @s3_bucket_name.nil? end |
Instance Attribute Details
#invocation_condition ⇒ AWSCDK::IResolvable, ... (readonly)
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.
1060 1061 1062 |
# File 'q_business/cfn_data_source.rb', line 1060 def invocation_condition @invocation_condition end |
#lambda_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the Lambda function during ingestion.
For more information, see Using Lambda functions for Amazon Q Business document enrichment .
1067 1068 1069 |
# File 'q_business/cfn_data_source.rb', line 1067 def lambda_arn @lambda_arn end |
#role_arn ⇒ String? (readonly)
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.
1072 1073 1074 |
# File 'q_business/cfn_data_source.rb', line 1072 def role_arn @role_arn end |
#s3_bucket_name ⇒ String? (readonly)
Stores the original, raw documents or the structured, parsed documents before and after altering them.
For more information, see Data contracts for Lambda functions .
1079 1080 1081 |
# File 'q_business/cfn_data_source.rb', line 1079 def s3_bucket_name @s3_bucket_name end |
Class Method Details
.jsii_properties ⇒ Object
1081 1082 1083 1084 1085 1086 1087 1088 |
# File 'q_business/cfn_data_source.rb', line 1081 def self.jsii_properties { :invocation_condition => "invocationCondition", :lambda_arn => "lambdaArn", :role_arn => "roleArn", :s3_bucket_name => "s3BucketName", } end |
Instance Method Details
#to_jsii ⇒ Object
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 |
# File 'q_business/cfn_data_source.rb', line 1090 def to_jsii result = {} result.merge!({ "invocationCondition" => @invocation_condition, "lambdaArn" => @lambda_arn, "roleArn" => @role_arn, "s3BucketName" => @s3_bucket_name, }) result.compact end |