aws_sdk_quicksight/operation/describe_account_customization/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_account_customization::_describe_account_customization_output::DescribeAccountCustomizationOutputBuilder;
3
4pub use crate::operation::describe_account_customization::_describe_account_customization_input::DescribeAccountCustomizationInputBuilder;
5
6impl crate::operation::describe_account_customization::builders::DescribeAccountCustomizationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::describe_account_customization::DescribeAccountCustomizationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_account_customization::DescribeAccountCustomizationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_account_customization();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeAccountCustomization`.
24///
25/// <p>Describes the customizations associated with the provided Amazon Web Services account and Amazon Quick Sight namespace. The Quick Sight console evaluates which customizations to apply by running this API operation with the <code>Resolved</code> flag included.</p>
26/// <p>To determine what customizations display when you run this command, it can help to visualize the relationship of the entities involved.</p>
27/// <ul>
28/// <li>
29/// <p><code>Amazon Web Services account</code> - The Amazon Web Services account exists at the top of the hierarchy. It has the potential to use all of the Amazon Web Services Regions and Amazon Web Services Services. When you subscribe to Quick Sight, you choose one Amazon Web Services Region to use as your home Region. That's where your free SPICE capacity is located. You can use Quick Sight in any supported Amazon Web Services Region.</p></li>
30/// <li>
31/// <p><code>Amazon Web Services Region</code> - You can sign in to Quick Sight in any Amazon Web Services Region. If you have a user directory, it resides in us-east-1, which is US East (N. Virginia). Generally speaking, these users have access to Quick Sight in any Amazon Web Services Region, unless they are constrained to a namespace.</p>
32/// <p>To run the command in a different Amazon Web Services Region, you change your Region settings. If you're using the CLI, you can use one of the following options:</p>
33/// <ul>
34/// <li>
35/// <p>Use <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-options.html">command line options</a>.</p></li>
36/// <li>
37/// <p>Use <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html">named profiles</a>.</p></li>
38/// <li>
39/// <p>Run <code>aws configure</code> to change your default Amazon Web Services Region. Use Enter to key the same settings for your keys. For more information, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">Configuring the CLI</a>.</p></li>
40/// </ul></li>
41/// <li>
42/// <p><code>Namespace</code> - A Quick Sight namespace is a partition that contains users and assets (data sources, datasets, dashboards, and so on). To access assets that are in a specific namespace, users and groups must also be part of the same namespace. People who share a namespace are completely isolated from users and assets in other namespaces, even if they are in the same Amazon Web Services account and Amazon Web Services Region.</p></li>
43/// <li>
44/// <p><code>Applied customizations</code> - Quick Sight customizations can apply to an Amazon Web Services account or to a namespace. Settings that you apply to a namespace override settings that you apply to an Amazon Web Services account.</p></li>
45/// </ul>
46#[derive(::std::clone::Clone, ::std::fmt::Debug)]
47pub struct DescribeAccountCustomizationFluentBuilder {
48    handle: ::std::sync::Arc<crate::client::Handle>,
49    inner: crate::operation::describe_account_customization::builders::DescribeAccountCustomizationInputBuilder,
50    config_override: ::std::option::Option<crate::config::Builder>,
51}
52impl
53    crate::client::customize::internal::CustomizableSend<
54        crate::operation::describe_account_customization::DescribeAccountCustomizationOutput,
55        crate::operation::describe_account_customization::DescribeAccountCustomizationError,
56    > for DescribeAccountCustomizationFluentBuilder
57{
58    fn send(
59        self,
60        config_override: crate::config::Builder,
61    ) -> crate::client::customize::internal::BoxFuture<
62        crate::client::customize::internal::SendResult<
63            crate::operation::describe_account_customization::DescribeAccountCustomizationOutput,
64            crate::operation::describe_account_customization::DescribeAccountCustomizationError,
65        >,
66    > {
67        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
68    }
69}
70impl DescribeAccountCustomizationFluentBuilder {
71    /// Creates a new `DescribeAccountCustomizationFluentBuilder`.
72    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
73        Self {
74            handle,
75            inner: ::std::default::Default::default(),
76            config_override: ::std::option::Option::None,
77        }
78    }
79    /// Access the DescribeAccountCustomization as a reference.
80    pub fn as_input(&self) -> &crate::operation::describe_account_customization::builders::DescribeAccountCustomizationInputBuilder {
81        &self.inner
82    }
83    /// Sends the request and returns the response.
84    ///
85    /// If an error occurs, an `SdkError` will be returned with additional details that
86    /// can be matched against.
87    ///
88    /// By default, any retryable failures will be retried twice. Retry behavior
89    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
90    /// set when configuring the client.
91    pub async fn send(
92        self,
93    ) -> ::std::result::Result<
94        crate::operation::describe_account_customization::DescribeAccountCustomizationOutput,
95        ::aws_smithy_runtime_api::client::result::SdkError<
96            crate::operation::describe_account_customization::DescribeAccountCustomizationError,
97            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
98        >,
99    > {
100        let input = self
101            .inner
102            .build()
103            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
104        let runtime_plugins = crate::operation::describe_account_customization::DescribeAccountCustomization::operation_runtime_plugins(
105            self.handle.runtime_plugins.clone(),
106            &self.handle.conf,
107            self.config_override,
108        );
109        crate::operation::describe_account_customization::DescribeAccountCustomization::orchestrate(&runtime_plugins, input).await
110    }
111
112    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
113    pub fn customize(
114        self,
115    ) -> crate::client::customize::CustomizableOperation<
116        crate::operation::describe_account_customization::DescribeAccountCustomizationOutput,
117        crate::operation::describe_account_customization::DescribeAccountCustomizationError,
118        Self,
119    > {
120        crate::client::customize::CustomizableOperation::new(self)
121    }
122    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
123        self.set_config_override(::std::option::Option::Some(config_override.into()));
124        self
125    }
126
127    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
128        self.config_override = config_override;
129        self
130    }
131    /// <p>The ID for the Amazon Web Services account that you want to describe Quick Sight customizations for.</p>
132    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.inner = self.inner.aws_account_id(input.into());
134        self
135    }
136    /// <p>The ID for the Amazon Web Services account that you want to describe Quick Sight customizations for.</p>
137    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.inner = self.inner.set_aws_account_id(input);
139        self
140    }
141    /// <p>The ID for the Amazon Web Services account that you want to describe Quick Sight customizations for.</p>
142    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
143        self.inner.get_aws_account_id()
144    }
145    /// <p>The Quick Sight namespace that you want to describe Quick Sight customizations for.</p>
146    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147        self.inner = self.inner.namespace(input.into());
148        self
149    }
150    /// <p>The Quick Sight namespace that you want to describe Quick Sight customizations for.</p>
151    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.inner = self.inner.set_namespace(input);
153        self
154    }
155    /// <p>The Quick Sight namespace that you want to describe Quick Sight customizations for.</p>
156    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
157        self.inner.get_namespace()
158    }
159    /// <p>The <code>Resolved</code> flag works with the other parameters to determine which view of Quick Sight customizations is returned. You can add this flag to your command to use the same view that Quick Sight uses to identify which customizations to apply to the console. Omit this flag, or set it to <code>no-resolved</code>, to reveal customizations that are configured at different levels.</p>
160    pub fn resolved(mut self, input: bool) -> Self {
161        self.inner = self.inner.resolved(input);
162        self
163    }
164    /// <p>The <code>Resolved</code> flag works with the other parameters to determine which view of Quick Sight customizations is returned. You can add this flag to your command to use the same view that Quick Sight uses to identify which customizations to apply to the console. Omit this flag, or set it to <code>no-resolved</code>, to reveal customizations that are configured at different levels.</p>
165    pub fn set_resolved(mut self, input: ::std::option::Option<bool>) -> Self {
166        self.inner = self.inner.set_resolved(input);
167        self
168    }
169    /// <p>The <code>Resolved</code> flag works with the other parameters to determine which view of Quick Sight customizations is returned. You can add this flag to your command to use the same view that Quick Sight uses to identify which customizations to apply to the console. Omit this flag, or set it to <code>no-resolved</code>, to reveal customizations that are configured at different levels.</p>
170    pub fn get_resolved(&self) -> &::std::option::Option<bool> {
171        self.inner.get_resolved()
172    }
173}