aws_sdk_quicksight/operation/get_dashboard_embed_url/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_dashboard_embed_url::_get_dashboard_embed_url_output::GetDashboardEmbedUrlOutputBuilder;
3
4pub use crate::operation::get_dashboard_embed_url::_get_dashboard_embed_url_input::GetDashboardEmbedUrlInputBuilder;
5
6impl crate::operation::get_dashboard_embed_url::builders::GetDashboardEmbedUrlInputBuilder {
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::get_dashboard_embed_url::GetDashboardEmbedUrlOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_dashboard_embed_url();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetDashboardEmbedUrl`.
24///
25/// <p>Generates a temporary session URL and authorization code(bearer token) that you can use to embed an Amazon Quick Sight read-only dashboard in your website or application. Before you use this command, make sure that you have configured the dashboards and permissions.</p>
26/// <p>Currently, you can use <code>GetDashboardEmbedURL</code> only from the server, not from the user's browser. The following rules apply to the generated URL:</p>
27/// <ul>
28/// <li>
29/// <p>They must be used together.</p></li>
30/// <li>
31/// <p>They can be used one time only.</p></li>
32/// <li>
33/// <p>They are valid for 5 minutes after you run this command.</p></li>
34/// <li>
35/// <p>You are charged only when the URL is used or there is interaction with Quick Suite.</p></li>
36/// <li>
37/// <p>The resulting user session is valid for 15 minutes (default) up to 10 hours (maximum). You can use the optional <code>SessionLifetimeInMinutes</code> parameter to customize session duration.</p></li>
38/// </ul>
39/// <p>For more information, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/embedded-analytics-deprecated.html">Embedding Analytics Using GetDashboardEmbedUrl</a> in the <i>Amazon Quick Suite User Guide</i>.</p>
40/// <p>For more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the <a href="https://docs.aws.amazon.com/quicksight/latest/user/quicksight-dev-portal.html">Amazon Quick Suite Developer Portal</a>.</p>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct GetDashboardEmbedUrlFluentBuilder {
43    handle: ::std::sync::Arc<crate::client::Handle>,
44    inner: crate::operation::get_dashboard_embed_url::builders::GetDashboardEmbedUrlInputBuilder,
45    config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48    crate::client::customize::internal::CustomizableSend<
49        crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlOutput,
50        crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlError,
51    > for GetDashboardEmbedUrlFluentBuilder
52{
53    fn send(
54        self,
55        config_override: crate::config::Builder,
56    ) -> crate::client::customize::internal::BoxFuture<
57        crate::client::customize::internal::SendResult<
58            crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlOutput,
59            crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlError,
60        >,
61    > {
62        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63    }
64}
65impl GetDashboardEmbedUrlFluentBuilder {
66    /// Creates a new `GetDashboardEmbedUrlFluentBuilder`.
67    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
68        Self {
69            handle,
70            inner: ::std::default::Default::default(),
71            config_override: ::std::option::Option::None,
72        }
73    }
74    /// Access the GetDashboardEmbedUrl as a reference.
75    pub fn as_input(&self) -> &crate::operation::get_dashboard_embed_url::builders::GetDashboardEmbedUrlInputBuilder {
76        &self.inner
77    }
78    /// Sends the request and returns the response.
79    ///
80    /// If an error occurs, an `SdkError` will be returned with additional details that
81    /// can be matched against.
82    ///
83    /// By default, any retryable failures will be retried twice. Retry behavior
84    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
85    /// set when configuring the client.
86    pub async fn send(
87        self,
88    ) -> ::std::result::Result<
89        crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlOutput,
90        ::aws_smithy_runtime_api::client::result::SdkError<
91            crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlError,
92            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
93        >,
94    > {
95        let input = self
96            .inner
97            .build()
98            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
99        let runtime_plugins = crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrl::operation_runtime_plugins(
100            self.handle.runtime_plugins.clone(),
101            &self.handle.conf,
102            self.config_override,
103        );
104        crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrl::orchestrate(&runtime_plugins, input).await
105    }
106
107    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
108    pub fn customize(
109        self,
110    ) -> crate::client::customize::CustomizableOperation<
111        crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlOutput,
112        crate::operation::get_dashboard_embed_url::GetDashboardEmbedUrlError,
113        Self,
114    > {
115        crate::client::customize::CustomizableOperation::new(self)
116    }
117    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
118        self.set_config_override(::std::option::Option::Some(config_override.into()));
119        self
120    }
121
122    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
123        self.config_override = config_override;
124        self
125    }
126    /// <p>The ID for the Amazon Web Services account that contains the dashboard that you're embedding.</p>
127    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.aws_account_id(input.into());
129        self
130    }
131    /// <p>The ID for the Amazon Web Services account that contains the dashboard that you're embedding.</p>
132    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_aws_account_id(input);
134        self
135    }
136    /// <p>The ID for the Amazon Web Services account that contains the dashboard that you're embedding.</p>
137    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_aws_account_id()
139    }
140    /// <p>The ID for the dashboard, also added to the Identity and Access Management (IAM) policy.</p>
141    pub fn dashboard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.inner = self.inner.dashboard_id(input.into());
143        self
144    }
145    /// <p>The ID for the dashboard, also added to the Identity and Access Management (IAM) policy.</p>
146    pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.inner = self.inner.set_dashboard_id(input);
148        self
149    }
150    /// <p>The ID for the dashboard, also added to the Identity and Access Management (IAM) policy.</p>
151    pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
152        self.inner.get_dashboard_id()
153    }
154    /// <p>The authentication method that the user uses to sign in.</p>
155    pub fn identity_type(mut self, input: crate::types::EmbeddingIdentityType) -> Self {
156        self.inner = self.inner.identity_type(input);
157        self
158    }
159    /// <p>The authentication method that the user uses to sign in.</p>
160    pub fn set_identity_type(mut self, input: ::std::option::Option<crate::types::EmbeddingIdentityType>) -> Self {
161        self.inner = self.inner.set_identity_type(input);
162        self
163    }
164    /// <p>The authentication method that the user uses to sign in.</p>
165    pub fn get_identity_type(&self) -> &::std::option::Option<crate::types::EmbeddingIdentityType> {
166        self.inner.get_identity_type()
167    }
168    /// <p>How many minutes the session is valid. The session lifetime must be 15-600 minutes.</p>
169    pub fn session_lifetime_in_minutes(mut self, input: i64) -> Self {
170        self.inner = self.inner.session_lifetime_in_minutes(input);
171        self
172    }
173    /// <p>How many minutes the session is valid. The session lifetime must be 15-600 minutes.</p>
174    pub fn set_session_lifetime_in_minutes(mut self, input: ::std::option::Option<i64>) -> Self {
175        self.inner = self.inner.set_session_lifetime_in_minutes(input);
176        self
177    }
178    /// <p>How many minutes the session is valid. The session lifetime must be 15-600 minutes.</p>
179    pub fn get_session_lifetime_in_minutes(&self) -> &::std::option::Option<i64> {
180        self.inner.get_session_lifetime_in_minutes()
181    }
182    /// <p>Remove the undo/redo button on the embedded dashboard. The default is FALSE, which enables the undo/redo button.</p>
183    pub fn undo_redo_disabled(mut self, input: bool) -> Self {
184        self.inner = self.inner.undo_redo_disabled(input);
185        self
186    }
187    /// <p>Remove the undo/redo button on the embedded dashboard. The default is FALSE, which enables the undo/redo button.</p>
188    pub fn set_undo_redo_disabled(mut self, input: ::std::option::Option<bool>) -> Self {
189        self.inner = self.inner.set_undo_redo_disabled(input);
190        self
191    }
192    /// <p>Remove the undo/redo button on the embedded dashboard. The default is FALSE, which enables the undo/redo button.</p>
193    pub fn get_undo_redo_disabled(&self) -> &::std::option::Option<bool> {
194        self.inner.get_undo_redo_disabled()
195    }
196    /// <p>Remove the reset button on the embedded dashboard. The default is FALSE, which enables the reset button.</p>
197    pub fn reset_disabled(mut self, input: bool) -> Self {
198        self.inner = self.inner.reset_disabled(input);
199        self
200    }
201    /// <p>Remove the reset button on the embedded dashboard. The default is FALSE, which enables the reset button.</p>
202    pub fn set_reset_disabled(mut self, input: ::std::option::Option<bool>) -> Self {
203        self.inner = self.inner.set_reset_disabled(input);
204        self
205    }
206    /// <p>Remove the reset button on the embedded dashboard. The default is FALSE, which enables the reset button.</p>
207    pub fn get_reset_disabled(&self) -> &::std::option::Option<bool> {
208        self.inner.get_reset_disabled()
209    }
210    /// <p>Adds persistence of state for the user session in an embedded dashboard. Persistence applies to the sheet and the parameter settings. These are control settings that the dashboard subscriber (Amazon Quick Sight reader) chooses while viewing the dashboard. If this is set to <code>TRUE</code>, the settings are the same when the subscriber reopens the same dashboard URL. The state is stored in Amazon Quick Sight, not in a browser cookie. If this is set to FALSE, the state of the user session is not persisted. The default is <code>FALSE</code>.</p>
211    pub fn state_persistence_enabled(mut self, input: bool) -> Self {
212        self.inner = self.inner.state_persistence_enabled(input);
213        self
214    }
215    /// <p>Adds persistence of state for the user session in an embedded dashboard. Persistence applies to the sheet and the parameter settings. These are control settings that the dashboard subscriber (Amazon Quick Sight reader) chooses while viewing the dashboard. If this is set to <code>TRUE</code>, the settings are the same when the subscriber reopens the same dashboard URL. The state is stored in Amazon Quick Sight, not in a browser cookie. If this is set to FALSE, the state of the user session is not persisted. The default is <code>FALSE</code>.</p>
216    pub fn set_state_persistence_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
217        self.inner = self.inner.set_state_persistence_enabled(input);
218        self
219    }
220    /// <p>Adds persistence of state for the user session in an embedded dashboard. Persistence applies to the sheet and the parameter settings. These are control settings that the dashboard subscriber (Amazon Quick Sight reader) chooses while viewing the dashboard. If this is set to <code>TRUE</code>, the settings are the same when the subscriber reopens the same dashboard URL. The state is stored in Amazon Quick Sight, not in a browser cookie. If this is set to FALSE, the state of the user session is not persisted. The default is <code>FALSE</code>.</p>
221    pub fn get_state_persistence_enabled(&self) -> &::std::option::Option<bool> {
222        self.inner.get_state_persistence_enabled()
223    }
224    /// <p>The Amazon Quick Suite user's Amazon Resource Name (ARN), for use with <code>QUICKSIGHT</code> identity type. You can use this for any Amazon Quick Suite users in your account (readers, authors, or admins) authenticated as one of the following:</p>
225    /// <ul>
226    /// <li>
227    /// <p>Active Directory (AD) users or group members</p></li>
228    /// <li>
229    /// <p>Invited nonfederated users</p></li>
230    /// <li>
231    /// <p>IAM users and IAM role-based sessions authenticated through Federated Single Sign-On using SAML, OpenID Connect, or IAM federation.</p></li>
232    /// </ul>
233    /// <p>Omit this parameter for users in the third group – IAM users and IAM role-based sessions.</p>
234    pub fn user_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235        self.inner = self.inner.user_arn(input.into());
236        self
237    }
238    /// <p>The Amazon Quick Suite user's Amazon Resource Name (ARN), for use with <code>QUICKSIGHT</code> identity type. You can use this for any Amazon Quick Suite users in your account (readers, authors, or admins) authenticated as one of the following:</p>
239    /// <ul>
240    /// <li>
241    /// <p>Active Directory (AD) users or group members</p></li>
242    /// <li>
243    /// <p>Invited nonfederated users</p></li>
244    /// <li>
245    /// <p>IAM users and IAM role-based sessions authenticated through Federated Single Sign-On using SAML, OpenID Connect, or IAM federation.</p></li>
246    /// </ul>
247    /// <p>Omit this parameter for users in the third group – IAM users and IAM role-based sessions.</p>
248    pub fn set_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249        self.inner = self.inner.set_user_arn(input);
250        self
251    }
252    /// <p>The Amazon Quick Suite user's Amazon Resource Name (ARN), for use with <code>QUICKSIGHT</code> identity type. You can use this for any Amazon Quick Suite users in your account (readers, authors, or admins) authenticated as one of the following:</p>
253    /// <ul>
254    /// <li>
255    /// <p>Active Directory (AD) users or group members</p></li>
256    /// <li>
257    /// <p>Invited nonfederated users</p></li>
258    /// <li>
259    /// <p>IAM users and IAM role-based sessions authenticated through Federated Single Sign-On using SAML, OpenID Connect, or IAM federation.</p></li>
260    /// </ul>
261    /// <p>Omit this parameter for users in the third group – IAM users and IAM role-based sessions.</p>
262    pub fn get_user_arn(&self) -> &::std::option::Option<::std::string::String> {
263        self.inner.get_user_arn()
264    }
265    /// <p>The Amazon Quick Sight namespace that contains the dashboard IDs in this request. If you're not using a custom namespace, set <code>Namespace = default</code>.</p>
266    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267        self.inner = self.inner.namespace(input.into());
268        self
269    }
270    /// <p>The Amazon Quick Sight namespace that contains the dashboard IDs in this request. If you're not using a custom namespace, set <code>Namespace = default</code>.</p>
271    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272        self.inner = self.inner.set_namespace(input);
273        self
274    }
275    /// <p>The Amazon Quick Sight namespace that contains the dashboard IDs in this request. If you're not using a custom namespace, set <code>Namespace = default</code>.</p>
276    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
277        self.inner.get_namespace()
278    }
279    ///
280    /// Appends an item to `AdditionalDashboardIds`.
281    ///
282    /// To override the contents of this collection use [`set_additional_dashboard_ids`](Self::set_additional_dashboard_ids).
283    ///
284    /// <p>A list of one or more dashboard IDs that you want anonymous users to have tempporary access to. Currently, the <code>IdentityType</code> parameter must be set to <code>ANONYMOUS</code> because other identity types authenticate as Quick Suite or IAM users. For example, if you set "<code>--dashboard-id dash_id1 --dashboard-id dash_id2 dash_id3 identity-type ANONYMOUS</code>", the session can access all three dashboards.</p>
285    pub fn additional_dashboard_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
286        self.inner = self.inner.additional_dashboard_ids(input.into());
287        self
288    }
289    /// <p>A list of one or more dashboard IDs that you want anonymous users to have tempporary access to. Currently, the <code>IdentityType</code> parameter must be set to <code>ANONYMOUS</code> because other identity types authenticate as Quick Suite or IAM users. For example, if you set "<code>--dashboard-id dash_id1 --dashboard-id dash_id2 dash_id3 identity-type ANONYMOUS</code>", the session can access all three dashboards.</p>
290    pub fn set_additional_dashboard_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
291        self.inner = self.inner.set_additional_dashboard_ids(input);
292        self
293    }
294    /// <p>A list of one or more dashboard IDs that you want anonymous users to have tempporary access to. Currently, the <code>IdentityType</code> parameter must be set to <code>ANONYMOUS</code> because other identity types authenticate as Quick Suite or IAM users. For example, if you set "<code>--dashboard-id dash_id1 --dashboard-id dash_id2 dash_id3 identity-type ANONYMOUS</code>", the session can access all three dashboards.</p>
295    pub fn get_additional_dashboard_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
296        self.inner.get_additional_dashboard_ids()
297    }
298}