AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Agents for Amazon Bedrock CreateKnowledgeBase API operation.

Syntax

New-AABKnowledgeBase
-Name <String>
-OpensearchServerlessConfiguration_CollectionArn <String>
-MongoDbAtlasConfiguration_CollectionName <String>
-PineconeConfiguration_ConnectionString <String>
-MongoDbAtlasConfiguration_CredentialsSecretArn <String>
-PineconeConfiguration_CredentialsSecretArn <String>
-RdsConfiguration_CredentialsSecretArn <String>
-RedisEnterpriseCloudConfiguration_CredentialsSecretArn <String>
-MongoDbAtlasConfiguration_DatabaseName <String>
-RdsConfiguration_DatabaseName <String>
-Description <String>
-BedrockEmbeddingModelConfiguration_Dimension <Int32>
-VectorKnowledgeBaseConfiguration_EmbeddingModelArn <String>
-MongoDbAtlasConfiguration_Endpoint <String>
-RedisEnterpriseCloudConfiguration_Endpoint <String>
-MongoDbAtlasConfiguration_EndpointServiceName <String>
-StorageConfiguration_MongoDbAtlasConfiguration_FieldMapping_MetadataField <String>
-StorageConfiguration_OpensearchServerlessConfiguration_FieldMapping_MetadataField <String>
-StorageConfiguration_PineconeConfiguration_FieldMapping_MetadataField <String>
-FieldMapping_MetadataField <String>
-StorageConfiguration_RedisEnterpriseCloudConfiguration_FieldMapping_MetadataField <String>
-PineconeConfiguration_Namespace <String>
-FieldMapping_PrimaryKeyField <String>
-RdsConfiguration_ResourceArn <String>
-RoleArn <String>
-RdsConfiguration_TableName <String>
-Tag <Hashtable>
-StorageConfiguration_MongoDbAtlasConfiguration_FieldMapping_TextField <String>
-StorageConfiguration_OpensearchServerlessConfiguration_FieldMapping_TextField <String>
-StorageConfiguration_PineconeConfiguration_FieldMapping_TextField <String>
-FieldMapping_TextField <String>
-StorageConfiguration_RedisEnterpriseCloudConfiguration_FieldMapping_TextField <String>
-KnowledgeBaseConfiguration_Type <KnowledgeBaseType>
-StorageConfiguration_Type <KnowledgeBaseStorageType>
-StorageConfiguration_MongoDbAtlasConfiguration_FieldMapping_VectorField <String>
-StorageConfiguration_OpensearchServerlessConfiguration_FieldMapping_VectorField <String>
-FieldMapping_VectorField <String>
-StorageConfiguration_RedisEnterpriseCloudConfiguration_FieldMapping_VectorField <String>
-MongoDbAtlasConfiguration_VectorIndexName <String>
-OpensearchServerlessConfiguration_VectorIndexName <String>
-RedisEnterpriseCloudConfiguration_VectorIndexName <String>
-ClientToken <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonBedrockAgentConfig>

Description

Creates a knowledge base. A knowledge base contains your data sources so that Large Language Models (LLMs) can use your data. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see Set up a knowledge base. If you prefer to let Amazon Bedrock create and manage a vector store for you in Amazon OpenSearch Service, use the console. For more information, see Create a knowledge base.
  • Provide the name and an optional description.
  • Provide the Amazon Resource Name (ARN) with permissions to create a knowledge base in the roleArn field.
  • Provide the embedding model to use in the embeddingModelArn field in the knowledgeBaseConfiguration object.
  • Provide the configuration for your vector store in the storageConfiguration object.

Parameters

-BedrockEmbeddingModelConfiguration_Dimension <Int32>
The dimensions details for the vector configuration used on the Bedrock embeddings model.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesKnowledgeBaseConfiguration_VectorKnowledgeBaseConfiguration_EmbeddingModelConfiguration_BedrockEmbeddingModelConfiguration_Dimensions
-ClientConfig <AmazonBedrockAgentConfig>
Amazon.PowerShell.Cmdlets.AAB.AmazonBedrockAgentClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientToken <String>
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Description <String>
A description of the knowledge base.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FieldMapping_MetadataField <String>
The name of the field in which Amazon Bedrock stores metadata about the vector store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RdsConfiguration_FieldMapping_MetadataField
-FieldMapping_PrimaryKeyField <String>
The name of the field in which Amazon Bedrock stores the ID for each entry.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RdsConfiguration_FieldMapping_PrimaryKeyField
-FieldMapping_TextField <String>
The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RdsConfiguration_FieldMapping_TextField
-FieldMapping_VectorField <String>
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RdsConfiguration_FieldMapping_VectorField
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-KnowledgeBaseConfiguration_Type <KnowledgeBaseType>
The type of data that the data source is converted into for the knowledge base.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-MongoDbAtlasConfiguration_CollectionName <String>
The collection name of the knowledge base in MongoDB Atlas.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_MongoDbAtlasConfiguration_CollectionName
-MongoDbAtlasConfiguration_CredentialsSecretArn <String>
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_MongoDbAtlasConfiguration_CredentialsSecretArn
-MongoDbAtlasConfiguration_DatabaseName <String>
The database name in your MongoDB Atlas cluster for your knowledge base.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_MongoDbAtlasConfiguration_DatabaseName
-MongoDbAtlasConfiguration_Endpoint <String>
The endpoint URL of your MongoDB Atlas cluster for your knowledge base.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_MongoDbAtlasConfiguration_Endpoint
-MongoDbAtlasConfiguration_EndpointServiceName <String>
The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_MongoDbAtlasConfiguration_EndpointServiceName
-MongoDbAtlasConfiguration_VectorIndexName <String>
The name of the MongoDB Atlas vector search index.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_MongoDbAtlasConfiguration_VectorIndexName
-Name <String>
A name for the knowledge base.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-OpensearchServerlessConfiguration_CollectionArn <String>
The Amazon Resource Name (ARN) of the OpenSearch Service vector store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_OpensearchServerlessConfiguration_CollectionArn
-OpensearchServerlessConfiguration_VectorIndexName <String>
The name of the vector store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_OpensearchServerlessConfiguration_VectorIndexName
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the Name parameter. The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PineconeConfiguration_ConnectionString <String>
The endpoint URL for your index management page.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_PineconeConfiguration_ConnectionString
-PineconeConfiguration_CredentialsSecretArn <String>
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_PineconeConfiguration_CredentialsSecretArn
-PineconeConfiguration_Namespace <String>
The namespace to be used to write new data to your database.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_PineconeConfiguration_Namespace
-RdsConfiguration_CredentialsSecretArn <String>
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RdsConfiguration_CredentialsSecretArn
-RdsConfiguration_DatabaseName <String>
The name of your Amazon RDS database.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RdsConfiguration_DatabaseName
-RdsConfiguration_ResourceArn <String>
The Amazon Resource Name (ARN) of the vector store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RdsConfiguration_ResourceArn
-RdsConfiguration_TableName <String>
The name of the table in the database.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RdsConfiguration_TableName
-RedisEnterpriseCloudConfiguration_CredentialsSecretArn <String>
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RedisEnterpriseCloudConfiguration_CredentialsSecretArn
-RedisEnterpriseCloudConfiguration_Endpoint <String>
The endpoint URL of the Redis Enterprise Cloud database.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RedisEnterpriseCloudConfiguration_Endpoint
-RedisEnterpriseCloudConfiguration_VectorIndexName <String>
The name of the vector index.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStorageConfiguration_RedisEnterpriseCloudConfiguration_VectorIndexName
-RoleArn <String>
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'KnowledgeBase'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BedrockAgent.Model.CreateKnowledgeBaseResponse). Specifying the name of a property of type Amazon.BedrockAgent.Model.CreateKnowledgeBaseResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_MongoDbAtlasConfiguration_FieldMapping_MetadataField <String>
The name of the field in which Amazon Bedrock stores metadata about the vector store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_MongoDbAtlasConfiguration_FieldMapping_TextField <String>
The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_MongoDbAtlasConfiguration_FieldMapping_VectorField <String>
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_OpensearchServerlessConfiguration_FieldMapping_MetadataField <String>
The name of the field in which Amazon Bedrock stores metadata about the vector store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_OpensearchServerlessConfiguration_FieldMapping_TextField <String>
The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_OpensearchServerlessConfiguration_FieldMapping_VectorField <String>
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_PineconeConfiguration_FieldMapping_MetadataField <String>
The name of the field in which Amazon Bedrock stores metadata about the vector store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_PineconeConfiguration_FieldMapping_TextField <String>
The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_RedisEnterpriseCloudConfiguration_FieldMapping_MetadataField <String>
The name of the field in which Amazon Bedrock stores metadata about the vector store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_RedisEnterpriseCloudConfiguration_FieldMapping_TextField <String>
The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_RedisEnterpriseCloudConfiguration_FieldMapping_VectorField <String>
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StorageConfiguration_Type <KnowledgeBaseStorageType>
The vector store service in which the knowledge base is stored.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Tag <Hashtable>
Specify the key-value pairs for the tags that you want to attach to your knowledge base in this object.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-VectorKnowledgeBaseConfiguration_EmbeddingModelArn <String>
The Amazon Resource Name (ARN) of the model or inference profile used to create vector embeddings for the knowledge base.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesKnowledgeBaseConfiguration_VectorKnowledgeBaseConfiguration_EmbeddingModelArn

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.BedrockAgent.Model.KnowledgeBase object. The service call response (type Amazon.BedrockAgent.Model.CreateKnowledgeBaseResponse) can be returned by specifying '-Select *'.

Supported Version

AWS Tools for PowerShell: 2.x.y.z