1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::generate_embed_url_for_anonymous_user::_generate_embed_url_for_anonymous_user_input::GenerateEmbedUrlForAnonymousUserInputBuilder;
pub use crate::operation::generate_embed_url_for_anonymous_user::_generate_embed_url_for_anonymous_user_output::GenerateEmbedUrlForAnonymousUserOutputBuilder;
impl crate::operation::generate_embed_url_for_anonymous_user::builders::GenerateEmbedUrlForAnonymousUserInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.generate_embed_url_for_anonymous_user();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `GenerateEmbedUrlForAnonymousUser`.
///
/// <p>Generates an embed URL that you can use to embed an Amazon Quick dashboard or visual in your website, without having to register any reader users. Before you use this action, make sure that you have configured the dashboards and permissions.</p>
/// <p>The following rules apply to the generated URL:</p>
/// <ul>
/// <li>
/// <p>It contains a temporary bearer token. It is valid for 5 minutes after it is generated. Once redeemed within this period, it cannot be re-used again.</p></li>
/// <li>
/// <p>The URL validity period should not be confused with the actual session lifetime that can be customized using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_GenerateEmbedUrlForAnonymousUser.html#QS-GenerateEmbedUrlForAnonymousUser-request-SessionLifetimeInMinutes">SessionLifetimeInMinutes</a> </code> parameter. The resulting user session is valid for 15 minutes (minimum) to 10 hours (maximum). The default session duration is 10 hours.</p></li>
/// <li>
/// <p>You are charged only when the URL is used or there is interaction with Amazon Quick.</p></li>
/// </ul>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/embedded-analytics.html">Embedded Analytics</a> in the <i>Amazon Quick User Guide</i>.</p>
/// <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 Developer Portal</a>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct GenerateEmbedUrlForAnonymousUserFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::generate_embed_url_for_anonymous_user::builders::GenerateEmbedUrlForAnonymousUserInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserOutput,
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserError,
> for GenerateEmbedUrlForAnonymousUserFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserOutput,
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl GenerateEmbedUrlForAnonymousUserFluentBuilder {
/// Creates a new `GenerateEmbedUrlForAnonymousUserFluentBuilder`.
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 GenerateEmbedUrlForAnonymousUser as a reference.
pub fn as_input(&self) -> &crate::operation::generate_embed_url_for_anonymous_user::builders::GenerateEmbedUrlForAnonymousUserInputBuilder {
&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::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserError,
::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::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUser::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUser::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::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserOutput,
crate::operation::generate_embed_url_for_anonymous_user::GenerateEmbedUrlForAnonymousUserError,
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 for the Amazon Web Services account that contains the dashboard that you're embedding.</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 for the Amazon Web Services account that contains the dashboard that you're embedding.</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 for the Amazon Web Services account that contains the dashboard that you're embedding.</p>
pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_aws_account_id()
}
/// <p>How many minutes the session is valid. The session lifetime must be in \[15-600\] minutes range.</p>
pub fn session_lifetime_in_minutes(mut self, input: i64) -> Self {
self.inner = self.inner.session_lifetime_in_minutes(input);
self
}
/// <p>How many minutes the session is valid. The session lifetime must be in \[15-600\] minutes range.</p>
pub fn set_session_lifetime_in_minutes(mut self, input: ::std::option::Option<i64>) -> Self {
self.inner = self.inner.set_session_lifetime_in_minutes(input);
self
}
/// <p>How many minutes the session is valid. The session lifetime must be in \[15-600\] minutes range.</p>
pub fn get_session_lifetime_in_minutes(&self) -> &::std::option::Option<i64> {
self.inner.get_session_lifetime_in_minutes()
}
/// <p>The Amazon Quick Sight namespace that the anonymous user virtually belongs to. If you are not using an Amazon Quick custom namespace, set this to <code>default</code>.</p>
pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.namespace(input.into());
self
}
/// <p>The Amazon Quick Sight namespace that the anonymous user virtually belongs to. If you are not using an Amazon Quick custom namespace, set this to <code>default</code>.</p>
pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_namespace(input);
self
}
/// <p>The Amazon Quick Sight namespace that the anonymous user virtually belongs to. If you are not using an Amazon Quick custom namespace, set this to <code>default</code>.</p>
pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_namespace()
}
///
/// Appends an item to `SessionTags`.
///
/// To override the contents of this collection use [`set_session_tags`](Self::set_session_tags).
///
/// <p>Session tags are user-specified strings that identify a session in your application. You can use these tags to implement row-level security (RLS) controls. Before you use the <code>SessionTags</code> parameter, make sure that you have configured the relevant datasets using the <code>DataSet$RowLevelPermissionTagConfiguration</code> parameter so that session tags can be used to provide row-level security.</p>
/// <p>When using <code>SessionTags</code> in <code>GenerateEmbedUrlForAnonymousUser</code>,</p>
/// <ul>
/// <li>
/// <p>Treat <code>SessionTags</code> as security credentials. Do not expose <code>SessionTags</code> to end users or client-side code.</p></li>
/// <li>
/// <p>Implement server-side controls. Ensure that <code>SessionTags</code> are set exclusively by your trusted backend services, not by parameters that end users can modify.</p></li>
/// <li>
/// <p>Protect <code>SessionTags</code> from enumeration. Ensure that users in one tenant cannot discover or guess sessionTag values belonging to other tenants.</p></li>
/// <li>
/// <p>Review your architecture. If downstream customers or partners are allowed to call the <code>GenerateEmbedUrlForAnonymousUser</code> API directly, evaluate whether those parties could specify sessionTag values for tenants they should not access.</p></li>
/// </ul>
/// <p>Besides, these are not the tags used for the Amazon Web Services resource tagging feature. For more information, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/quicksight-dev-rls-tags.html">Using Row-Level Security (RLS) with Tags</a> in the <i>Amazon Quick User Guide</i>.</p>
pub fn session_tags(mut self, input: crate::types::SessionTag) -> Self {
self.inner = self.inner.session_tags(input);
self
}
/// <p>Session tags are user-specified strings that identify a session in your application. You can use these tags to implement row-level security (RLS) controls. Before you use the <code>SessionTags</code> parameter, make sure that you have configured the relevant datasets using the <code>DataSet$RowLevelPermissionTagConfiguration</code> parameter so that session tags can be used to provide row-level security.</p>
/// <p>When using <code>SessionTags</code> in <code>GenerateEmbedUrlForAnonymousUser</code>,</p>
/// <ul>
/// <li>
/// <p>Treat <code>SessionTags</code> as security credentials. Do not expose <code>SessionTags</code> to end users or client-side code.</p></li>
/// <li>
/// <p>Implement server-side controls. Ensure that <code>SessionTags</code> are set exclusively by your trusted backend services, not by parameters that end users can modify.</p></li>
/// <li>
/// <p>Protect <code>SessionTags</code> from enumeration. Ensure that users in one tenant cannot discover or guess sessionTag values belonging to other tenants.</p></li>
/// <li>
/// <p>Review your architecture. If downstream customers or partners are allowed to call the <code>GenerateEmbedUrlForAnonymousUser</code> API directly, evaluate whether those parties could specify sessionTag values for tenants they should not access.</p></li>
/// </ul>
/// <p>Besides, these are not the tags used for the Amazon Web Services resource tagging feature. For more information, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/quicksight-dev-rls-tags.html">Using Row-Level Security (RLS) with Tags</a> in the <i>Amazon Quick User Guide</i>.</p>
pub fn set_session_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SessionTag>>) -> Self {
self.inner = self.inner.set_session_tags(input);
self
}
/// <p>Session tags are user-specified strings that identify a session in your application. You can use these tags to implement row-level security (RLS) controls. Before you use the <code>SessionTags</code> parameter, make sure that you have configured the relevant datasets using the <code>DataSet$RowLevelPermissionTagConfiguration</code> parameter so that session tags can be used to provide row-level security.</p>
/// <p>When using <code>SessionTags</code> in <code>GenerateEmbedUrlForAnonymousUser</code>,</p>
/// <ul>
/// <li>
/// <p>Treat <code>SessionTags</code> as security credentials. Do not expose <code>SessionTags</code> to end users or client-side code.</p></li>
/// <li>
/// <p>Implement server-side controls. Ensure that <code>SessionTags</code> are set exclusively by your trusted backend services, not by parameters that end users can modify.</p></li>
/// <li>
/// <p>Protect <code>SessionTags</code> from enumeration. Ensure that users in one tenant cannot discover or guess sessionTag values belonging to other tenants.</p></li>
/// <li>
/// <p>Review your architecture. If downstream customers or partners are allowed to call the <code>GenerateEmbedUrlForAnonymousUser</code> API directly, evaluate whether those parties could specify sessionTag values for tenants they should not access.</p></li>
/// </ul>
/// <p>Besides, these are not the tags used for the Amazon Web Services resource tagging feature. For more information, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/quicksight-dev-rls-tags.html">Using Row-Level Security (RLS) with Tags</a> in the <i>Amazon Quick User Guide</i>.</p>
pub fn get_session_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SessionTag>> {
self.inner.get_session_tags()
}
///
/// Appends an item to `AuthorizedResourceArns`.
///
/// To override the contents of this collection use [`set_authorized_resource_arns`](Self::set_authorized_resource_arns).
///
/// <p>The Amazon Resource Names (ARNs) for the Quick Sight resources that the user is authorized to access during the lifetime of the session.</p>
/// <p>If you choose <code>Dashboard</code> embedding experience, pass the list of dashboard ARNs in the account that you want the user to be able to view.</p>
/// <p>If you want to make changes to the theme of your embedded content, pass a list of theme ARNs that the anonymous users need access to.</p>
/// <p>Currently, you can pass up to 25 theme ARNs in each API call.</p>
pub fn authorized_resource_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.authorized_resource_arns(input.into());
self
}
/// <p>The Amazon Resource Names (ARNs) for the Quick Sight resources that the user is authorized to access during the lifetime of the session.</p>
/// <p>If you choose <code>Dashboard</code> embedding experience, pass the list of dashboard ARNs in the account that you want the user to be able to view.</p>
/// <p>If you want to make changes to the theme of your embedded content, pass a list of theme ARNs that the anonymous users need access to.</p>
/// <p>Currently, you can pass up to 25 theme ARNs in each API call.</p>
pub fn set_authorized_resource_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.inner = self.inner.set_authorized_resource_arns(input);
self
}
/// <p>The Amazon Resource Names (ARNs) for the Quick Sight resources that the user is authorized to access during the lifetime of the session.</p>
/// <p>If you choose <code>Dashboard</code> embedding experience, pass the list of dashboard ARNs in the account that you want the user to be able to view.</p>
/// <p>If you want to make changes to the theme of your embedded content, pass a list of theme ARNs that the anonymous users need access to.</p>
/// <p>Currently, you can pass up to 25 theme ARNs in each API call.</p>
pub fn get_authorized_resource_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_authorized_resource_arns()
}
/// <p>The configuration of the experience that you are embedding.</p>
pub fn experience_configuration(mut self, input: crate::types::AnonymousUserEmbeddingExperienceConfiguration) -> Self {
self.inner = self.inner.experience_configuration(input);
self
}
/// <p>The configuration of the experience that you are embedding.</p>
pub fn set_experience_configuration(mut self, input: ::std::option::Option<crate::types::AnonymousUserEmbeddingExperienceConfiguration>) -> Self {
self.inner = self.inner.set_experience_configuration(input);
self
}
/// <p>The configuration of the experience that you are embedding.</p>
pub fn get_experience_configuration(&self) -> &::std::option::Option<crate::types::AnonymousUserEmbeddingExperienceConfiguration> {
self.inner.get_experience_configuration()
}
///
/// Appends an item to `AllowedDomains`.
///
/// To override the contents of this collection use [`set_allowed_domains`](Self::set_allowed_domains).
///
/// <p>The domains that you want to add to the allow list for access to the generated URL that is then embedded. This optional parameter overrides the static domains that are configured in the Manage Quick Sight menu in the Amazon Quick Sight console. Instead, it allows only the domains that you include in this parameter. You can list up to three domains or subdomains in each API call.</p>
/// <p>To include all subdomains under a specific domain to the allow list, use <code>*</code>. For example, <code>https://*.sapp.amazon.com</code> includes all subdomains under <code>https://sapp.amazon.com</code>.</p>
pub fn allowed_domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.allowed_domains(input.into());
self
}
/// <p>The domains that you want to add to the allow list for access to the generated URL that is then embedded. This optional parameter overrides the static domains that are configured in the Manage Quick Sight menu in the Amazon Quick Sight console. Instead, it allows only the domains that you include in this parameter. You can list up to three domains or subdomains in each API call.</p>
/// <p>To include all subdomains under a specific domain to the allow list, use <code>*</code>. For example, <code>https://*.sapp.amazon.com</code> includes all subdomains under <code>https://sapp.amazon.com</code>.</p>
pub fn set_allowed_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.inner = self.inner.set_allowed_domains(input);
self
}
/// <p>The domains that you want to add to the allow list for access to the generated URL that is then embedded. This optional parameter overrides the static domains that are configured in the Manage Quick Sight menu in the Amazon Quick Sight console. Instead, it allows only the domains that you include in this parameter. You can list up to three domains or subdomains in each API call.</p>
/// <p>To include all subdomains under a specific domain to the allow list, use <code>*</code>. For example, <code>https://*.sapp.amazon.com</code> includes all subdomains under <code>https://sapp.amazon.com</code>.</p>
pub fn get_allowed_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_allowed_domains()
}
}