aws_sdk_s3vectors/client/
create_index.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateIndex`](crate::operation::create_index::builders::CreateIndexFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`vector_bucket_name(impl Into<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::vector_bucket_name) / [`set_vector_bucket_name(Option<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_vector_bucket_name):<br>required: **false**<br><p>The name of the vector bucket to create the vector index in.</p><br>
7    ///   - [`vector_bucket_arn(impl Into<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::vector_bucket_arn) / [`set_vector_bucket_arn(Option<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_vector_bucket_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the vector bucket to create the vector index in.</p><br>
8    ///   - [`index_name(impl Into<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::index_name) / [`set_index_name(Option<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_index_name):<br>required: **true**<br><p>The name of the vector index to create.</p><br>
9    ///   - [`data_type(DataType)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::data_type) / [`set_data_type(Option<DataType>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_data_type):<br>required: **true**<br><p>The data type of the vectors to be inserted into the vector index.</p><br>
10    ///   - [`dimension(i32)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::dimension) / [`set_dimension(Option<i32>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_dimension):<br>required: **true**<br><p>The dimensions of the vectors to be inserted into the vector index.</p><br>
11    ///   - [`distance_metric(DistanceMetric)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::distance_metric) / [`set_distance_metric(Option<DistanceMetric>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_distance_metric):<br>required: **true**<br><p>The distance metric to be used for similarity search.</p><br>
12    ///   - [`metadata_configuration(MetadataConfiguration)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::metadata_configuration) / [`set_metadata_configuration(Option<MetadataConfiguration>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_metadata_configuration):<br>required: **false**<br><p>The metadata configuration for the vector index.</p><br>
13    ///   - [`encryption_configuration(EncryptionConfiguration)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::encryption_configuration) / [`set_encryption_configuration(Option<EncryptionConfiguration>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_encryption_configuration):<br>required: **false**<br><p>The encryption configuration for a vector index. By default, if you don't specify, all new vectors in the vector index will use the encryption configuration of the vector bucket.</p><br>
14    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_tags):<br>required: **false**<br><p>An array of user-defined tags that you would like to apply to the vector index that you are creating. A tag is a key-value pair that you apply to your resources. Tags can help you organize, track costs, and control access to resources. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Tagging for cost allocation or attribute-based access control (ABAC)</a>.</p><note>  <p>You must have the <code>s3vectors:TagResource</code> permission in addition to <code>s3vectors:CreateIndex</code> permission to create a vector index with tags.</p> </note><br>
15    /// - On success, responds with [`CreateIndexOutput`](crate::operation::create_index::CreateIndexOutput) with field(s):
16    ///   - [`index_arn(Option<String>)`](crate::operation::create_index::CreateIndexOutput::index_arn): <p>The Amazon Resource Name (ARN) of the newly created vector index.</p>
17    /// - On failure, responds with [`SdkError<CreateIndexError>`](crate::operation::create_index::CreateIndexError)
18    pub fn create_index(&self) -> crate::operation::create_index::builders::CreateIndexFluentBuilder {
19        crate::operation::create_index::builders::CreateIndexFluentBuilder::new(self.handle.clone())
20    }
21}