Class: AWSCDK::Kendra::CfnDataSource::HookConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Kendra::CfnDataSource::HookConfigurationProperty
- Defined in:
- kendra/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 Kendra.
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 Kendra 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 Customizing document metadata during the ingestion process .
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 an IAM role with permission to run a Lambda function during ingestion.
-
#s3_bucket ⇒ 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(lambda_arn:, s3_bucket:, invocation_condition: nil) ⇒ HookConfigurationProperty
constructor
A new instance of HookConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(lambda_arn:, s3_bucket:, invocation_condition: nil) ⇒ HookConfigurationProperty
Returns a new instance of HookConfigurationProperty.
2207 2208 2209 2210 2211 2212 2213 2214 |
# File 'kendra/cfn_data_source.rb', line 2207 def initialize(lambda_arn:, s3_bucket:, invocation_condition: nil) @lambda_arn = lambda_arn Jsii::Type.check_type(@lambda_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lambdaArn") @s3_bucket = s3_bucket Jsii::Type.check_type(@s3_bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3Bucket") @invocation_condition = invocation_condition.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::DocumentAttributeConditionProperty.new(**invocation_condition.transform_keys(&:to_sym)) : invocation_condition Jsii::Type.check_type(@invocation_condition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5Eb2N1bWVudEF0dHJpYnV0ZUNvbmRpdGlvblByb3BlcnR5In1dfX0=")), "invocationCondition") unless @invocation_condition.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 Kendra should invoke a function that inserts the current date-time.
2236 2237 2238 |
# File 'kendra/cfn_data_source.rb', line 2236 def invocation_condition @invocation_condition end |
#lambda_arn ⇒ String (readonly)
The Amazon Resource Name (ARN) of an IAM role with permission to run a Lambda function during ingestion.
For more information, see an IAM roles for Amazon Kendra .
2222 2223 2224 |
# File 'kendra/cfn_data_source.rb', line 2222 def lambda_arn @lambda_arn end |
#s3_bucket ⇒ 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 .
2229 2230 2231 |
# File 'kendra/cfn_data_source.rb', line 2229 def s3_bucket @s3_bucket end |
Class Method Details
.jsii_properties ⇒ Object
2238 2239 2240 2241 2242 2243 2244 |
# File 'kendra/cfn_data_source.rb', line 2238 def self.jsii_properties { :lambda_arn => "lambdaArn", :s3_bucket => "s3Bucket", :invocation_condition => "invocationCondition", } end |
Instance Method Details
#to_jsii ⇒ Object
2246 2247 2248 2249 2250 2251 2252 2253 2254 |
# File 'kendra/cfn_data_source.rb', line 2246 def to_jsii result = {} result.merge!({ "lambdaArn" => @lambda_arn, "s3Bucket" => @s3_bucket, "invocationCondition" => @invocation_condition, }) result.compact end |