aws-sdk-quicksight 1.130.0

AWS SDK for Amazon QuickSight
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::start_asset_bundle_import_job::_start_asset_bundle_import_job_input::StartAssetBundleImportJobInputBuilder;

pub use crate::operation::start_asset_bundle_import_job::_start_asset_bundle_import_job_output::StartAssetBundleImportJobOutputBuilder;

impl crate::operation::start_asset_bundle_import_job::builders::StartAssetBundleImportJobInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJobOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJobError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.start_asset_bundle_import_job();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `StartAssetBundleImportJob`.
///
/// <p>Starts an Asset Bundle import job.</p>
/// <p>An Asset Bundle import job imports specified Amazon Quick Sight assets into an Amazon Quick Sight account. You can also choose to import a naming prefix and specified configuration overrides. The assets that are contained in the bundle file that you provide are used to create or update a new or existing asset in your Amazon Quick Sight account. Each Amazon Quick Sight account can run up to 5 import jobs concurrently.</p>
/// <p>The API caller must have the necessary <code>"create"</code>, <code>"describe"</code>, and <code>"update"</code> permissions in their IAM role to access each resource type that is contained in the bundle file before the resources can be imported.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct StartAssetBundleImportJobFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::start_asset_bundle_import_job::builders::StartAssetBundleImportJobInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJobOutput,
        crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJobError,
    > for StartAssetBundleImportJobFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJobOutput,
            crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJobError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl StartAssetBundleImportJobFluentBuilder {
    /// Creates a new `StartAssetBundleImportJobFluentBuilder`.
    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 StartAssetBundleImportJob as a reference.
    pub fn as_input(&self) -> &crate::operation::start_asset_bundle_import_job::builders::StartAssetBundleImportJobInputBuilder {
        &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::start_asset_bundle_import_job::StartAssetBundleImportJobOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJobError,
            ::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::start_asset_bundle_import_job::StartAssetBundleImportJob::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJob::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::start_asset_bundle_import_job::StartAssetBundleImportJobOutput,
        crate::operation::start_asset_bundle_import_job::StartAssetBundleImportJobError,
        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 ID of the Amazon Web Services account to import assets into.</p>
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.aws_account_id(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account to import assets into.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_aws_account_id(input);
        self
    }
    /// <p>The ID of the Amazon Web Services account to import assets into.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_aws_account_id()
    }
    /// <p>The ID of the job. This ID is unique while the job is running. After the job is completed, you can reuse this ID for another job.</p>
    pub fn asset_bundle_import_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.asset_bundle_import_job_id(input.into());
        self
    }
    /// <p>The ID of the job. This ID is unique while the job is running. After the job is completed, you can reuse this ID for another job.</p>
    pub fn set_asset_bundle_import_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_asset_bundle_import_job_id(input);
        self
    }
    /// <p>The ID of the job. This ID is unique while the job is running. After the job is completed, you can reuse this ID for another job.</p>
    pub fn get_asset_bundle_import_job_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_asset_bundle_import_job_id()
    }
    /// <p>The source of the asset bundle zip file that contains the data that you want to import. The file must be in <code>QUICKSIGHT_JSON</code> format.</p>
    pub fn asset_bundle_import_source(mut self, input: crate::types::AssetBundleImportSource) -> Self {
        self.inner = self.inner.asset_bundle_import_source(input);
        self
    }
    /// <p>The source of the asset bundle zip file that contains the data that you want to import. The file must be in <code>QUICKSIGHT_JSON</code> format.</p>
    pub fn set_asset_bundle_import_source(mut self, input: ::std::option::Option<crate::types::AssetBundleImportSource>) -> Self {
        self.inner = self.inner.set_asset_bundle_import_source(input);
        self
    }
    /// <p>The source of the asset bundle zip file that contains the data that you want to import. The file must be in <code>QUICKSIGHT_JSON</code> format.</p>
    pub fn get_asset_bundle_import_source(&self) -> &::std::option::Option<crate::types::AssetBundleImportSource> {
        self.inner.get_asset_bundle_import_source()
    }
    /// <p>Optional overrides that are applied to the resource configuration before import.</p>
    pub fn override_parameters(mut self, input: crate::types::AssetBundleImportJobOverrideParameters) -> Self {
        self.inner = self.inner.override_parameters(input);
        self
    }
    /// <p>Optional overrides that are applied to the resource configuration before import.</p>
    pub fn set_override_parameters(mut self, input: ::std::option::Option<crate::types::AssetBundleImportJobOverrideParameters>) -> Self {
        self.inner = self.inner.set_override_parameters(input);
        self
    }
    /// <p>Optional overrides that are applied to the resource configuration before import.</p>
    pub fn get_override_parameters(&self) -> &::std::option::Option<crate::types::AssetBundleImportJobOverrideParameters> {
        self.inner.get_override_parameters()
    }
    /// <p>The failure action for the import job.</p>
    /// <p>If you choose <code>ROLLBACK</code>, failed import jobs will attempt to undo any asset changes caused by the failed job.</p>
    /// <p>If you choose <code>DO_NOTHING</code>, failed import jobs will not attempt to roll back any asset changes caused by the failed job, possibly keeping the Amazon Quick Sight account in an inconsistent state.</p>
    pub fn failure_action(mut self, input: crate::types::AssetBundleImportFailureAction) -> Self {
        self.inner = self.inner.failure_action(input);
        self
    }
    /// <p>The failure action for the import job.</p>
    /// <p>If you choose <code>ROLLBACK</code>, failed import jobs will attempt to undo any asset changes caused by the failed job.</p>
    /// <p>If you choose <code>DO_NOTHING</code>, failed import jobs will not attempt to roll back any asset changes caused by the failed job, possibly keeping the Amazon Quick Sight account in an inconsistent state.</p>
    pub fn set_failure_action(mut self, input: ::std::option::Option<crate::types::AssetBundleImportFailureAction>) -> Self {
        self.inner = self.inner.set_failure_action(input);
        self
    }
    /// <p>The failure action for the import job.</p>
    /// <p>If you choose <code>ROLLBACK</code>, failed import jobs will attempt to undo any asset changes caused by the failed job.</p>
    /// <p>If you choose <code>DO_NOTHING</code>, failed import jobs will not attempt to roll back any asset changes caused by the failed job, possibly keeping the Amazon Quick Sight account in an inconsistent state.</p>
    pub fn get_failure_action(&self) -> &::std::option::Option<crate::types::AssetBundleImportFailureAction> {
        self.inner.get_failure_action()
    }
    /// <p>Optional permission overrides that are applied to the resource configuration before import.</p>
    pub fn override_permissions(mut self, input: crate::types::AssetBundleImportJobOverridePermissions) -> Self {
        self.inner = self.inner.override_permissions(input);
        self
    }
    /// <p>Optional permission overrides that are applied to the resource configuration before import.</p>
    pub fn set_override_permissions(mut self, input: ::std::option::Option<crate::types::AssetBundleImportJobOverridePermissions>) -> Self {
        self.inner = self.inner.set_override_permissions(input);
        self
    }
    /// <p>Optional permission overrides that are applied to the resource configuration before import.</p>
    pub fn get_override_permissions(&self) -> &::std::option::Option<crate::types::AssetBundleImportJobOverridePermissions> {
        self.inner.get_override_permissions()
    }
    /// <p>Optional tag overrides that are applied to the resource configuration before import.</p>
    pub fn override_tags(mut self, input: crate::types::AssetBundleImportJobOverrideTags) -> Self {
        self.inner = self.inner.override_tags(input);
        self
    }
    /// <p>Optional tag overrides that are applied to the resource configuration before import.</p>
    pub fn set_override_tags(mut self, input: ::std::option::Option<crate::types::AssetBundleImportJobOverrideTags>) -> Self {
        self.inner = self.inner.set_override_tags(input);
        self
    }
    /// <p>Optional tag overrides that are applied to the resource configuration before import.</p>
    pub fn get_override_tags(&self) -> &::std::option::Option<crate::types::AssetBundleImportJobOverrideTags> {
        self.inner.get_override_tags()
    }
    /// <p>An optional validation strategy override for all analyses and dashboards that is applied to the resource configuration before import.</p>
    pub fn override_validation_strategy(mut self, input: crate::types::AssetBundleImportJobOverrideValidationStrategy) -> Self {
        self.inner = self.inner.override_validation_strategy(input);
        self
    }
    /// <p>An optional validation strategy override for all analyses and dashboards that is applied to the resource configuration before import.</p>
    pub fn set_override_validation_strategy(
        mut self,
        input: ::std::option::Option<crate::types::AssetBundleImportJobOverrideValidationStrategy>,
    ) -> Self {
        self.inner = self.inner.set_override_validation_strategy(input);
        self
    }
    /// <p>An optional validation strategy override for all analyses and dashboards that is applied to the resource configuration before import.</p>
    pub fn get_override_validation_strategy(&self) -> &::std::option::Option<crate::types::AssetBundleImportJobOverrideValidationStrategy> {
        self.inner.get_override_validation_strategy()
    }
}