aws-sdk-datazone 1.136.0

AWS SDK for Amazon DataZone
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::put_data_export_configuration::_put_data_export_configuration_input::PutDataExportConfigurationInputBuilder;

pub use crate::operation::put_data_export_configuration::_put_data_export_configuration_output::PutDataExportConfigurationOutputBuilder;

impl crate::operation::put_data_export_configuration::builders::PutDataExportConfigurationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::put_data_export_configuration::PutDataExportConfigurationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::put_data_export_configuration::PutDataExportConfigurationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.put_data_export_configuration();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `PutDataExportConfiguration`.
///
/// <p>Creates data export configuration details.</p>
/// <p>If you want to temporarily disable export and later re-enable it for the same domain, use the <code>--no-enable-export</code> flag to disable and the <code>--enable-export</code> flag to re-enable. This preserves the configuration and allows you to re-enable export without deleting S3 table.</p><note>
/// <p>You can enable asset metadata export for only one domain per account per Region. To enable export for a different domain, complete the following steps:</p>
/// <ol>
/// <li>
/// <p>Delete the export configuration for the currently enabled domain using the DeleteDataExportConfiguration operation.</p></li>
/// <li>
/// <p>Delete the asset S3 table under the aws-sagemaker-catalog S3 table bucket. We recommend backing up the S3 table before deletion.</p></li>
/// <li>
/// <p>Call the PutDataExportConfiguration API to enable export for the new domain.</p></li>
/// </ol>
/// </note>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct PutDataExportConfigurationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::put_data_export_configuration::builders::PutDataExportConfigurationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::put_data_export_configuration::PutDataExportConfigurationOutput,
        crate::operation::put_data_export_configuration::PutDataExportConfigurationError,
    > for PutDataExportConfigurationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::put_data_export_configuration::PutDataExportConfigurationOutput,
            crate::operation::put_data_export_configuration::PutDataExportConfigurationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl PutDataExportConfigurationFluentBuilder {
    /// Creates a new `PutDataExportConfigurationFluentBuilder`.
    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 PutDataExportConfiguration as a reference.
    pub fn as_input(&self) -> &crate::operation::put_data_export_configuration::builders::PutDataExportConfigurationInputBuilder {
        &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::put_data_export_configuration::PutDataExportConfigurationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::put_data_export_configuration::PutDataExportConfigurationError,
            ::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::put_data_export_configuration::PutDataExportConfiguration::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::put_data_export_configuration::PutDataExportConfiguration::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::put_data_export_configuration::PutDataExportConfigurationOutput,
        crate::operation::put_data_export_configuration::PutDataExportConfigurationError,
        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 domain ID for which you want to create data export configuration details.</p>
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.domain_identifier(input.into());
        self
    }
    /// <p>The domain ID for which you want to create data export configuration details.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_domain_identifier(input);
        self
    }
    /// <p>The domain ID for which you want to create data export configuration details.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_domain_identifier()
    }
    /// <p>Specifies that the export is to be enabled as part of creating data export configuration details.</p>
    pub fn enable_export(mut self, input: bool) -> Self {
        self.inner = self.inner.enable_export(input);
        self
    }
    /// <p>Specifies that the export is to be enabled as part of creating data export configuration details.</p>
    pub fn set_enable_export(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_enable_export(input);
        self
    }
    /// <p>Specifies that the export is to be enabled as part of creating data export configuration details.</p>
    pub fn get_enable_export(&self) -> &::std::option::Option<bool> {
        self.inner.get_enable_export()
    }
    /// <p>The encryption configuration as part of creating data export configuration details.</p>
    /// <p>The KMS key provided here as part of encryptionConfiguration must have the required permissions as described in <a href="https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/sagemaker-unified-studio-export-asset-metadata-kms-permissions.html">KMS permissions for exporting asset metadata in Amazon SageMaker Unified Studio</a>.</p>
    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
        self.inner = self.inner.encryption_configuration(input);
        self
    }
    /// <p>The encryption configuration as part of creating data export configuration details.</p>
    /// <p>The KMS key provided here as part of encryptionConfiguration must have the required permissions as described in <a href="https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/sagemaker-unified-studio-export-asset-metadata-kms-permissions.html">KMS permissions for exporting asset metadata in Amazon SageMaker Unified Studio</a>.</p>
    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
        self.inner = self.inner.set_encryption_configuration(input);
        self
    }
    /// <p>The encryption configuration as part of creating data export configuration details.</p>
    /// <p>The KMS key provided here as part of encryptionConfiguration must have the required permissions as described in <a href="https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/sagemaker-unified-studio-export-asset-metadata-kms-permissions.html">KMS permissions for exporting asset metadata in Amazon SageMaker Unified Studio</a>.</p>
    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
        self.inner.get_encryption_configuration()
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</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>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</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>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
}