aws_sdk_quicksight/operation/update_user/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_user::_update_user_output::UpdateUserOutputBuilder;
3
4pub use crate::operation::update_user::_update_user_input::UpdateUserInputBuilder;
5
6impl crate::operation::update_user::builders::UpdateUserInputBuilder {
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::update_user::UpdateUserOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_user::UpdateUserError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_user();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateUser`.
24///
25/// <p>Updates an Amazon Quick Sight user.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateUserFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::update_user::builders::UpdateUserInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::update_user::UpdateUserOutput,
35 crate::operation::update_user::UpdateUserError,
36 > for UpdateUserFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::update_user::UpdateUserOutput,
44 crate::operation::update_user::UpdateUserError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl UpdateUserFluentBuilder {
51 /// Creates a new `UpdateUserFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the UpdateUser as a reference.
60 pub fn as_input(&self) -> &crate::operation::update_user::builders::UpdateUserInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::update_user::UpdateUserOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::update_user::UpdateUserError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::update_user::UpdateUser::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::update_user::UpdateUser::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::update_user::UpdateUserOutput,
97 crate::operation::update_user::UpdateUserError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>The Amazon Quick Sight user name that you want to update.</p>
112 pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.user_name(input.into());
114 self
115 }
116 /// <p>The Amazon Quick Sight user name that you want to update.</p>
117 pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_user_name(input);
119 self
120 }
121 /// <p>The Amazon Quick Sight user name that you want to update.</p>
122 pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_user_name()
124 }
125 /// <p>The ID for the Amazon Web Services account that the user is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.</p>
126 pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.aws_account_id(input.into());
128 self
129 }
130 /// <p>The ID for the Amazon Web Services account that the user is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.</p>
131 pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_aws_account_id(input);
133 self
134 }
135 /// <p>The ID for the Amazon Web Services account that the user is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.</p>
136 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_aws_account_id()
138 }
139 /// <p>The namespace. Currently, you should set this to <code>default</code>.</p>
140 pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 self.inner = self.inner.namespace(input.into());
142 self
143 }
144 /// <p>The namespace. Currently, you should set this to <code>default</code>.</p>
145 pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146 self.inner = self.inner.set_namespace(input);
147 self
148 }
149 /// <p>The namespace. Currently, you should set this to <code>default</code>.</p>
150 pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
151 self.inner.get_namespace()
152 }
153 /// <p>The email address of the user that you want to update.</p>
154 pub fn email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155 self.inner = self.inner.email(input.into());
156 self
157 }
158 /// <p>The email address of the user that you want to update.</p>
159 pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160 self.inner = self.inner.set_email(input);
161 self
162 }
163 /// <p>The email address of the user that you want to update.</p>
164 pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
165 self.inner.get_email()
166 }
167 /// <p>The Amazon Quick Sight role of the user. The role can be one of the following default security cohorts:</p>
168 /// <ul>
169 /// <li>
170 /// <p><code>READER</code>: A user who has read-only access to dashboards.</p></li>
171 /// <li>
172 /// <p><code>AUTHOR</code>: A user who can create data sources, datasets, analyses, and dashboards.</p></li>
173 /// <li>
174 /// <p><code>ADMIN</code>: A user who is an author, who can also manage Amazon Quick Sight settings.</p></li>
175 /// <li>
176 /// <p><code>READER_PRO</code>: Reader Pro adds Generative BI capabilities to the Reader role. Reader Pros have access to Amazon Q in Quick Sight, can build stories with Amazon Q, and can generate executive summaries from dashboards.</p></li>
177 /// <li>
178 /// <p><code>AUTHOR_PRO</code>: Author Pro adds Generative BI capabilities to the Author role. Author Pros can author dashboards with natural language with Amazon Q, build stories with Amazon Q, create Topics for Q&A, and generate executive summaries from dashboards.</p></li>
179 /// <li>
180 /// <p><code>ADMIN_PRO</code>: Admin Pros are Author Pros who can also manage Amazon Quick Sight administrative settings. Admin Pro users are billed at Author Pro pricing.</p></li>
181 /// </ul>
182 /// <p>The name of the Quick Sight role is invisible to the user except for the console screens dealing with permissions.</p>
183 pub fn role(mut self, input: crate::types::UserRole) -> Self {
184 self.inner = self.inner.role(input);
185 self
186 }
187 /// <p>The Amazon Quick Sight role of the user. The role can be one of the following default security cohorts:</p>
188 /// <ul>
189 /// <li>
190 /// <p><code>READER</code>: A user who has read-only access to dashboards.</p></li>
191 /// <li>
192 /// <p><code>AUTHOR</code>: A user who can create data sources, datasets, analyses, and dashboards.</p></li>
193 /// <li>
194 /// <p><code>ADMIN</code>: A user who is an author, who can also manage Amazon Quick Sight settings.</p></li>
195 /// <li>
196 /// <p><code>READER_PRO</code>: Reader Pro adds Generative BI capabilities to the Reader role. Reader Pros have access to Amazon Q in Quick Sight, can build stories with Amazon Q, and can generate executive summaries from dashboards.</p></li>
197 /// <li>
198 /// <p><code>AUTHOR_PRO</code>: Author Pro adds Generative BI capabilities to the Author role. Author Pros can author dashboards with natural language with Amazon Q, build stories with Amazon Q, create Topics for Q&A, and generate executive summaries from dashboards.</p></li>
199 /// <li>
200 /// <p><code>ADMIN_PRO</code>: Admin Pros are Author Pros who can also manage Amazon Quick Sight administrative settings. Admin Pro users are billed at Author Pro pricing.</p></li>
201 /// </ul>
202 /// <p>The name of the Quick Sight role is invisible to the user except for the console screens dealing with permissions.</p>
203 pub fn set_role(mut self, input: ::std::option::Option<crate::types::UserRole>) -> Self {
204 self.inner = self.inner.set_role(input);
205 self
206 }
207 /// <p>The Amazon Quick Sight role of the user. The role can be one of the following default security cohorts:</p>
208 /// <ul>
209 /// <li>
210 /// <p><code>READER</code>: A user who has read-only access to dashboards.</p></li>
211 /// <li>
212 /// <p><code>AUTHOR</code>: A user who can create data sources, datasets, analyses, and dashboards.</p></li>
213 /// <li>
214 /// <p><code>ADMIN</code>: A user who is an author, who can also manage Amazon Quick Sight settings.</p></li>
215 /// <li>
216 /// <p><code>READER_PRO</code>: Reader Pro adds Generative BI capabilities to the Reader role. Reader Pros have access to Amazon Q in Quick Sight, can build stories with Amazon Q, and can generate executive summaries from dashboards.</p></li>
217 /// <li>
218 /// <p><code>AUTHOR_PRO</code>: Author Pro adds Generative BI capabilities to the Author role. Author Pros can author dashboards with natural language with Amazon Q, build stories with Amazon Q, create Topics for Q&A, and generate executive summaries from dashboards.</p></li>
219 /// <li>
220 /// <p><code>ADMIN_PRO</code>: Admin Pros are Author Pros who can also manage Amazon Quick Sight administrative settings. Admin Pro users are billed at Author Pro pricing.</p></li>
221 /// </ul>
222 /// <p>The name of the Quick Sight role is invisible to the user except for the console screens dealing with permissions.</p>
223 pub fn get_role(&self) -> &::std::option::Option<crate::types::UserRole> {
224 self.inner.get_role()
225 }
226 /// <p>(Enterprise edition only) The name of the custom permissions profile that you want to assign to this user. Customized permissions allows you to control a user's access by restricting access the following operations:</p>
227 /// <ul>
228 /// <li>
229 /// <p>Create and update data sources</p></li>
230 /// <li>
231 /// <p>Create and update datasets</p></li>
232 /// <li>
233 /// <p>Create and update email reports</p></li>
234 /// <li>
235 /// <p>Subscribe to email reports</p></li>
236 /// </ul>
237 /// <p>A set of custom permissions includes any combination of these restrictions. Currently, you need to create the profile names for custom permission sets by using the Quick Sight console. Then, you use the <code>RegisterUser</code> API operation to assign the named set of permissions to a Quick Sight user.</p>
238 /// <p>Quick Sight custom permissions are applied through IAM policies. Therefore, they override the permissions typically granted by assigning Quick Sight users to one of the default security cohorts in Quick Sight (admin, author, reader).</p>
239 /// <p>This feature is available only to Quick Sight Enterprise edition subscriptions.</p>
240 pub fn custom_permissions_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241 self.inner = self.inner.custom_permissions_name(input.into());
242 self
243 }
244 /// <p>(Enterprise edition only) The name of the custom permissions profile that you want to assign to this user. Customized permissions allows you to control a user's access by restricting access the following operations:</p>
245 /// <ul>
246 /// <li>
247 /// <p>Create and update data sources</p></li>
248 /// <li>
249 /// <p>Create and update datasets</p></li>
250 /// <li>
251 /// <p>Create and update email reports</p></li>
252 /// <li>
253 /// <p>Subscribe to email reports</p></li>
254 /// </ul>
255 /// <p>A set of custom permissions includes any combination of these restrictions. Currently, you need to create the profile names for custom permission sets by using the Quick Sight console. Then, you use the <code>RegisterUser</code> API operation to assign the named set of permissions to a Quick Sight user.</p>
256 /// <p>Quick Sight custom permissions are applied through IAM policies. Therefore, they override the permissions typically granted by assigning Quick Sight users to one of the default security cohorts in Quick Sight (admin, author, reader).</p>
257 /// <p>This feature is available only to Quick Sight Enterprise edition subscriptions.</p>
258 pub fn set_custom_permissions_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.inner = self.inner.set_custom_permissions_name(input);
260 self
261 }
262 /// <p>(Enterprise edition only) The name of the custom permissions profile that you want to assign to this user. Customized permissions allows you to control a user's access by restricting access the following operations:</p>
263 /// <ul>
264 /// <li>
265 /// <p>Create and update data sources</p></li>
266 /// <li>
267 /// <p>Create and update datasets</p></li>
268 /// <li>
269 /// <p>Create and update email reports</p></li>
270 /// <li>
271 /// <p>Subscribe to email reports</p></li>
272 /// </ul>
273 /// <p>A set of custom permissions includes any combination of these restrictions. Currently, you need to create the profile names for custom permission sets by using the Quick Sight console. Then, you use the <code>RegisterUser</code> API operation to assign the named set of permissions to a Quick Sight user.</p>
274 /// <p>Quick Sight custom permissions are applied through IAM policies. Therefore, they override the permissions typically granted by assigning Quick Sight users to one of the default security cohorts in Quick Sight (admin, author, reader).</p>
275 /// <p>This feature is available only to Quick Sight Enterprise edition subscriptions.</p>
276 pub fn get_custom_permissions_name(&self) -> &::std::option::Option<::std::string::String> {
277 self.inner.get_custom_permissions_name()
278 }
279 /// <p>A flag that you use to indicate that you want to remove all custom permissions from this user. Using this parameter resets the user to the state it was in before a custom permissions profile was applied. This parameter defaults to NULL and it doesn't accept any other value.</p>
280 pub fn unapply_custom_permissions(mut self, input: bool) -> Self {
281 self.inner = self.inner.unapply_custom_permissions(input);
282 self
283 }
284 /// <p>A flag that you use to indicate that you want to remove all custom permissions from this user. Using this parameter resets the user to the state it was in before a custom permissions profile was applied. This parameter defaults to NULL and it doesn't accept any other value.</p>
285 pub fn set_unapply_custom_permissions(mut self, input: ::std::option::Option<bool>) -> Self {
286 self.inner = self.inner.set_unapply_custom_permissions(input);
287 self
288 }
289 /// <p>A flag that you use to indicate that you want to remove all custom permissions from this user. Using this parameter resets the user to the state it was in before a custom permissions profile was applied. This parameter defaults to NULL and it doesn't accept any other value.</p>
290 pub fn get_unapply_custom_permissions(&self) -> &::std::option::Option<bool> {
291 self.inner.get_unapply_custom_permissions()
292 }
293 /// <p>The type of supported external login provider that provides identity to let a user federate into Quick Sight with an associated Identity and Access Management(IAM) role. The type of supported external login provider can be one of the following.</p>
294 /// <ul>
295 /// <li>
296 /// <p><code>COGNITO</code>: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the <code>COGNITO</code> provider type, don’t use the "CustomFederationProviderUrl" parameter which is only needed when the external provider is custom.</p></li>
297 /// <li>
298 /// <p><code>CUSTOM_OIDC</code>: Custom OpenID Connect (OIDC) provider. When choosing <code>CUSTOM_OIDC</code> type, use the <code>CustomFederationProviderUrl</code> parameter to provide the custom OIDC provider URL.</p></li>
299 /// <li>
300 /// <p><code>NONE</code>: This clears all the previously saved external login information for a user. Use the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeUser.html">DescribeUser</a> </code> API operation to check the external login information.</p></li>
301 /// </ul>
302 pub fn external_login_federation_provider_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303 self.inner = self.inner.external_login_federation_provider_type(input.into());
304 self
305 }
306 /// <p>The type of supported external login provider that provides identity to let a user federate into Quick Sight with an associated Identity and Access Management(IAM) role. The type of supported external login provider can be one of the following.</p>
307 /// <ul>
308 /// <li>
309 /// <p><code>COGNITO</code>: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the <code>COGNITO</code> provider type, don’t use the "CustomFederationProviderUrl" parameter which is only needed when the external provider is custom.</p></li>
310 /// <li>
311 /// <p><code>CUSTOM_OIDC</code>: Custom OpenID Connect (OIDC) provider. When choosing <code>CUSTOM_OIDC</code> type, use the <code>CustomFederationProviderUrl</code> parameter to provide the custom OIDC provider URL.</p></li>
312 /// <li>
313 /// <p><code>NONE</code>: This clears all the previously saved external login information for a user. Use the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeUser.html">DescribeUser</a> </code> API operation to check the external login information.</p></li>
314 /// </ul>
315 pub fn set_external_login_federation_provider_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
316 self.inner = self.inner.set_external_login_federation_provider_type(input);
317 self
318 }
319 /// <p>The type of supported external login provider that provides identity to let a user federate into Quick Sight with an associated Identity and Access Management(IAM) role. The type of supported external login provider can be one of the following.</p>
320 /// <ul>
321 /// <li>
322 /// <p><code>COGNITO</code>: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the <code>COGNITO</code> provider type, don’t use the "CustomFederationProviderUrl" parameter which is only needed when the external provider is custom.</p></li>
323 /// <li>
324 /// <p><code>CUSTOM_OIDC</code>: Custom OpenID Connect (OIDC) provider. When choosing <code>CUSTOM_OIDC</code> type, use the <code>CustomFederationProviderUrl</code> parameter to provide the custom OIDC provider URL.</p></li>
325 /// <li>
326 /// <p><code>NONE</code>: This clears all the previously saved external login information for a user. Use the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeUser.html">DescribeUser</a> </code> API operation to check the external login information.</p></li>
327 /// </ul>
328 pub fn get_external_login_federation_provider_type(&self) -> &::std::option::Option<::std::string::String> {
329 self.inner.get_external_login_federation_provider_type()
330 }
331 /// <p>The URL of the custom OpenID Connect (OIDC) provider that provides identity to let a user federate into Quick Sight with an associated Identity and Access Management(IAM) role. This parameter should only be used when <code>ExternalLoginFederationProviderType</code> parameter is set to <code>CUSTOM_OIDC</code>.</p>
332 pub fn custom_federation_provider_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
333 self.inner = self.inner.custom_federation_provider_url(input.into());
334 self
335 }
336 /// <p>The URL of the custom OpenID Connect (OIDC) provider that provides identity to let a user federate into Quick Sight with an associated Identity and Access Management(IAM) role. This parameter should only be used when <code>ExternalLoginFederationProviderType</code> parameter is set to <code>CUSTOM_OIDC</code>.</p>
337 pub fn set_custom_federation_provider_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
338 self.inner = self.inner.set_custom_federation_provider_url(input);
339 self
340 }
341 /// <p>The URL of the custom OpenID Connect (OIDC) provider that provides identity to let a user federate into Quick Sight with an associated Identity and Access Management(IAM) role. This parameter should only be used when <code>ExternalLoginFederationProviderType</code> parameter is set to <code>CUSTOM_OIDC</code>.</p>
342 pub fn get_custom_federation_provider_url(&self) -> &::std::option::Option<::std::string::String> {
343 self.inner.get_custom_federation_provider_url()
344 }
345 /// <p>The identity ID for a user in the external login provider.</p>
346 pub fn external_login_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
347 self.inner = self.inner.external_login_id(input.into());
348 self
349 }
350 /// <p>The identity ID for a user in the external login provider.</p>
351 pub fn set_external_login_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
352 self.inner = self.inner.set_external_login_id(input);
353 self
354 }
355 /// <p>The identity ID for a user in the external login provider.</p>
356 pub fn get_external_login_id(&self) -> &::std::option::Option<::std::string::String> {
357 self.inner.get_external_login_id()
358 }
359}