Struct aws_sdk_bedrockagent::operation::create_knowledge_base::builders::CreateKnowledgeBaseFluentBuilder
source · pub struct CreateKnowledgeBaseFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateKnowledgeBase
.
Creates a knowledge base that contains data sources from which information can be queried and used by LLMs. 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 your data for ingestion.
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 optionaldescription
. -
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 theknowledgeBaseConfiguration
object. -
Provide the configuration for your vector store in the
storageConfiguration
object.-
For an Amazon OpenSearch Service database, use the
opensearchServerlessConfiguration
object. For more information, see Create a vector store in Amazon OpenSearch Service. -
For an Amazon Aurora database, use the
RdsConfiguration
object. For more information, see Create a vector store in Amazon Aurora. -
For a Pinecone database, use the
pineconeConfiguration
object. For more information, see Create a vector store in Pinecone. -
For a Redis Enterprise Cloud database, use the
redisEnterpriseCloudConfiguration
object. For more information, see Create a vector store in Redis Enterprise Cloud.
-
Implementations§
source§impl CreateKnowledgeBaseFluentBuilder
impl CreateKnowledgeBaseFluentBuilder
sourcepub fn as_input(&self) -> &CreateKnowledgeBaseInputBuilder
pub fn as_input(&self) -> &CreateKnowledgeBaseInputBuilder
Access the CreateKnowledgeBase as a reference.
sourcepub async fn send(
self
) -> Result<CreateKnowledgeBaseOutput, SdkError<CreateKnowledgeBaseError, HttpResponse>>
pub async fn send( self ) -> Result<CreateKnowledgeBaseOutput, SdkError<CreateKnowledgeBaseError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<CreateKnowledgeBaseOutput, CreateKnowledgeBaseError, Self>
pub fn customize( self ) -> CustomizableOperation<CreateKnowledgeBaseOutput, CreateKnowledgeBaseError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
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.
sourcepub fn get_client_token(&self) -> &Option<String>
pub fn get_client_token(&self) -> &Option<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.
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description of the knowledge base.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description of the knowledge base.
sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
A description of the knowledge base.
sourcepub fn role_arn(self, input: impl Into<String>) -> Self
pub fn role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
sourcepub fn set_role_arn(self, input: Option<String>) -> Self
pub fn set_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
sourcepub fn get_role_arn(&self) -> &Option<String>
pub fn get_role_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
sourcepub fn knowledge_base_configuration(
self,
input: KnowledgeBaseConfiguration
) -> Self
pub fn knowledge_base_configuration( self, input: KnowledgeBaseConfiguration ) -> Self
Contains details about the embeddings model used for the knowledge base.
sourcepub fn set_knowledge_base_configuration(
self,
input: Option<KnowledgeBaseConfiguration>
) -> Self
pub fn set_knowledge_base_configuration( self, input: Option<KnowledgeBaseConfiguration> ) -> Self
Contains details about the embeddings model used for the knowledge base.
sourcepub fn get_knowledge_base_configuration(
&self
) -> &Option<KnowledgeBaseConfiguration>
pub fn get_knowledge_base_configuration( &self ) -> &Option<KnowledgeBaseConfiguration>
Contains details about the embeddings model used for the knowledge base.
sourcepub fn storage_configuration(self, input: StorageConfiguration) -> Self
pub fn storage_configuration(self, input: StorageConfiguration) -> Self
Contains details about the configuration of the vector database used for the knowledge base.
sourcepub fn set_storage_configuration(
self,
input: Option<StorageConfiguration>
) -> Self
pub fn set_storage_configuration( self, input: Option<StorageConfiguration> ) -> Self
Contains details about the configuration of the vector database used for the knowledge base.
sourcepub fn get_storage_configuration(&self) -> &Option<StorageConfiguration>
pub fn get_storage_configuration(&self) -> &Option<StorageConfiguration>
Contains details about the configuration of the vector database used for the knowledge base.
Adds a key-value pair to tags
.
To override the contents of this collection use set_tags
.
Specify the key-value pairs for the tags that you want to attach to your knowledge base in this object.
Specify the key-value pairs for the tags that you want to attach to your knowledge base in this object.
Specify the key-value pairs for the tags that you want to attach to your knowledge base in this object.
Trait Implementations§
source§impl Clone for CreateKnowledgeBaseFluentBuilder
impl Clone for CreateKnowledgeBaseFluentBuilder
source§fn clone(&self) -> CreateKnowledgeBaseFluentBuilder
fn clone(&self) -> CreateKnowledgeBaseFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for CreateKnowledgeBaseFluentBuilder
impl !RefUnwindSafe for CreateKnowledgeBaseFluentBuilder
impl Send for CreateKnowledgeBaseFluentBuilder
impl Sync for CreateKnowledgeBaseFluentBuilder
impl Unpin for CreateKnowledgeBaseFluentBuilder
impl !UnwindSafe for CreateKnowledgeBaseFluentBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more