# VectorIngestionConfigurationProperty

Contains details about how to ingest the documents in a data source.

- Source: Generated at build time
- Type last changed: v2.186.0 · 27 Mar 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const vectorIngestionConfigurationProperty: bedrock.CfnDataSource.VectorIngestionConfigurationProperty = {
  chunkingConfiguration: {
    chunkingStrategy: 'chunkingStrategy',

    // the properties below are optional
    fixedSizeChunkingConfiguration: {
      maxTokens: 123,
      overlapPercentage: 123,
    },
    hierarchicalChunkingConfiguration: {
      levelConfigurations: [{
        maxTokens: 123,
      }],
      overlapTokens: 123,
    },
    semanticChunkingConfiguration: {
      breakpointPercentileThreshold: 123,
      bufferSize: 123,
      maxTokens: 123,
    },
  },
  contextEnrichmentConfiguration: {
    type: 'type',

    // the properties below are optional
    bedrockFoundationModelConfiguration: {
      enrichmentStrategyConfiguration: {
        method: 'method',
      },
      modelArn: 'modelArn',
    },
  },
  customTransformationConfiguration: {
    intermediateStorage: {
      s3Location: {
        uri: 'uri',
      },
    },
    transformations: [{
      stepToApply: 'stepToApply',
      transformationFunction: {
        transformationLambdaConfiguration: {
          lambdaArn: 'lambdaArn',
        },
      },
    }],
  },
  parsingConfiguration: {
    parsingStrategy: 'parsingStrategy',

    // the properties below are optional
    bedrockDataAutomationConfiguration: {
      parsingModality: 'parsingModality',
    },
    bedrockFoundationModelConfiguration: {
      modelArn: 'modelArn',

      // the properties below are optional
      parsingModality: 'parsingModality',
      parsingPrompt: {
        parsingPromptText: 'parsingPromptText',
      },
    },
  },
};
```

Python:

```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_bedrock as bedrock

vector_ingestion_configuration_property = bedrock.CfnDataSource.VectorIngestionConfigurationProperty(
    chunking_configuration=bedrock.CfnDataSource.ChunkingConfigurationProperty(
        chunking_strategy="chunkingStrategy",

        # the properties below are optional
        fixed_size_chunking_configuration=bedrock.CfnDataSource.FixedSizeChunkingConfigurationProperty(
            max_tokens=123,
            overlap_percentage=123
        ),
        hierarchical_chunking_configuration=bedrock.CfnDataSource.HierarchicalChunkingConfigurationProperty(
            level_configurations=[bedrock.CfnDataSource.HierarchicalChunkingLevelConfigurationProperty(
                max_tokens=123
            )],
            overlap_tokens=123
        ),
        semantic_chunking_configuration=bedrock.CfnDataSource.SemanticChunkingConfigurationProperty(
            breakpoint_percentile_threshold=123,
            buffer_size=123,
            max_tokens=123
        )
    ),
    context_enrichment_configuration=bedrock.CfnDataSource.ContextEnrichmentConfigurationProperty(
        type="type",

        # the properties below are optional
        bedrock_foundation_model_configuration=bedrock.CfnDataSource.BedrockFoundationModelContextEnrichmentConfigurationProperty(
            enrichment_strategy_configuration=bedrock.CfnDataSource.EnrichmentStrategyConfigurationProperty(
                method="method"
            ),
            model_arn="modelArn"
        )
    ),
    custom_transformation_configuration=bedrock.CfnDataSource.CustomTransformationConfigurationProperty(
        intermediate_storage=bedrock.CfnDataSource.IntermediateStorageProperty(
            s3_location=bedrock.CfnDataSource.S3LocationProperty(
                uri="uri"
            )
        ),
        transformations=[bedrock.CfnDataSource.TransformationProperty(
            step_to_apply="stepToApply",
            transformation_function=bedrock.CfnDataSource.TransformationFunctionProperty(
                transformation_lambda_configuration=bedrock.CfnDataSource.TransformationLambdaConfigurationProperty(
                    lambda_arn="lambdaArn"
                )
            )
        )]
    ),
    parsing_configuration=bedrock.CfnDataSource.ParsingConfigurationProperty(
        parsing_strategy="parsingStrategy",

        # the properties below are optional
        bedrock_data_automation_configuration=bedrock.CfnDataSource.BedrockDataAutomationConfigurationProperty(
            parsing_modality="parsingModality"
        ),
        bedrock_foundation_model_configuration=bedrock.CfnDataSource.BedrockFoundationModelConfigurationProperty(
            model_arn="modelArn",

            # the properties below are optional
            parsing_modality="parsingModality",
            parsing_prompt=bedrock.CfnDataSource.ParsingPromptProperty(
                parsing_prompt_text="parsingPromptText"
            )
        )
    )
)
```

Java:

```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.bedrock.*;

VectorIngestionConfigurationProperty vectorIngestionConfigurationProperty = VectorIngestionConfigurationProperty.builder()
        .chunkingConfiguration(ChunkingConfigurationProperty.builder()
                .chunkingStrategy("chunkingStrategy")

                // the properties below are optional
                .fixedSizeChunkingConfiguration(FixedSizeChunkingConfigurationProperty.builder()
                        .maxTokens(123)
                        .overlapPercentage(123)
                        .build())
                .hierarchicalChunkingConfiguration(HierarchicalChunkingConfigurationProperty.builder()
                        .levelConfigurations(List.of(HierarchicalChunkingLevelConfigurationProperty.builder()
                                .maxTokens(123)
                                .build()))
                        .overlapTokens(123)
                        .build())
                .semanticChunkingConfiguration(SemanticChunkingConfigurationProperty.builder()
                        .breakpointPercentileThreshold(123)
                        .bufferSize(123)
                        .maxTokens(123)
                        .build())
                .build())
        .contextEnrichmentConfiguration(ContextEnrichmentConfigurationProperty.builder()
                .type("type")

                // the properties below are optional
                .bedrockFoundationModelConfiguration(BedrockFoundationModelContextEnrichmentConfigurationProperty.builder()
                        .enrichmentStrategyConfiguration(EnrichmentStrategyConfigurationProperty.builder()
                                .method("method")
                                .build())
                        .modelArn("modelArn")
                        .build())
                .build())
        .customTransformationConfiguration(CustomTransformationConfigurationProperty.builder()
                .intermediateStorage(IntermediateStorageProperty.builder()
                        .s3Location(S3LocationProperty.builder()
                                .uri("uri")
                                .build())
                        .build())
                .transformations(List.of(TransformationProperty.builder()
                        .stepToApply("stepToApply")
                        .transformationFunction(TransformationFunctionProperty.builder()
                                .transformationLambdaConfiguration(TransformationLambdaConfigurationProperty.builder()
                                        .lambdaArn("lambdaArn")
                                        .build())
                                .build())
                        .build()))
                .build())
        .parsingConfiguration(ParsingConfigurationProperty.builder()
                .parsingStrategy("parsingStrategy")

                // the properties below are optional
                .bedrockDataAutomationConfiguration(BedrockDataAutomationConfigurationProperty.builder()
                        .parsingModality("parsingModality")
                        .build())
                .bedrockFoundationModelConfiguration(BedrockFoundationModelConfigurationProperty.builder()
                        .modelArn("modelArn")

                        // the properties below are optional
                        .parsingModality("parsingModality")
                        .parsingPrompt(ParsingPromptProperty.builder()
                                .parsingPromptText("parsingPromptText")
                                .build())
                        .build())
                .build())
        .build();
```

C# / .NET:

```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.Bedrock;

var vectorIngestionConfigurationProperty = new VectorIngestionConfigurationProperty {
    ChunkingConfiguration = new ChunkingConfigurationProperty {
        ChunkingStrategy = "chunkingStrategy",

        // the properties below are optional
        FixedSizeChunkingConfiguration = new FixedSizeChunkingConfigurationProperty {
            MaxTokens = 123,
            OverlapPercentage = 123
        },
        HierarchicalChunkingConfiguration = new HierarchicalChunkingConfigurationProperty {
            LevelConfigurations = new [] { new HierarchicalChunkingLevelConfigurationProperty {
                MaxTokens = 123
            } },
            OverlapTokens = 123
        },
        SemanticChunkingConfiguration = new SemanticChunkingConfigurationProperty {
            BreakpointPercentileThreshold = 123,
            BufferSize = 123,
            MaxTokens = 123
        }
    },
    ContextEnrichmentConfiguration = new ContextEnrichmentConfigurationProperty {
        Type = "type",

        // the properties below are optional
        BedrockFoundationModelConfiguration = new BedrockFoundationModelContextEnrichmentConfigurationProperty {
            EnrichmentStrategyConfiguration = new EnrichmentStrategyConfigurationProperty {
                Method = "method"
            },
            ModelArn = "modelArn"
        }
    },
    CustomTransformationConfiguration = new CustomTransformationConfigurationProperty {
        IntermediateStorage = new IntermediateStorageProperty {
            S3Location = new S3LocationProperty {
                Uri = "uri"
            }
        },
        Transformations = new [] { new TransformationProperty {
            StepToApply = "stepToApply",
            TransformationFunction = new TransformationFunctionProperty {
                TransformationLambdaConfiguration = new TransformationLambdaConfigurationProperty {
                    LambdaArn = "lambdaArn"
                }
            }
        } }
    },
    ParsingConfiguration = new ParsingConfigurationProperty {
        ParsingStrategy = "parsingStrategy",

        // the properties below are optional
        BedrockDataAutomationConfiguration = new BedrockDataAutomationConfigurationProperty {
            ParsingModality = "parsingModality"
        },
        BedrockFoundationModelConfiguration = new BedrockFoundationModelConfigurationProperty {
            ModelArn = "modelArn",

            // the properties below are optional
            ParsingModality = "parsingModality",
            ParsingPrompt = new ParsingPromptProperty {
                ParsingPromptText = "parsingPromptText"
            }
        }
    }
};
```

Golang:

```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"

vectorIngestionConfigurationProperty := &VectorIngestionConfigurationProperty{
	ChunkingConfiguration: &ChunkingConfigurationProperty{
		ChunkingStrategy: jsii.String("chunkingStrategy"),

		// the properties below are optional
		FixedSizeChunkingConfiguration: &FixedSizeChunkingConfigurationProperty{
			MaxTokens: jsii.Number(123),
			OverlapPercentage: jsii.Number(123),
		},
		HierarchicalChunkingConfiguration: &HierarchicalChunkingConfigurationProperty{
			LevelConfigurations: []interface{}{
				&HierarchicalChunkingLevelConfigurationProperty{
					MaxTokens: jsii.Number(123),
				},
			},
			OverlapTokens: jsii.Number(123),
		},
		SemanticChunkingConfiguration: &SemanticChunkingConfigurationProperty{
			BreakpointPercentileThreshold: jsii.Number(123),
			BufferSize: jsii.Number(123),
			MaxTokens: jsii.Number(123),
		},
	},
	ContextEnrichmentConfiguration: &ContextEnrichmentConfigurationProperty{
		Type: jsii.String("type"),

		// the properties below are optional
		BedrockFoundationModelConfiguration: &BedrockFoundationModelContextEnrichmentConfigurationProperty{
			EnrichmentStrategyConfiguration: &EnrichmentStrategyConfigurationProperty{
				Method: jsii.String("method"),
			},
			ModelArn: jsii.String("modelArn"),
		},
	},
	CustomTransformationConfiguration: &CustomTransformationConfigurationProperty{
		IntermediateStorage: &IntermediateStorageProperty{
			S3Location: &S3LocationProperty{
				Uri: jsii.String("uri"),
			},
		},
		Transformations: []interface{}{
			&TransformationProperty{
				StepToApply: jsii.String("stepToApply"),
				TransformationFunction: &TransformationFunctionProperty{
					TransformationLambdaConfiguration: &TransformationLambdaConfigurationProperty{
						LambdaArn: jsii.String("lambdaArn"),
					},
				},
			},
		},
	},
	ParsingConfiguration: &ParsingConfigurationProperty{
		ParsingStrategy: jsii.String("parsingStrategy"),

		// the properties below are optional
		BedrockDataAutomationConfiguration: &BedrockDataAutomationConfigurationProperty{
			ParsingModality: jsii.String("parsingModality"),
		},
		BedrockFoundationModelConfiguration: &BedrockFoundationModelConfigurationProperty{
			ModelArn: jsii.String("modelArn"),

			// the properties below are optional
			ParsingModality: jsii.String("parsingModality"),
			ParsingPrompt: &ParsingPromptProperty{
				ParsingPromptText: jsii.String("parsingPromptText"),
			},
		},
	},
}
```

## Properties

- `chunkingConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.ChunkingConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnDataSource.ChunkingConfigurationProperty.html) — Details about how to chunk the documents in the data source.

  A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.

- `contextEnrichmentConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.ContextEnrichmentConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnDataSource.ContextEnrichmentConfigurationProperty.html) — The context enrichment configuration used for ingestion of the data into the vector store.

- `customTransformationConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.CustomTransformationConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnDataSource.CustomTransformationConfigurationProperty.html) — A custom document transformer for parsed data source documents.

- `parsingConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.ParsingConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnDataSource.ParsingConfigurationProperty.html) — Configurations for a parser to use for parsing documents in your data source.

  If you exclude this field, the default parser will be used.
