aws_sdk_quicksight/operation/get_session_embed_url/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_session_embed_url::_get_session_embed_url_output::GetSessionEmbedUrlOutputBuilder;
3
4pub use crate::operation::get_session_embed_url::_get_session_embed_url_input::GetSessionEmbedUrlInputBuilder;
5
6impl crate::operation::get_session_embed_url::builders::GetSessionEmbedUrlInputBuilder {
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_session_embed_url::GetSessionEmbedUrlOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_session_embed_url::GetSessionEmbedUrlError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_session_embed_url();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetSessionEmbedUrl`.
24///
25/// <p>Generates a session URL and authorization code that you can use to embed the Amazon Amazon Quick Sight console in your web server code. Use <code>GetSessionEmbedUrl</code> where you want to provide an authoring portal that allows users to create data sources, datasets, analyses, and dashboards. The users who access an embedded Amazon Quick Sight console need belong to the author or admin security cohort. If you want to restrict permissions to some of these features, add a custom permissions profile to the user with the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateUser.html">UpdateUser</a> </code> API operation. Use <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_RegisterUser.html">RegisterUser</a> </code> API operation to add a new user with a custom permission profile attached. For more information, see the following sections in the <i>Amazon Quick Suite User Guide</i>:</p>
26/// <ul>
27/// <li>
28/// <p><a href="https://docs.aws.amazon.com/quicksight/latest/user/embedded-analytics.html">Embedding Analytics</a></p></li>
29/// <li>
30/// <p><a href="https://docs.aws.amazon.com/quicksight/latest/user/customizing-permissions-to-the-quicksight-console.html">Customizing Access to the Amazon Quick Suite Console</a></p></li>
31/// </ul>
32#[derive(::std::clone::Clone, ::std::fmt::Debug)]
33pub struct GetSessionEmbedUrlFluentBuilder {
34 handle: ::std::sync::Arc<crate::client::Handle>,
35 inner: crate::operation::get_session_embed_url::builders::GetSessionEmbedUrlInputBuilder,
36 config_override: ::std::option::Option<crate::config::Builder>,
37}
38impl
39 crate::client::customize::internal::CustomizableSend<
40 crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput,
41 crate::operation::get_session_embed_url::GetSessionEmbedUrlError,
42 > for GetSessionEmbedUrlFluentBuilder
43{
44 fn send(
45 self,
46 config_override: crate::config::Builder,
47 ) -> crate::client::customize::internal::BoxFuture<
48 crate::client::customize::internal::SendResult<
49 crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput,
50 crate::operation::get_session_embed_url::GetSessionEmbedUrlError,
51 >,
52 > {
53 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
54 }
55}
56impl GetSessionEmbedUrlFluentBuilder {
57 /// Creates a new `GetSessionEmbedUrlFluentBuilder`.
58 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
59 Self {
60 handle,
61 inner: ::std::default::Default::default(),
62 config_override: ::std::option::Option::None,
63 }
64 }
65 /// Access the GetSessionEmbedUrl as a reference.
66 pub fn as_input(&self) -> &crate::operation::get_session_embed_url::builders::GetSessionEmbedUrlInputBuilder {
67 &self.inner
68 }
69 /// Sends the request and returns the response.
70 ///
71 /// If an error occurs, an `SdkError` will be returned with additional details that
72 /// can be matched against.
73 ///
74 /// By default, any retryable failures will be retried twice. Retry behavior
75 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
76 /// set when configuring the client.
77 pub async fn send(
78 self,
79 ) -> ::std::result::Result<
80 crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput,
81 ::aws_smithy_runtime_api::client::result::SdkError<
82 crate::operation::get_session_embed_url::GetSessionEmbedUrlError,
83 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
84 >,
85 > {
86 let input = self
87 .inner
88 .build()
89 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
90 let runtime_plugins = crate::operation::get_session_embed_url::GetSessionEmbedUrl::operation_runtime_plugins(
91 self.handle.runtime_plugins.clone(),
92 &self.handle.conf,
93 self.config_override,
94 );
95 crate::operation::get_session_embed_url::GetSessionEmbedUrl::orchestrate(&runtime_plugins, input).await
96 }
97
98 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
99 pub fn customize(
100 self,
101 ) -> crate::client::customize::CustomizableOperation<
102 crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput,
103 crate::operation::get_session_embed_url::GetSessionEmbedUrlError,
104 Self,
105 > {
106 crate::client::customize::CustomizableOperation::new(self)
107 }
108 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
109 self.set_config_override(::std::option::Option::Some(config_override.into()));
110 self
111 }
112
113 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
114 self.config_override = config_override;
115 self
116 }
117 /// <p>The ID for the Amazon Web Services account associated with your Amazon Quick Sight subscription.</p>
118 pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.inner = self.inner.aws_account_id(input.into());
120 self
121 }
122 /// <p>The ID for the Amazon Web Services account associated with your Amazon Quick Sight subscription.</p>
123 pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.inner = self.inner.set_aws_account_id(input);
125 self
126 }
127 /// <p>The ID for the Amazon Web Services account associated with your Amazon Quick Sight subscription.</p>
128 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
129 self.inner.get_aws_account_id()
130 }
131 /// <p>The URL you use to access the embedded session. The entry point URL is constrained to the following paths:</p>
132 /// <ul>
133 /// <li>
134 /// <p><code>/start</code></p></li>
135 /// <li>
136 /// <p><code>/start/analyses</code></p></li>
137 /// <li>
138 /// <p><code>/start/dashboards</code></p></li>
139 /// <li>
140 /// <p><code>/start/favorites</code></p></li>
141 /// <li>
142 /// <p><code>/dashboards/<i>DashboardId</i> </code> - where <code>DashboardId</code> is the actual ID key from the Amazon Quick Sight console URL of the dashboard</p></li>
143 /// <li>
144 /// <p><code>/analyses/<i>AnalysisId</i> </code> - where <code>AnalysisId</code> is the actual ID key from the Amazon Quick Sight console URL of the analysis</p></li>
145 /// </ul>
146 pub fn entry_point(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.inner = self.inner.entry_point(input.into());
148 self
149 }
150 /// <p>The URL you use to access the embedded session. The entry point URL is constrained to the following paths:</p>
151 /// <ul>
152 /// <li>
153 /// <p><code>/start</code></p></li>
154 /// <li>
155 /// <p><code>/start/analyses</code></p></li>
156 /// <li>
157 /// <p><code>/start/dashboards</code></p></li>
158 /// <li>
159 /// <p><code>/start/favorites</code></p></li>
160 /// <li>
161 /// <p><code>/dashboards/<i>DashboardId</i> </code> - where <code>DashboardId</code> is the actual ID key from the Amazon Quick Sight console URL of the dashboard</p></li>
162 /// <li>
163 /// <p><code>/analyses/<i>AnalysisId</i> </code> - where <code>AnalysisId</code> is the actual ID key from the Amazon Quick Sight console URL of the analysis</p></li>
164 /// </ul>
165 pub fn set_entry_point(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.inner = self.inner.set_entry_point(input);
167 self
168 }
169 /// <p>The URL you use to access the embedded session. The entry point URL is constrained to the following paths:</p>
170 /// <ul>
171 /// <li>
172 /// <p><code>/start</code></p></li>
173 /// <li>
174 /// <p><code>/start/analyses</code></p></li>
175 /// <li>
176 /// <p><code>/start/dashboards</code></p></li>
177 /// <li>
178 /// <p><code>/start/favorites</code></p></li>
179 /// <li>
180 /// <p><code>/dashboards/<i>DashboardId</i> </code> - where <code>DashboardId</code> is the actual ID key from the Amazon Quick Sight console URL of the dashboard</p></li>
181 /// <li>
182 /// <p><code>/analyses/<i>AnalysisId</i> </code> - where <code>AnalysisId</code> is the actual ID key from the Amazon Quick Sight console URL of the analysis</p></li>
183 /// </ul>
184 pub fn get_entry_point(&self) -> &::std::option::Option<::std::string::String> {
185 self.inner.get_entry_point()
186 }
187 /// <p>How many minutes the session is valid. The session lifetime must be 15-600 minutes.</p>
188 pub fn session_lifetime_in_minutes(mut self, input: i64) -> Self {
189 self.inner = self.inner.session_lifetime_in_minutes(input);
190 self
191 }
192 /// <p>How many minutes the session is valid. The session lifetime must be 15-600 minutes.</p>
193 pub fn set_session_lifetime_in_minutes(mut self, input: ::std::option::Option<i64>) -> Self {
194 self.inner = self.inner.set_session_lifetime_in_minutes(input);
195 self
196 }
197 /// <p>How many minutes the session is valid. The session lifetime must be 15-600 minutes.</p>
198 pub fn get_session_lifetime_in_minutes(&self) -> &::std::option::Option<i64> {
199 self.inner.get_session_lifetime_in_minutes()
200 }
201 /// <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 type of Amazon Quick Suite users in your account (readers, authors, or admins). They need to be authenticated as one of the following:</p>
202 /// <ol>
203 /// <li>
204 /// <p>Active Directory (AD) users or group members</p></li>
205 /// <li>
206 /// <p>Invited nonfederated users</p></li>
207 /// <li>
208 /// <p>IAM users and IAM role-based sessions authenticated through Federated Single Sign-On using SAML, OpenID Connect, or IAM federation</p></li>
209 /// </ol>
210 /// <p>Omit this parameter for users in the third group, IAM users and IAM role-based sessions.</p>
211 pub fn user_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212 self.inner = self.inner.user_arn(input.into());
213 self
214 }
215 /// <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 type of Amazon Quick Suite users in your account (readers, authors, or admins). They need to be authenticated as one of the following:</p>
216 /// <ol>
217 /// <li>
218 /// <p>Active Directory (AD) users or group members</p></li>
219 /// <li>
220 /// <p>Invited nonfederated users</p></li>
221 /// <li>
222 /// <p>IAM users and IAM role-based sessions authenticated through Federated Single Sign-On using SAML, OpenID Connect, or IAM federation</p></li>
223 /// </ol>
224 /// <p>Omit this parameter for users in the third group, IAM users and IAM role-based sessions.</p>
225 pub fn set_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226 self.inner = self.inner.set_user_arn(input);
227 self
228 }
229 /// <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 type of Amazon Quick Suite users in your account (readers, authors, or admins). They need to be authenticated as one of the following:</p>
230 /// <ol>
231 /// <li>
232 /// <p>Active Directory (AD) users or group members</p></li>
233 /// <li>
234 /// <p>Invited nonfederated users</p></li>
235 /// <li>
236 /// <p>IAM users and IAM role-based sessions authenticated through Federated Single Sign-On using SAML, OpenID Connect, or IAM federation</p></li>
237 /// </ol>
238 /// <p>Omit this parameter for users in the third group, IAM users and IAM role-based sessions.</p>
239 pub fn get_user_arn(&self) -> &::std::option::Option<::std::string::String> {
240 self.inner.get_user_arn()
241 }
242}