aws-sdk-opensearch 1.112.0

AWS SDK for Amazon OpenSearch Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_application::_create_application_output::CreateApplicationOutputBuilder;

pub use crate::operation::create_application::_create_application_input::CreateApplicationInputBuilder;

impl crate::operation::create_application::builders::CreateApplicationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_application::CreateApplicationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_application::CreateApplicationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_application();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateApplication`.
///
/// <p>Creates an OpenSearch UI application. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/application.html">Using the OpenSearch user interface in Amazon OpenSearch Service</a>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateApplicationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_application::builders::CreateApplicationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_application::CreateApplicationOutput,
        crate::operation::create_application::CreateApplicationError,
    > for CreateApplicationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_application::CreateApplicationOutput,
            crate::operation::create_application::CreateApplicationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateApplicationFluentBuilder {
    /// Creates a new `CreateApplicationFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the CreateApplication as a reference.
    pub fn as_input(&self) -> &crate::operation::create_application::builders::CreateApplicationInputBuilder {
        &self.inner
    }
    /// 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](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_application::CreateApplicationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_application::CreateApplicationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::create_application::CreateApplication::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_application::CreateApplication::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::create_application::CreateApplicationOutput,
        crate::operation::create_application::CreateApplicationError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// <p>The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    ///
    /// Appends an item to `dataSources`.
    ///
    /// To override the contents of this collection use [`set_data_sources`](Self::set_data_sources).
    ///
    /// <p>The data sources to link to the OpenSearch application.</p>
    pub fn data_sources(mut self, input: crate::types::DataSource) -> Self {
        self.inner = self.inner.data_sources(input);
        self
    }
    /// <p>The data sources to link to the OpenSearch application.</p>
    pub fn set_data_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>) -> Self {
        self.inner = self.inner.set_data_sources(input);
        self
    }
    /// <p>The data sources to link to the OpenSearch application.</p>
    pub fn get_data_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataSource>> {
        self.inner.get_data_sources()
    }
    /// <p>Configuration settings for integrating Amazon Web Services IAM Identity Center with the OpenSearch application.</p>
    pub fn iam_identity_center_options(mut self, input: crate::types::IamIdentityCenterOptionsInput) -> Self {
        self.inner = self.inner.iam_identity_center_options(input);
        self
    }
    /// <p>Configuration settings for integrating Amazon Web Services IAM Identity Center with the OpenSearch application.</p>
    pub fn set_iam_identity_center_options(mut self, input: ::std::option::Option<crate::types::IamIdentityCenterOptionsInput>) -> Self {
        self.inner = self.inner.set_iam_identity_center_options(input);
        self
    }
    /// <p>Configuration settings for integrating Amazon Web Services IAM Identity Center with the OpenSearch application.</p>
    pub fn get_iam_identity_center_options(&self) -> &::std::option::Option<crate::types::IamIdentityCenterOptionsInput> {
        self.inner.get_iam_identity_center_options()
    }
    ///
    /// Appends an item to `appConfigs`.
    ///
    /// To override the contents of this collection use [`set_app_configs`](Self::set_app_configs).
    ///
    /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
    pub fn app_configs(mut self, input: crate::types::AppConfig) -> Self {
        self.inner = self.inner.app_configs(input);
        self
    }
    /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
    pub fn set_app_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>) -> Self {
        self.inner = self.inner.set_app_configs(input);
        self
    }
    /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
    pub fn get_app_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AppConfig>> {
        self.inner.get_app_configs()
    }
    ///
    /// Appends an item to `tagList`.
    ///
    /// To override the contents of this collection use [`set_tag_list`](Self::set_tag_list).
    ///
    /// <p>A list of tags attached to a domain.</p>
    pub fn tag_list(mut self, input: crate::types::Tag) -> Self {
        self.inner = self.inner.tag_list(input);
        self
    }
    /// <p>A list of tags attached to a domain.</p>
    pub fn set_tag_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.inner = self.inner.set_tag_list(input);
        self
    }
    /// <p>A list of tags attached to a domain.</p>
    pub fn get_tag_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        self.inner.get_tag_list()
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>
    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.kms_key_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>
    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_kms_key_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>
    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_kms_key_arn()
    }
}