aws_sdk_opensearch/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    ///   - [`domain_name(impl Into<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::domain_name) / [`set_domain_name(Option<String>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_domain_name):<br>required: **true**<br><p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p><br>
7    ///   - [`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 index to create. Must be between 1 and 255 characters and follow OpenSearch naming conventions.</p><br>
8    ///   - [`index_schema(Document)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::index_schema) / [`set_index_schema(Option<Document>)`](crate::operation::create_index::builders::CreateIndexFluentBuilder::set_index_schema):<br>required: **true**<br><p>The JSON schema defining index mappings, settings, and semantic enrichment configuration. The schema specifies which text fields should be automatically enriched for semantic search capabilities and includes OpenSearch index configuration parameters.</p><br>
9    /// - On success, responds with [`CreateIndexOutput`](crate::operation::create_index::CreateIndexOutput) with field(s):
10    ///   - [`status(IndexStatus)`](crate::operation::create_index::CreateIndexOutput::status): <p>The status of the index creation operation.</p>
11    /// - On failure, responds with [`SdkError<CreateIndexError>`](crate::operation::create_index::CreateIndexError)
12    pub fn create_index(&self) -> crate::operation::create_index::builders::CreateIndexFluentBuilder {
13        crate::operation::create_index::builders::CreateIndexFluentBuilder::new(self.handle.clone())
14    }
15}