aws-sdk-resourceexplorer2 1.102.0

AWS SDK for AWS Resource Explorer
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_resource_explorer_setup::_create_resource_explorer_setup_input::CreateResourceExplorerSetupInputBuilder;

pub use crate::operation::create_resource_explorer_setup::_create_resource_explorer_setup_output::CreateResourceExplorerSetupOutputBuilder;

impl crate::operation::create_resource_explorer_setup::builders::CreateResourceExplorerSetupInputBuilder {
    /// 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_resource_explorer_setup::CreateResourceExplorerSetupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_resource_explorer_setup::CreateResourceExplorerSetupError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_resource_explorer_setup();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateResourceExplorerSetup`.
///
/// <p>Creates a Resource Explorer setup configuration across multiple Amazon Web Services Regions. This operation sets up indexes and views in the specified Regions. This operation can also be used to set an aggregator Region for cross-Region resource search.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateResourceExplorerSetupFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_resource_explorer_setup::builders::CreateResourceExplorerSetupInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_resource_explorer_setup::CreateResourceExplorerSetupOutput,
        crate::operation::create_resource_explorer_setup::CreateResourceExplorerSetupError,
    > for CreateResourceExplorerSetupFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_resource_explorer_setup::CreateResourceExplorerSetupOutput,
            crate::operation::create_resource_explorer_setup::CreateResourceExplorerSetupError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateResourceExplorerSetupFluentBuilder {
    /// Creates a new `CreateResourceExplorerSetupFluentBuilder`.
    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 CreateResourceExplorerSetup as a reference.
    pub fn as_input(&self) -> &crate::operation::create_resource_explorer_setup::builders::CreateResourceExplorerSetupInputBuilder {
        &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_resource_explorer_setup::CreateResourceExplorerSetupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_resource_explorer_setup::CreateResourceExplorerSetupError,
            ::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_resource_explorer_setup::CreateResourceExplorerSetup::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_resource_explorer_setup::CreateResourceExplorerSetup::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_resource_explorer_setup::CreateResourceExplorerSetupOutput,
        crate::operation::create_resource_explorer_setup::CreateResourceExplorerSetupError,
        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
    }
    ///
    /// Appends an item to `RegionList`.
    ///
    /// To override the contents of this collection use [`set_region_list`](Self::set_region_list).
    ///
    /// <p>A list of Amazon Web Services Regions where Resource Explorer should be configured. Each Region in the list will have a user-owned index created.</p>
    pub fn region_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.region_list(input.into());
        self
    }
    /// <p>A list of Amazon Web Services Regions where Resource Explorer should be configured. Each Region in the list will have a user-owned index created.</p>
    pub fn set_region_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_region_list(input);
        self
    }
    /// <p>A list of Amazon Web Services Regions where Resource Explorer should be configured. Each Region in the list will have a user-owned index created.</p>
    pub fn get_region_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_region_list()
    }
    ///
    /// Appends an item to `AggregatorRegions`.
    ///
    /// To override the contents of this collection use [`set_aggregator_regions`](Self::set_aggregator_regions).
    ///
    /// <p>A list of Amazon Web Services Regions that should be configured as aggregator Regions. Aggregator Regions receive replicated index information from all other Regions where there is a user-owned index.</p>
    pub fn aggregator_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.aggregator_regions(input.into());
        self
    }
    /// <p>A list of Amazon Web Services Regions that should be configured as aggregator Regions. Aggregator Regions receive replicated index information from all other Regions where there is a user-owned index.</p>
    pub fn set_aggregator_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_aggregator_regions(input);
        self
    }
    /// <p>A list of Amazon Web Services Regions that should be configured as aggregator Regions. Aggregator Regions receive replicated index information from all other Regions where there is a user-owned index.</p>
    pub fn get_aggregator_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_aggregator_regions()
    }
    /// <p>The name for the view to be created as part of the Resource Explorer setup. The view name must be unique within the Amazon Web Services account and Region.</p>
    pub fn view_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.view_name(input.into());
        self
    }
    /// <p>The name for the view to be created as part of the Resource Explorer setup. The view name must be unique within the Amazon Web Services account and Region.</p>
    pub fn set_view_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_view_name(input);
        self
    }
    /// <p>The name for the view to be created as part of the Resource Explorer setup. The view name must be unique within the Amazon Web Services account and Region.</p>
    pub fn get_view_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_view_name()
    }
}