aws-sdk-redshiftserverless 1.103.0

AWS SDK for Redshift Serverless
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_lakehouse_configuration::_update_lakehouse_configuration_input::UpdateLakehouseConfigurationInputBuilder;

pub use crate::operation::update_lakehouse_configuration::_update_lakehouse_configuration_output::UpdateLakehouseConfigurationOutputBuilder;

impl crate::operation::update_lakehouse_configuration::builders::UpdateLakehouseConfigurationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_lakehouse_configuration::UpdateLakehouseConfigurationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_lakehouse_configuration::UpdateLakehouseConfigurationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_lakehouse_configuration();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateLakehouseConfiguration`.
///
/// <p>Modifies the lakehouse configuration for a namespace. This operation allows you to manage Amazon Redshift federated permissions and Amazon Web Services IAM Identity Center trusted identity propagation.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateLakehouseConfigurationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_lakehouse_configuration::builders::UpdateLakehouseConfigurationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_lakehouse_configuration::UpdateLakehouseConfigurationOutput,
        crate::operation::update_lakehouse_configuration::UpdateLakehouseConfigurationError,
    > for UpdateLakehouseConfigurationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_lakehouse_configuration::UpdateLakehouseConfigurationOutput,
            crate::operation::update_lakehouse_configuration::UpdateLakehouseConfigurationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateLakehouseConfigurationFluentBuilder {
    /// Creates a new `UpdateLakehouseConfigurationFluentBuilder`.
    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 UpdateLakehouseConfiguration as a reference.
    pub fn as_input(&self) -> &crate::operation::update_lakehouse_configuration::builders::UpdateLakehouseConfigurationInputBuilder {
        &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::update_lakehouse_configuration::UpdateLakehouseConfigurationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_lakehouse_configuration::UpdateLakehouseConfigurationError,
            ::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::update_lakehouse_configuration::UpdateLakehouseConfiguration::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_lakehouse_configuration::UpdateLakehouseConfiguration::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::update_lakehouse_configuration::UpdateLakehouseConfigurationOutput,
        crate::operation::update_lakehouse_configuration::UpdateLakehouseConfigurationError,
        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>The name of the namespace whose lakehouse configuration you want to modify.</p>
    pub fn namespace_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.namespace_name(input.into());
        self
    }
    /// <p>The name of the namespace whose lakehouse configuration you want to modify.</p>
    pub fn set_namespace_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_namespace_name(input);
        self
    }
    /// <p>The name of the namespace whose lakehouse configuration you want to modify.</p>
    pub fn get_namespace_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_namespace_name()
    }
    /// <p>Specifies whether to register or deregister the namespace with Amazon Redshift federated permissions. Valid values are <code>Register</code> or <code>Deregister</code>.</p>
    pub fn lakehouse_registration(mut self, input: crate::types::LakehouseRegistration) -> Self {
        self.inner = self.inner.lakehouse_registration(input);
        self
    }
    /// <p>Specifies whether to register or deregister the namespace with Amazon Redshift federated permissions. Valid values are <code>Register</code> or <code>Deregister</code>.</p>
    pub fn set_lakehouse_registration(mut self, input: ::std::option::Option<crate::types::LakehouseRegistration>) -> Self {
        self.inner = self.inner.set_lakehouse_registration(input);
        self
    }
    /// <p>Specifies whether to register or deregister the namespace with Amazon Redshift federated permissions. Valid values are <code>Register</code> or <code>Deregister</code>.</p>
    pub fn get_lakehouse_registration(&self) -> &::std::option::Option<crate::types::LakehouseRegistration> {
        self.inner.get_lakehouse_registration()
    }
    /// <p>The name of the Glue Data Catalog that will be associated with the namespace enabled with Amazon Redshift federated permissions.</p>
    /// <p>Pattern: <code>^\[a-z0-9_-\]*\[a-z\]+\[a-z0-9_-\]*$</code></p>
    pub fn catalog_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.catalog_name(input.into());
        self
    }
    /// <p>The name of the Glue Data Catalog that will be associated with the namespace enabled with Amazon Redshift federated permissions.</p>
    /// <p>Pattern: <code>^\[a-z0-9_-\]*\[a-z\]+\[a-z0-9_-\]*$</code></p>
    pub fn set_catalog_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_catalog_name(input);
        self
    }
    /// <p>The name of the Glue Data Catalog that will be associated with the namespace enabled with Amazon Redshift federated permissions.</p>
    /// <p>Pattern: <code>^\[a-z0-9_-\]*\[a-z\]+\[a-z0-9_-\]*$</code></p>
    pub fn get_catalog_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_catalog_name()
    }
    /// <p>Modifies the Amazon Web Services IAM Identity Center trusted identity propagation on a namespace enabled with Amazon Redshift federated permissions. Valid values are <code>Associate</code> or <code>Disassociate</code>.</p>
    pub fn lakehouse_idc_registration(mut self, input: crate::types::LakehouseIdcRegistration) -> Self {
        self.inner = self.inner.lakehouse_idc_registration(input);
        self
    }
    /// <p>Modifies the Amazon Web Services IAM Identity Center trusted identity propagation on a namespace enabled with Amazon Redshift federated permissions. Valid values are <code>Associate</code> or <code>Disassociate</code>.</p>
    pub fn set_lakehouse_idc_registration(mut self, input: ::std::option::Option<crate::types::LakehouseIdcRegistration>) -> Self {
        self.inner = self.inner.set_lakehouse_idc_registration(input);
        self
    }
    /// <p>Modifies the Amazon Web Services IAM Identity Center trusted identity propagation on a namespace enabled with Amazon Redshift federated permissions. Valid values are <code>Associate</code> or <code>Disassociate</code>.</p>
    pub fn get_lakehouse_idc_registration(&self) -> &::std::option::Option<crate::types::LakehouseIdcRegistration> {
        self.inner.get_lakehouse_idc_registration()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM Identity Center application used for enabling Amazon Web Services IAM Identity Center trusted identity propagation on a namespace enabled with Amazon Redshift federated permissions.</p>
    pub fn lakehouse_idc_application_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.lakehouse_idc_application_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM Identity Center application used for enabling Amazon Web Services IAM Identity Center trusted identity propagation on a namespace enabled with Amazon Redshift federated permissions.</p>
    pub fn set_lakehouse_idc_application_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_lakehouse_idc_application_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM Identity Center application used for enabling Amazon Web Services IAM Identity Center trusted identity propagation on a namespace enabled with Amazon Redshift federated permissions.</p>
    pub fn get_lakehouse_idc_application_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_lakehouse_idc_application_arn()
    }
    /// <p>A boolean value that, if <code>true</code>, validates the request without actually updating the lakehouse configuration. Use this to check for errors before making changes.</p>
    pub fn dry_run(mut self, input: bool) -> Self {
        self.inner = self.inner.dry_run(input);
        self
    }
    /// <p>A boolean value that, if <code>true</code>, validates the request without actually updating the lakehouse configuration. Use this to check for errors before making changes.</p>
    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_dry_run(input);
        self
    }
    /// <p>A boolean value that, if <code>true</code>, validates the request without actually updating the lakehouse configuration. Use this to check for errors before making changes.</p>
    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
        self.inner.get_dry_run()
    }
}