aws_sdk_rds/operation/modify_tenant_database/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_tenant_database::_modify_tenant_database_output::ModifyTenantDatabaseOutputBuilder;
3
4pub use crate::operation::modify_tenant_database::_modify_tenant_database_input::ModifyTenantDatabaseInputBuilder;
5
6impl crate::operation::modify_tenant_database::builders::ModifyTenantDatabaseInputBuilder {
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::modify_tenant_database::ModifyTenantDatabaseOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::modify_tenant_database::ModifyTenantDatabaseError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.modify_tenant_database();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ModifyTenantDatabase`.
24///
25/// <p>Modifies an existing tenant database in a DB instance. You can change the tenant database name or the master user password. This operation is supported only for RDS for Oracle CDB instances using the multi-tenant configuration.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ModifyTenantDatabaseFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::modify_tenant_database::builders::ModifyTenantDatabaseInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::modify_tenant_database::ModifyTenantDatabaseOutput,
35 crate::operation::modify_tenant_database::ModifyTenantDatabaseError,
36 > for ModifyTenantDatabaseFluentBuilder
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::modify_tenant_database::ModifyTenantDatabaseOutput,
44 crate::operation::modify_tenant_database::ModifyTenantDatabaseError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl ModifyTenantDatabaseFluentBuilder {
51 /// Creates a new `ModifyTenantDatabaseFluentBuilder`.
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 ModifyTenantDatabase as a reference.
60 pub fn as_input(&self) -> &crate::operation::modify_tenant_database::builders::ModifyTenantDatabaseInputBuilder {
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::modify_tenant_database::ModifyTenantDatabaseOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::modify_tenant_database::ModifyTenantDatabaseError,
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::modify_tenant_database::ModifyTenantDatabase::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::modify_tenant_database::ModifyTenantDatabase::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::modify_tenant_database::ModifyTenantDatabaseOutput,
97 crate::operation::modify_tenant_database::ModifyTenantDatabaseError,
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 identifier of the DB instance that contains the tenant database that you are modifying. This parameter isn't case-sensitive.</p>
112 /// <p>Constraints:</p>
113 /// <ul>
114 /// <li>
115 /// <p>Must match the identifier of an existing DB instance.</p></li>
116 /// </ul>
117 pub fn db_instance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.inner = self.inner.db_instance_identifier(input.into());
119 self
120 }
121 /// <p>The identifier of the DB instance that contains the tenant database that you are modifying. This parameter isn't case-sensitive.</p>
122 /// <p>Constraints:</p>
123 /// <ul>
124 /// <li>
125 /// <p>Must match the identifier of an existing DB instance.</p></li>
126 /// </ul>
127 pub fn set_db_instance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.inner = self.inner.set_db_instance_identifier(input);
129 self
130 }
131 /// <p>The identifier of the DB instance that contains the tenant database that you are modifying. This parameter isn't case-sensitive.</p>
132 /// <p>Constraints:</p>
133 /// <ul>
134 /// <li>
135 /// <p>Must match the identifier of an existing DB instance.</p></li>
136 /// </ul>
137 pub fn get_db_instance_identifier(&self) -> &::std::option::Option<::std::string::String> {
138 self.inner.get_db_instance_identifier()
139 }
140 /// <p>The user-supplied name of the tenant database that you want to modify. This parameter isn’t case-sensitive.</p>
141 /// <p>Constraints:</p>
142 /// <ul>
143 /// <li>
144 /// <p>Must match the identifier of an existing tenant database.</p></li>
145 /// </ul>
146 pub fn tenant_db_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.inner = self.inner.tenant_db_name(input.into());
148 self
149 }
150 /// <p>The user-supplied name of the tenant database that you want to modify. This parameter isn’t case-sensitive.</p>
151 /// <p>Constraints:</p>
152 /// <ul>
153 /// <li>
154 /// <p>Must match the identifier of an existing tenant database.</p></li>
155 /// </ul>
156 pub fn set_tenant_db_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157 self.inner = self.inner.set_tenant_db_name(input);
158 self
159 }
160 /// <p>The user-supplied name of the tenant database that you want to modify. This parameter isn’t case-sensitive.</p>
161 /// <p>Constraints:</p>
162 /// <ul>
163 /// <li>
164 /// <p>Must match the identifier of an existing tenant database.</p></li>
165 /// </ul>
166 pub fn get_tenant_db_name(&self) -> &::std::option::Option<::std::string::String> {
167 self.inner.get_tenant_db_name()
168 }
169 /// <p>The new password for the master user of the specified tenant database in your DB instance.</p><note>
170 /// <p>Amazon RDS operations never return the password, so this action provides a way to regain access to a tenant database user if the password is lost. This includes restoring privileges that might have been accidentally revoked.</p>
171 /// </note>
172 /// <p>Constraints:</p>
173 /// <ul>
174 /// <li>
175 /// <p>Can include any printable ASCII character except <code>/</code>, <code>"</code> (double quote), <code>@</code>, <code>&</code> (ampersand), and <code>'</code> (single quote).</p></li>
176 /// </ul>
177 /// <p>Length constraints:</p>
178 /// <ul>
179 /// <li>
180 /// <p>Must contain between 8 and 30 characters.</p></li>
181 /// </ul>
182 pub fn master_user_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183 self.inner = self.inner.master_user_password(input.into());
184 self
185 }
186 /// <p>The new password for the master user of the specified tenant database in your DB instance.</p><note>
187 /// <p>Amazon RDS operations never return the password, so this action provides a way to regain access to a tenant database user if the password is lost. This includes restoring privileges that might have been accidentally revoked.</p>
188 /// </note>
189 /// <p>Constraints:</p>
190 /// <ul>
191 /// <li>
192 /// <p>Can include any printable ASCII character except <code>/</code>, <code>"</code> (double quote), <code>@</code>, <code>&</code> (ampersand), and <code>'</code> (single quote).</p></li>
193 /// </ul>
194 /// <p>Length constraints:</p>
195 /// <ul>
196 /// <li>
197 /// <p>Must contain between 8 and 30 characters.</p></li>
198 /// </ul>
199 pub fn set_master_user_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200 self.inner = self.inner.set_master_user_password(input);
201 self
202 }
203 /// <p>The new password for the master user of the specified tenant database in your DB instance.</p><note>
204 /// <p>Amazon RDS operations never return the password, so this action provides a way to regain access to a tenant database user if the password is lost. This includes restoring privileges that might have been accidentally revoked.</p>
205 /// </note>
206 /// <p>Constraints:</p>
207 /// <ul>
208 /// <li>
209 /// <p>Can include any printable ASCII character except <code>/</code>, <code>"</code> (double quote), <code>@</code>, <code>&</code> (ampersand), and <code>'</code> (single quote).</p></li>
210 /// </ul>
211 /// <p>Length constraints:</p>
212 /// <ul>
213 /// <li>
214 /// <p>Must contain between 8 and 30 characters.</p></li>
215 /// </ul>
216 pub fn get_master_user_password(&self) -> &::std::option::Option<::std::string::String> {
217 self.inner.get_master_user_password()
218 }
219 /// <p>The new name of the tenant database when renaming a tenant database. This parameter isn’t case-sensitive.</p>
220 /// <p>Constraints:</p>
221 /// <ul>
222 /// <li>
223 /// <p>Can't be the string null or any other reserved word.</p></li>
224 /// <li>
225 /// <p>Can't be longer than 8 characters.</p></li>
226 /// </ul>
227 pub fn new_tenant_db_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228 self.inner = self.inner.new_tenant_db_name(input.into());
229 self
230 }
231 /// <p>The new name of the tenant database when renaming a tenant database. This parameter isn’t case-sensitive.</p>
232 /// <p>Constraints:</p>
233 /// <ul>
234 /// <li>
235 /// <p>Can't be the string null or any other reserved word.</p></li>
236 /// <li>
237 /// <p>Can't be longer than 8 characters.</p></li>
238 /// </ul>
239 pub fn set_new_tenant_db_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
240 self.inner = self.inner.set_new_tenant_db_name(input);
241 self
242 }
243 /// <p>The new name of the tenant database when renaming a tenant database. This parameter isn’t case-sensitive.</p>
244 /// <p>Constraints:</p>
245 /// <ul>
246 /// <li>
247 /// <p>Can't be the string null or any other reserved word.</p></li>
248 /// <li>
249 /// <p>Can't be longer than 8 characters.</p></li>
250 /// </ul>
251 pub fn get_new_tenant_db_name(&self) -> &::std::option::Option<::std::string::String> {
252 self.inner.get_new_tenant_db_name()
253 }
254 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
255 /// <p>If the tenant database doesn't manage the master user password with Amazon Web Services Secrets Manager, you can turn on this management. In this case, you can't specify <code>MasterUserPassword</code>.</p>
256 /// <p>If the tenant database already manages the master user password with Amazon Web Services Secrets Manager, and you specify that the master user password is not managed with Amazon Web Services Secrets Manager, then you must specify <code>MasterUserPassword</code>. In this case, Amazon RDS deletes the secret and uses the new password for the master user specified by <code>MasterUserPassword</code>.</p>
257 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html">Password management with Amazon Web Services Secrets Manager</a> in the <i>Amazon RDS User Guide.</i></p>
258 /// <p>Constraints:</p>
259 /// <ul>
260 /// <li>
261 /// <p>Can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p></li>
262 /// </ul>
263 pub fn manage_master_user_password(mut self, input: bool) -> Self {
264 self.inner = self.inner.manage_master_user_password(input);
265 self
266 }
267 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
268 /// <p>If the tenant database doesn't manage the master user password with Amazon Web Services Secrets Manager, you can turn on this management. In this case, you can't specify <code>MasterUserPassword</code>.</p>
269 /// <p>If the tenant database already manages the master user password with Amazon Web Services Secrets Manager, and you specify that the master user password is not managed with Amazon Web Services Secrets Manager, then you must specify <code>MasterUserPassword</code>. In this case, Amazon RDS deletes the secret and uses the new password for the master user specified by <code>MasterUserPassword</code>.</p>
270 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html">Password management with Amazon Web Services Secrets Manager</a> in the <i>Amazon RDS User Guide.</i></p>
271 /// <p>Constraints:</p>
272 /// <ul>
273 /// <li>
274 /// <p>Can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p></li>
275 /// </ul>
276 pub fn set_manage_master_user_password(mut self, input: ::std::option::Option<bool>) -> Self {
277 self.inner = self.inner.set_manage_master_user_password(input);
278 self
279 }
280 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
281 /// <p>If the tenant database doesn't manage the master user password with Amazon Web Services Secrets Manager, you can turn on this management. In this case, you can't specify <code>MasterUserPassword</code>.</p>
282 /// <p>If the tenant database already manages the master user password with Amazon Web Services Secrets Manager, and you specify that the master user password is not managed with Amazon Web Services Secrets Manager, then you must specify <code>MasterUserPassword</code>. In this case, Amazon RDS deletes the secret and uses the new password for the master user specified by <code>MasterUserPassword</code>.</p>
283 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html">Password management with Amazon Web Services Secrets Manager</a> in the <i>Amazon RDS User Guide.</i></p>
284 /// <p>Constraints:</p>
285 /// <ul>
286 /// <li>
287 /// <p>Can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p></li>
288 /// </ul>
289 pub fn get_manage_master_user_password(&self) -> &::std::option::Option<bool> {
290 self.inner.get_manage_master_user_password()
291 }
292 /// <p>Specifies whether to rotate the secret managed by Amazon Web Services Secrets Manager for the master user password.</p>
293 /// <p>This setting is valid only if the master user password is managed by RDS in Amazon Web Services Secrets Manager for the DB instance. The secret value contains the updated password.</p>
294 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html">Password management with Amazon Web Services Secrets Manager</a> in the <i>Amazon RDS User Guide.</i></p>
295 /// <p>Constraints:</p>
296 /// <ul>
297 /// <li>
298 /// <p>You must apply the change immediately when rotating the master user password.</p></li>
299 /// </ul>
300 pub fn rotate_master_user_password(mut self, input: bool) -> Self {
301 self.inner = self.inner.rotate_master_user_password(input);
302 self
303 }
304 /// <p>Specifies whether to rotate the secret managed by Amazon Web Services Secrets Manager for the master user password.</p>
305 /// <p>This setting is valid only if the master user password is managed by RDS in Amazon Web Services Secrets Manager for the DB instance. The secret value contains the updated password.</p>
306 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html">Password management with Amazon Web Services Secrets Manager</a> in the <i>Amazon RDS User Guide.</i></p>
307 /// <p>Constraints:</p>
308 /// <ul>
309 /// <li>
310 /// <p>You must apply the change immediately when rotating the master user password.</p></li>
311 /// </ul>
312 pub fn set_rotate_master_user_password(mut self, input: ::std::option::Option<bool>) -> Self {
313 self.inner = self.inner.set_rotate_master_user_password(input);
314 self
315 }
316 /// <p>Specifies whether to rotate the secret managed by Amazon Web Services Secrets Manager for the master user password.</p>
317 /// <p>This setting is valid only if the master user password is managed by RDS in Amazon Web Services Secrets Manager for the DB instance. The secret value contains the updated password.</p>
318 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html">Password management with Amazon Web Services Secrets Manager</a> in the <i>Amazon RDS User Guide.</i></p>
319 /// <p>Constraints:</p>
320 /// <ul>
321 /// <li>
322 /// <p>You must apply the change immediately when rotating the master user password.</p></li>
323 /// </ul>
324 pub fn get_rotate_master_user_password(&self) -> &::std::option::Option<bool> {
325 self.inner.get_rotate_master_user_password()
326 }
327 /// <p>The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.</p>
328 /// <p>This setting is valid only if both of the following conditions are met:</p>
329 /// <ul>
330 /// <li>
331 /// <p>The tenant database doesn't manage the master user password in Amazon Web Services Secrets Manager.</p>
332 /// <p>If the tenant database already manages the master user password in Amazon Web Services Secrets Manager, you can't change the KMS key used to encrypt the secret.</p></li>
333 /// <li>
334 /// <p>You're turning on <code>ManageMasterUserPassword</code> to manage the master user password in Amazon Web Services Secrets Manager.</p>
335 /// <p>If you're turning on <code>ManageMasterUserPassword</code> and don't specify <code>MasterUserSecretKmsKeyId</code>, then the <code>aws/secretsmanager</code> KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the <code>aws/secretsmanager</code> KMS key to encrypt the secret, and you must use a self-managed KMS key.</p></li>
336 /// </ul>
337 /// <p>The Amazon Web Services KMS key identifier is any of the following:</p>
338 /// <ul>
339 /// <li>
340 /// <p>Key ARN</p></li>
341 /// <li>
342 /// <p>Key ID</p></li>
343 /// <li>
344 /// <p>Alias ARN</p></li>
345 /// <li>
346 /// <p>Alias name for the KMS key</p></li>
347 /// </ul>
348 /// <p>To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
349 /// <p>A default KMS key exists for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
350 pub fn master_user_secret_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351 self.inner = self.inner.master_user_secret_kms_key_id(input.into());
352 self
353 }
354 /// <p>The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.</p>
355 /// <p>This setting is valid only if both of the following conditions are met:</p>
356 /// <ul>
357 /// <li>
358 /// <p>The tenant database doesn't manage the master user password in Amazon Web Services Secrets Manager.</p>
359 /// <p>If the tenant database already manages the master user password in Amazon Web Services Secrets Manager, you can't change the KMS key used to encrypt the secret.</p></li>
360 /// <li>
361 /// <p>You're turning on <code>ManageMasterUserPassword</code> to manage the master user password in Amazon Web Services Secrets Manager.</p>
362 /// <p>If you're turning on <code>ManageMasterUserPassword</code> and don't specify <code>MasterUserSecretKmsKeyId</code>, then the <code>aws/secretsmanager</code> KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the <code>aws/secretsmanager</code> KMS key to encrypt the secret, and you must use a self-managed KMS key.</p></li>
363 /// </ul>
364 /// <p>The Amazon Web Services KMS key identifier is any of the following:</p>
365 /// <ul>
366 /// <li>
367 /// <p>Key ARN</p></li>
368 /// <li>
369 /// <p>Key ID</p></li>
370 /// <li>
371 /// <p>Alias ARN</p></li>
372 /// <li>
373 /// <p>Alias name for the KMS key</p></li>
374 /// </ul>
375 /// <p>To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
376 /// <p>A default KMS key exists for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
377 pub fn set_master_user_secret_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
378 self.inner = self.inner.set_master_user_secret_kms_key_id(input);
379 self
380 }
381 /// <p>The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.</p>
382 /// <p>This setting is valid only if both of the following conditions are met:</p>
383 /// <ul>
384 /// <li>
385 /// <p>The tenant database doesn't manage the master user password in Amazon Web Services Secrets Manager.</p>
386 /// <p>If the tenant database already manages the master user password in Amazon Web Services Secrets Manager, you can't change the KMS key used to encrypt the secret.</p></li>
387 /// <li>
388 /// <p>You're turning on <code>ManageMasterUserPassword</code> to manage the master user password in Amazon Web Services Secrets Manager.</p>
389 /// <p>If you're turning on <code>ManageMasterUserPassword</code> and don't specify <code>MasterUserSecretKmsKeyId</code>, then the <code>aws/secretsmanager</code> KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the <code>aws/secretsmanager</code> KMS key to encrypt the secret, and you must use a self-managed KMS key.</p></li>
390 /// </ul>
391 /// <p>The Amazon Web Services KMS key identifier is any of the following:</p>
392 /// <ul>
393 /// <li>
394 /// <p>Key ARN</p></li>
395 /// <li>
396 /// <p>Key ID</p></li>
397 /// <li>
398 /// <p>Alias ARN</p></li>
399 /// <li>
400 /// <p>Alias name for the KMS key</p></li>
401 /// </ul>
402 /// <p>To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
403 /// <p>A default KMS key exists for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
404 pub fn get_master_user_secret_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
405 self.inner.get_master_user_secret_kms_key_id()
406 }
407}