Skip to content
v2.278.0

CustomDocumentEnrichmentConfigurationProperty Struct ​

Provides the configuration information for altering document metadata and content during the document ingestion process.

For more information, see Customizing document metadata during the ingestion process .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_kendra as kendra } from 'aws-cdk-lib';
const customDocumentEnrichmentConfigurationProperty: kendra.CfnDataSource.CustomDocumentEnrichmentConfigurationProperty = {
  inlineConfigurations: [{
    condition: {
      conditionDocumentAttributeKey: 'conditionDocumentAttributeKey',
      operator: 'operator',

      // the properties below are optional
      conditionOnValue: {
        dateValue: 'dateValue',
        longValue: 123,
        stringListValue: ['stringListValue'],
        stringValue: 'stringValue',
      },
    },
    documentContentDeletion: false,
    target: {
      targetDocumentAttributeKey: 'targetDocumentAttributeKey',

      // the properties below are optional
      targetDocumentAttributeValue: {
        dateValue: 'dateValue',
        longValue: 123,
        stringListValue: ['stringListValue'],
        stringValue: 'stringValue',
      },
      targetDocumentAttributeValueDeletion: false,
    },
  }],
  postExtractionHookConfiguration: {
    lambdaArn: 'lambdaArn',
    s3Bucket: 's3Bucket',

    // the properties below are optional
    invocationCondition: {
      conditionDocumentAttributeKey: 'conditionDocumentAttributeKey',
      operator: 'operator',

      // the properties below are optional
      conditionOnValue: {
        dateValue: 'dateValue',
        longValue: 123,
        stringListValue: ['stringListValue'],
        stringValue: 'stringValue',
      },
    },
  },
  preExtractionHookConfiguration: {
    lambdaArn: 'lambdaArn',
    s3Bucket: 's3Bucket',

    // the properties below are optional
    invocationCondition: {
      conditionDocumentAttributeKey: 'conditionDocumentAttributeKey',
      operator: 'operator',

      // the properties below are optional
      conditionOnValue: {
        dateValue: 'dateValue',
        longValue: 123,
        stringListValue: ['stringListValue'],
        stringValue: 'stringValue',
      },
    },
  },
  roleArn: 'roleArn',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_kendra as kendra

custom_document_enrichment_configuration_property = kendra.CfnDataSource.CustomDocumentEnrichmentConfigurationProperty(
    inline_configurations=[kendra.CfnDataSource.InlineCustomDocumentEnrichmentConfigurationProperty(
        condition=kendra.CfnDataSource.DocumentAttributeConditionProperty(
            condition_document_attribute_key="conditionDocumentAttributeKey",
            operator="operator",

            # the properties below are optional
            condition_on_value=kendra.CfnDataSource.DocumentAttributeValueProperty(
                date_value="dateValue",
                long_value=123,
                string_list_value=["stringListValue"],
                string_value="stringValue"
            )
        ),
        document_content_deletion=False,
        target=kendra.CfnDataSource.DocumentAttributeTargetProperty(
            target_document_attribute_key="targetDocumentAttributeKey",

            # the properties below are optional
            target_document_attribute_value=kendra.CfnDataSource.DocumentAttributeValueProperty(
                date_value="dateValue",
                long_value=123,
                string_list_value=["stringListValue"],
                string_value="stringValue"
            ),
            target_document_attribute_value_deletion=False
        )
    )],
    post_extraction_hook_configuration=kendra.CfnDataSource.HookConfigurationProperty(
        lambda_arn="lambdaArn",
        s3_bucket="s3Bucket",

        # the properties below are optional
        invocation_condition=kendra.CfnDataSource.DocumentAttributeConditionProperty(
            condition_document_attribute_key="conditionDocumentAttributeKey",
            operator="operator",

            # the properties below are optional
            condition_on_value=kendra.CfnDataSource.DocumentAttributeValueProperty(
                date_value="dateValue",
                long_value=123,
                string_list_value=["stringListValue"],
                string_value="stringValue"
            )
        )
    ),
    pre_extraction_hook_configuration=kendra.CfnDataSource.HookConfigurationProperty(
        lambda_arn="lambdaArn",
        s3_bucket="s3Bucket",

        # the properties below are optional
        invocation_condition=kendra.CfnDataSource.DocumentAttributeConditionProperty(
            condition_document_attribute_key="conditionDocumentAttributeKey",
            operator="operator",

            # the properties below are optional
            condition_on_value=kendra.CfnDataSource.DocumentAttributeValueProperty(
                date_value="dateValue",
                long_value=123,
                string_list_value=["stringListValue"],
                string_value="stringValue"
            )
        )
    ),
    role_arn="roleArn"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.kendra.*;

CustomDocumentEnrichmentConfigurationProperty customDocumentEnrichmentConfigurationProperty = CustomDocumentEnrichmentConfigurationProperty.builder()
        .inlineConfigurations(List.of(InlineCustomDocumentEnrichmentConfigurationProperty.builder()
                .condition(DocumentAttributeConditionProperty.builder()
                        .conditionDocumentAttributeKey("conditionDocumentAttributeKey")
                        .operator("operator")

                        // the properties below are optional
                        .conditionOnValue(DocumentAttributeValueProperty.builder()
                                .dateValue("dateValue")
                                .longValue(123)
                                .stringListValue(List.of("stringListValue"))
                                .stringValue("stringValue")
                                .build())
                        .build())
                .documentContentDeletion(false)
                .target(DocumentAttributeTargetProperty.builder()
                        .targetDocumentAttributeKey("targetDocumentAttributeKey")

                        // the properties below are optional
                        .targetDocumentAttributeValue(DocumentAttributeValueProperty.builder()
                                .dateValue("dateValue")
                                .longValue(123)
                                .stringListValue(List.of("stringListValue"))
                                .stringValue("stringValue")
                                .build())
                        .targetDocumentAttributeValueDeletion(false)
                        .build())
                .build()))
        .postExtractionHookConfiguration(HookConfigurationProperty.builder()
                .lambdaArn("lambdaArn")
                .s3Bucket("s3Bucket")

                // the properties below are optional
                .invocationCondition(DocumentAttributeConditionProperty.builder()
                        .conditionDocumentAttributeKey("conditionDocumentAttributeKey")
                        .operator("operator")

                        // the properties below are optional
                        .conditionOnValue(DocumentAttributeValueProperty.builder()
                                .dateValue("dateValue")
                                .longValue(123)
                                .stringListValue(List.of("stringListValue"))
                                .stringValue("stringValue")
                                .build())
                        .build())
                .build())
        .preExtractionHookConfiguration(HookConfigurationProperty.builder()
                .lambdaArn("lambdaArn")
                .s3Bucket("s3Bucket")

                // the properties below are optional
                .invocationCondition(DocumentAttributeConditionProperty.builder()
                        .conditionDocumentAttributeKey("conditionDocumentAttributeKey")
                        .operator("operator")

                        // the properties below are optional
                        .conditionOnValue(DocumentAttributeValueProperty.builder()
                                .dateValue("dateValue")
                                .longValue(123)
                                .stringListValue(List.of("stringListValue"))
                                .stringValue("stringValue")
                                .build())
                        .build())
                .build())
        .roleArn("roleArn")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Kendra;

var customDocumentEnrichmentConfigurationProperty = new CustomDocumentEnrichmentConfigurationProperty {
    InlineConfigurations = new [] { new InlineCustomDocumentEnrichmentConfigurationProperty {
        Condition = new DocumentAttributeConditionProperty {
            ConditionDocumentAttributeKey = "conditionDocumentAttributeKey",
            Operator = "operator",

            // the properties below are optional
            ConditionOnValue = new DocumentAttributeValueProperty {
                DateValue = "dateValue",
                LongValue = 123,
                StringListValue = new [] { "stringListValue" },
                StringValue = "stringValue"
            }
        },
        DocumentContentDeletion = false,
        Target = new DocumentAttributeTargetProperty {
            TargetDocumentAttributeKey = "targetDocumentAttributeKey",

            // the properties below are optional
            TargetDocumentAttributeValue = new DocumentAttributeValueProperty {
                DateValue = "dateValue",
                LongValue = 123,
                StringListValue = new [] { "stringListValue" },
                StringValue = "stringValue"
            },
            TargetDocumentAttributeValueDeletion = false
        }
    } },
    PostExtractionHookConfiguration = new HookConfigurationProperty {
        LambdaArn = "lambdaArn",
        S3Bucket = "s3Bucket",

        // the properties below are optional
        InvocationCondition = new DocumentAttributeConditionProperty {
            ConditionDocumentAttributeKey = "conditionDocumentAttributeKey",
            Operator = "operator",

            // the properties below are optional
            ConditionOnValue = new DocumentAttributeValueProperty {
                DateValue = "dateValue",
                LongValue = 123,
                StringListValue = new [] { "stringListValue" },
                StringValue = "stringValue"
            }
        }
    },
    PreExtractionHookConfiguration = new HookConfigurationProperty {
        LambdaArn = "lambdaArn",
        S3Bucket = "s3Bucket",

        // the properties below are optional
        InvocationCondition = new DocumentAttributeConditionProperty {
            ConditionDocumentAttributeKey = "conditionDocumentAttributeKey",
            Operator = "operator",

            // the properties below are optional
            ConditionOnValue = new DocumentAttributeValueProperty {
                DateValue = "dateValue",
                LongValue = 123,
                StringListValue = new [] { "stringListValue" },
                StringValue = "stringValue"
            }
        }
    },
    RoleArn = "roleArn"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

customDocumentEnrichmentConfigurationProperty := &CustomDocumentEnrichmentConfigurationProperty{
	InlineConfigurations: []interface{}{
		&InlineCustomDocumentEnrichmentConfigurationProperty{
			Condition: &DocumentAttributeConditionProperty{
				ConditionDocumentAttributeKey: jsii.String("conditionDocumentAttributeKey"),
				Operator: jsii.String("operator"),

				// the properties below are optional
				ConditionOnValue: &DocumentAttributeValueProperty{
					DateValue: jsii.String("dateValue"),
					LongValue: jsii.Number(123),
					StringListValue: []*string{
						jsii.String("stringListValue"),
					},
					StringValue: jsii.String("stringValue"),
				},
			},
			DocumentContentDeletion: jsii.Boolean(false),
			Target: &DocumentAttributeTargetProperty{
				TargetDocumentAttributeKey: jsii.String("targetDocumentAttributeKey"),

				// the properties below are optional
				TargetDocumentAttributeValue: &DocumentAttributeValueProperty{
					DateValue: jsii.String("dateValue"),
					LongValue: jsii.Number(123),
					StringListValue: []*string{
						jsii.String("stringListValue"),
					},
					StringValue: jsii.String("stringValue"),
				},
				TargetDocumentAttributeValueDeletion: jsii.Boolean(false),
			},
		},
	},
	PostExtractionHookConfiguration: &HookConfigurationProperty{
		LambdaArn: jsii.String("lambdaArn"),
		S3Bucket: jsii.String("s3Bucket"),

		// the properties below are optional
		InvocationCondition: &DocumentAttributeConditionProperty{
			ConditionDocumentAttributeKey: jsii.String("conditionDocumentAttributeKey"),
			Operator: jsii.String("operator"),

			// the properties below are optional
			ConditionOnValue: &DocumentAttributeValueProperty{
				DateValue: jsii.String("dateValue"),
				LongValue: jsii.Number(123),
				StringListValue: []*string{
					jsii.String("stringListValue"),
				},
				StringValue: jsii.String("stringValue"),
			},
		},
	},
	PreExtractionHookConfiguration: &HookConfigurationProperty{
		LambdaArn: jsii.String("lambdaArn"),
		S3Bucket: jsii.String("s3Bucket"),

		// the properties below are optional
		InvocationCondition: &DocumentAttributeConditionProperty{
			ConditionDocumentAttributeKey: jsii.String("conditionDocumentAttributeKey"),
			Operator: jsii.String("operator"),

			// the properties below are optional
			ConditionOnValue: &DocumentAttributeValueProperty{
				DateValue: jsii.String("dateValue"),
				LongValue: jsii.Number(123),
				StringListValue: []*string{
					jsii.String("stringListValue"),
				},
				StringValue: jsii.String("stringValue"),
			},
		},
	},
	RoleArn: jsii.String("roleArn"),
}

Properties ​

inlineConfigurationsoptionalIResolvable | IResolvable | CfnDataSource.InlineCustomDocumentEnrichmentConfigurationProperty[]inline_configurationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, InlineCustomDocumentEnrichmentConfigurationProperty]]]inlineConfigurationsoptionalIResolvableInlineConfigurationsoptionalIResolvableInlineConfigurationsoptionalinterface{} #
Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Kendra.
postExtractionHookConfigurationoptionalIResolvable | CfnDataSource.HookConfigurationPropertypost_extraction_hook_configurationoptionaltyping.Union[IResolvable, HookConfigurationProperty]postExtractionHookConfigurationoptionalIResolvablePostExtractionHookConfigurationoptionalIResolvablePostExtractionHookConfigurationoptionalinterface{} #
Configuration information for invoking a Lambda function in AWS Lambda on the structured documents with their metadata and text extracted.
notes

You can use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Advanced data manipulation .

preExtractionHookConfigurationoptionalIResolvable | CfnDataSource.HookConfigurationPropertypre_extraction_hook_configurationoptionaltyping.Union[IResolvable, HookConfigurationProperty]preExtractionHookConfigurationoptionalIResolvablePreExtractionHookConfigurationoptionalIResolvablePreExtractionHookConfigurationoptionalinterface{} #
Configuration information for invoking a Lambda function in AWS Lambda on the original or raw documents before extracting their metadata and text.
notes

You can use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Advanced data manipulation .

roleArnoptionalstringrole_arnoptionalstrroleArnoptionalStringRoleArnoptionalstringRoleArnoptional*string #
The Amazon Resource Name (ARN) of an IAM role with permission to run `PreExtractionHookConfiguration` and `PostExtractionHookConfiguration` for altering document metadata and content during the document ingestion process.

For more information, see an IAM roles for Amazon Kendra .