Skip to content
v2.277.0

CfnKnowledgeBaseProps Struct ​

Properties for defining a CfnKnowledgeBase.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wisdom as wisdom } from 'aws-cdk-lib';
const cfnKnowledgeBaseProps: wisdom.CfnKnowledgeBaseProps = {
  knowledgeBaseType: 'knowledgeBaseType',
  name: 'name',

  // the properties below are optional
  description: 'description',
  renderingConfiguration: {
    templateUri: 'templateUri',
  },
  serverSideEncryptionConfiguration: {
    kmsKeyId: 'kmsKeyId',
  },
  sourceConfiguration: {
    appIntegrations: {
      appIntegrationArn: 'appIntegrationArn',

      // the properties below are optional
      objectFields: ['objectFields'],
    },
    managedSourceConfiguration: {
      webCrawlerConfiguration: {
        urlConfiguration: {
          seedUrls: [{
            url: 'url',
          }],
        },

        // the properties below are optional
        crawlerLimits: {
          rateLimit: 123,
        },
        exclusionFilters: ['exclusionFilters'],
        inclusionFilters: ['inclusionFilters'],
        scope: 'scope',
      },
    },
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  vectorIngestionConfiguration: {
    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,
      },
    },
    parsingConfiguration: {
      parsingStrategy: 'parsingStrategy',

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

        // the properties below are optional
        parsingPrompt: {
          parsingPromptText: 'parsingPromptText',
        },
      },
    },
  },
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wisdom as wisdom

cfn_knowledge_base_props = wisdom.CfnKnowledgeBaseProps(
    knowledge_base_type="knowledgeBaseType",
    name="name",

    # the properties below are optional
    description="description",
    rendering_configuration=wisdom.CfnKnowledgeBase.RenderingConfigurationProperty(
        template_uri="templateUri"
    ),
    server_side_encryption_configuration=wisdom.CfnKnowledgeBase.ServerSideEncryptionConfigurationProperty(
        kms_key_id="kmsKeyId"
    ),
    source_configuration=wisdom.CfnKnowledgeBase.SourceConfigurationProperty(
        app_integrations=wisdom.CfnKnowledgeBase.AppIntegrationsConfigurationProperty(
            app_integration_arn="appIntegrationArn",

            # the properties below are optional
            object_fields=["objectFields"]
        ),
        managed_source_configuration=wisdom.CfnKnowledgeBase.ManagedSourceConfigurationProperty(
            web_crawler_configuration=wisdom.CfnKnowledgeBase.WebCrawlerConfigurationProperty(
                url_configuration=wisdom.CfnKnowledgeBase.UrlConfigurationProperty(
                    seed_urls=[wisdom.CfnKnowledgeBase.SeedUrlProperty(
                        url="url"
                    )]
                ),

                # the properties below are optional
                crawler_limits=wisdom.CfnKnowledgeBase.CrawlerLimitsProperty(
                    rate_limit=123
                ),
                exclusion_filters=["exclusionFilters"],
                inclusion_filters=["inclusionFilters"],
                scope="scope"
            )
        )
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vector_ingestion_configuration=wisdom.CfnKnowledgeBase.VectorIngestionConfigurationProperty(
        chunking_configuration=wisdom.CfnKnowledgeBase.ChunkingConfigurationProperty(
            chunking_strategy="chunkingStrategy",

            # the properties below are optional
            fixed_size_chunking_configuration=wisdom.CfnKnowledgeBase.FixedSizeChunkingConfigurationProperty(
                max_tokens=123,
                overlap_percentage=123
            ),
            hierarchical_chunking_configuration=wisdom.CfnKnowledgeBase.HierarchicalChunkingConfigurationProperty(
                level_configurations=[wisdom.CfnKnowledgeBase.HierarchicalChunkingLevelConfigurationProperty(
                    max_tokens=123
                )],
                overlap_tokens=123
            ),
            semantic_chunking_configuration=wisdom.CfnKnowledgeBase.SemanticChunkingConfigurationProperty(
                breakpoint_percentile_threshold=123,
                buffer_size=123,
                max_tokens=123
            )
        ),
        parsing_configuration=wisdom.CfnKnowledgeBase.ParsingConfigurationProperty(
            parsing_strategy="parsingStrategy",

            # the properties below are optional
            bedrock_foundation_model_configuration=wisdom.CfnKnowledgeBase.BedrockFoundationModelConfigurationProperty(
                model_arn="modelArn",

                # the properties below are optional
                parsing_prompt=wisdom.CfnKnowledgeBase.ParsingPromptProperty(
                    parsing_prompt_text="parsingPromptText"
                )
            )
        )
    )
)
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.wisdom.*;

CfnKnowledgeBaseProps cfnKnowledgeBaseProps = CfnKnowledgeBaseProps.builder()
        .knowledgeBaseType("knowledgeBaseType")
        .name("name")

        // the properties below are optional
        .description("description")
        .renderingConfiguration(RenderingConfigurationProperty.builder()
                .templateUri("templateUri")
                .build())
        .serverSideEncryptionConfiguration(ServerSideEncryptionConfigurationProperty.builder()
                .kmsKeyId("kmsKeyId")
                .build())
        .sourceConfiguration(SourceConfigurationProperty.builder()
                .appIntegrations(AppIntegrationsConfigurationProperty.builder()
                        .appIntegrationArn("appIntegrationArn")

                        // the properties below are optional
                        .objectFields(List.of("objectFields"))
                        .build())
                .managedSourceConfiguration(ManagedSourceConfigurationProperty.builder()
                        .webCrawlerConfiguration(WebCrawlerConfigurationProperty.builder()
                                .urlConfiguration(UrlConfigurationProperty.builder()
                                        .seedUrls(List.of(SeedUrlProperty.builder()
                                                .url("url")
                                                .build()))
                                        .build())

                                // the properties below are optional
                                .crawlerLimits(CrawlerLimitsProperty.builder()
                                        .rateLimit(123)
                                        .build())
                                .exclusionFilters(List.of("exclusionFilters"))
                                .inclusionFilters(List.of("inclusionFilters"))
                                .scope("scope")
                                .build())
                        .build())
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .vectorIngestionConfiguration(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())
                .parsingConfiguration(ParsingConfigurationProperty.builder()
                        .parsingStrategy("parsingStrategy")

                        // the properties below are optional
                        .bedrockFoundationModelConfiguration(BedrockFoundationModelConfigurationProperty.builder()
                                .modelArn("modelArn")

                                // the properties below are optional
                                .parsingPrompt(ParsingPromptProperty.builder()
                                        .parsingPromptText("parsingPromptText")
                                        .build())
                                .build())
                        .build())
                .build())
        .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.Wisdom;

var cfnKnowledgeBaseProps = new CfnKnowledgeBaseProps {
    KnowledgeBaseType = "knowledgeBaseType",
    Name = "name",

    // the properties below are optional
    Description = "description",
    RenderingConfiguration = new RenderingConfigurationProperty {
        TemplateUri = "templateUri"
    },
    ServerSideEncryptionConfiguration = new ServerSideEncryptionConfigurationProperty {
        KmsKeyId = "kmsKeyId"
    },
    SourceConfiguration = new SourceConfigurationProperty {
        AppIntegrations = new AppIntegrationsConfigurationProperty {
            AppIntegrationArn = "appIntegrationArn",

            // the properties below are optional
            ObjectFields = new [] { "objectFields" }
        },
        ManagedSourceConfiguration = new ManagedSourceConfigurationProperty {
            WebCrawlerConfiguration = new WebCrawlerConfigurationProperty {
                UrlConfiguration = new UrlConfigurationProperty {
                    SeedUrls = new [] { new SeedUrlProperty {
                        Url = "url"
                    } }
                },

                // the properties below are optional
                CrawlerLimits = new CrawlerLimitsProperty {
                    RateLimit = 123
                },
                ExclusionFilters = new [] { "exclusionFilters" },
                InclusionFilters = new [] { "inclusionFilters" },
                Scope = "scope"
            }
        }
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    VectorIngestionConfiguration = 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
            }
        },
        ParsingConfiguration = new ParsingConfigurationProperty {
            ParsingStrategy = "parsingStrategy",

            // the properties below are optional
            BedrockFoundationModelConfiguration = new BedrockFoundationModelConfigurationProperty {
                ModelArn = "modelArn",

                // the properties below are optional
                ParsingPrompt = new ParsingPromptProperty {
                    ParsingPromptText = "parsingPromptText"
                }
            }
        }
    }
};
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"

cfnKnowledgeBaseProps := &CfnKnowledgeBaseProps{
	KnowledgeBaseType: jsii.String("knowledgeBaseType"),
	Name: jsii.String("name"),

	// the properties below are optional
	Description: jsii.String("description"),
	RenderingConfiguration: &RenderingConfigurationProperty{
		TemplateUri: jsii.String("templateUri"),
	},
	ServerSideEncryptionConfiguration: &ServerSideEncryptionConfigurationProperty{
		KmsKeyId: jsii.String("kmsKeyId"),
	},
	SourceConfiguration: &SourceConfigurationProperty{
		AppIntegrations: &AppIntegrationsConfigurationProperty{
			AppIntegrationArn: jsii.String("appIntegrationArn"),

			// the properties below are optional
			ObjectFields: []*string{
				jsii.String("objectFields"),
			},
		},
		ManagedSourceConfiguration: &ManagedSourceConfigurationProperty{
			WebCrawlerConfiguration: &WebCrawlerConfigurationProperty{
				UrlConfiguration: &UrlConfigurationProperty{
					SeedUrls: []interface{}{
						&SeedUrlProperty{
							Url: jsii.String("url"),
						},
					},
				},

				// the properties below are optional
				CrawlerLimits: &CrawlerLimitsProperty{
					RateLimit: jsii.Number(123),
				},
				ExclusionFilters: []*string{
					jsii.String("exclusionFilters"),
				},
				InclusionFilters: []*string{
					jsii.String("inclusionFilters"),
				},
				Scope: jsii.String("scope"),
			},
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	VectorIngestionConfiguration: &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),
			},
		},
		ParsingConfiguration: &ParsingConfigurationProperty{
			ParsingStrategy: jsii.String("parsingStrategy"),

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

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

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
The description.
knowledgeBaseTypestringknowledge_base_typestrknowledgeBaseTypeStringKnowledgeBaseTypestringKnowledgeBaseType*stringrequired#
The type of knowledge base.

Only CUSTOM knowledge bases allow you to upload your own content. EXTERNAL knowledge bases support integrations with third-party systems whose content is synchronized automatically.

namestringnamestrnameStringNamestringName*stringrequired#
The name of the knowledge base.
renderingConfigurationoptionalIResolvable | CfnKnowledgeBase.RenderingConfigurationPropertyrendering_configurationoptionaltyping.Union[IResolvable, RenderingConfigurationProperty]renderingConfigurationoptionalIResolvableRenderingConfigurationoptionalIResolvableRenderingConfigurationoptionalinterface{}#
Information about how to render the content.
serverSideEncryptionConfigurationoptionalIResolvable | CfnKnowledgeBase.ServerSideEncryptionConfigurationPropertyserver_side_encryption_configurationoptionaltyping.Union[IResolvable, ServerSideEncryptionConfigurationProperty]serverSideEncryptionConfigurationoptionalIResolvableServerSideEncryptionConfigurationoptionalIResolvableServerSideEncryptionConfigurationoptionalinterface{}#
This customer managed key must have a policy that allows `kms:CreateGrant` and `kms:DescribeKey` permissions to the IAM identity using the key to invoke Wisdom.
notes

For more information about setting up a customer managed key for Wisdom, see Enable Connect Customer Wisdom for your instance . For information about valid ID values, see Key identifiers (KeyId) in the AWS Key Management Service Developer Guide .

sourceConfigurationoptionalIResolvable | CfnKnowledgeBase.SourceConfigurationPropertysource_configurationoptionaltyping.Union[IResolvable, SourceConfigurationProperty]sourceConfigurationoptionalIResolvableSourceConfigurationoptionalIResolvableSourceConfigurationoptionalinterface{}#
The source of the knowledge base content.

Only set this argument for EXTERNAL or Managed knowledge bases.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
The tags used to organize, track, or control access for this resource.
vectorIngestionConfigurationoptionalIResolvable | CfnKnowledgeBase.VectorIngestionConfigurationPropertyvector_ingestion_configurationoptionaltyping.Union[IResolvable, VectorIngestionConfigurationProperty]vectorIngestionConfigurationoptionalIResolvableVectorIngestionConfigurationoptionalIResolvableVectorIngestionConfigurationoptionalinterface{}#
Contains details about how to ingest the documents in a data source.