aws_sdk_rds/operation/create_tenant_database/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_tenant_database::_create_tenant_database_output::CreateTenantDatabaseOutputBuilder;
3
4pub use crate::operation::create_tenant_database::_create_tenant_database_input::CreateTenantDatabaseInputBuilder;
5
6impl crate::operation::create_tenant_database::builders::CreateTenantDatabaseInputBuilder {
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::create_tenant_database::CreateTenantDatabaseOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_tenant_database::CreateTenantDatabaseError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_tenant_database();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateTenantDatabase`.
24///
25/// <p>Creates a tenant database in a DB instance that uses the multi-tenant configuration. Only RDS for Oracle container database (CDB) instances are supported.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateTenantDatabaseFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_tenant_database::builders::CreateTenantDatabaseInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_tenant_database::CreateTenantDatabaseOutput,
35 crate::operation::create_tenant_database::CreateTenantDatabaseError,
36 > for CreateTenantDatabaseFluentBuilder
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::create_tenant_database::CreateTenantDatabaseOutput,
44 crate::operation::create_tenant_database::CreateTenantDatabaseError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateTenantDatabaseFluentBuilder {
51 /// Creates a new `CreateTenantDatabaseFluentBuilder`.
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 CreateTenantDatabase as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_tenant_database::builders::CreateTenantDatabaseInputBuilder {
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::create_tenant_database::CreateTenantDatabaseOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_tenant_database::CreateTenantDatabaseError,
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::create_tenant_database::CreateTenantDatabase::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_tenant_database::CreateTenantDatabase::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::create_tenant_database::CreateTenantDatabaseOutput,
97 crate::operation::create_tenant_database::CreateTenantDatabaseError,
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 user-supplied DB instance identifier. RDS creates your tenant database in this DB instance. This parameter isn't case-sensitive.</p>
112 pub fn db_instance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.db_instance_identifier(input.into());
114 self
115 }
116 /// <p>The user-supplied DB instance identifier. RDS creates your tenant database in this DB instance. This parameter isn't case-sensitive.</p>
117 pub fn set_db_instance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_db_instance_identifier(input);
119 self
120 }
121 /// <p>The user-supplied DB instance identifier. RDS creates your tenant database in this DB instance. This parameter isn't case-sensitive.</p>
122 pub fn get_db_instance_identifier(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_db_instance_identifier()
124 }
125 /// <p>The user-supplied name of the tenant database that you want to create in your DB instance. This parameter has the same constraints as <code>DBName</code> in <code>CreateDBInstance</code>.</p>
126 pub fn tenant_db_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.tenant_db_name(input.into());
128 self
129 }
130 /// <p>The user-supplied name of the tenant database that you want to create in your DB instance. This parameter has the same constraints as <code>DBName</code> in <code>CreateDBInstance</code>.</p>
131 pub fn set_tenant_db_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_tenant_db_name(input);
133 self
134 }
135 /// <p>The user-supplied name of the tenant database that you want to create in your DB instance. This parameter has the same constraints as <code>DBName</code> in <code>CreateDBInstance</code>.</p>
136 pub fn get_tenant_db_name(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_tenant_db_name()
138 }
139 /// <p>The name for the master user account in your tenant database. RDS creates this user account in the tenant database and grants privileges to the master user. This parameter is case-sensitive.</p>
140 /// <p>Constraints:</p>
141 /// <ul>
142 /// <li>
143 /// <p>Must be 1 to 16 letters, numbers, or underscores.</p></li>
144 /// <li>
145 /// <p>First character must be a letter.</p></li>
146 /// <li>
147 /// <p>Can't be a reserved word for the chosen database engine.</p></li>
148 /// </ul>
149 pub fn master_username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.inner = self.inner.master_username(input.into());
151 self
152 }
153 /// <p>The name for the master user account in your tenant database. RDS creates this user account in the tenant database and grants privileges to the master user. This parameter is case-sensitive.</p>
154 /// <p>Constraints:</p>
155 /// <ul>
156 /// <li>
157 /// <p>Must be 1 to 16 letters, numbers, or underscores.</p></li>
158 /// <li>
159 /// <p>First character must be a letter.</p></li>
160 /// <li>
161 /// <p>Can't be a reserved word for the chosen database engine.</p></li>
162 /// </ul>
163 pub fn set_master_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.inner = self.inner.set_master_username(input);
165 self
166 }
167 /// <p>The name for the master user account in your tenant database. RDS creates this user account in the tenant database and grants privileges to the master user. This parameter is case-sensitive.</p>
168 /// <p>Constraints:</p>
169 /// <ul>
170 /// <li>
171 /// <p>Must be 1 to 16 letters, numbers, or underscores.</p></li>
172 /// <li>
173 /// <p>First character must be a letter.</p></li>
174 /// <li>
175 /// <p>Can't be a reserved word for the chosen database engine.</p></li>
176 /// </ul>
177 pub fn get_master_username(&self) -> &::std::option::Option<::std::string::String> {
178 self.inner.get_master_username()
179 }
180 /// <p>The password for the master user in your tenant database.</p>
181 /// <p>Constraints:</p>
182 /// <ul>
183 /// <li>
184 /// <p>Must be 8 to 30 characters.</p></li>
185 /// <li>
186 /// <p>Can include any printable ASCII character except forward slash (<code>/</code>), double quote (<code>"</code>), at symbol (<code>@</code>), ampersand (<code>&</code>), or single quote (<code>'</code>).</p></li>
187 /// <li>
188 /// <p>Can't be specified when <code>ManageMasterUserPassword</code> is enabled.</p></li>
189 /// </ul>
190 pub fn master_user_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191 self.inner = self.inner.master_user_password(input.into());
192 self
193 }
194 /// <p>The password for the master user in your tenant database.</p>
195 /// <p>Constraints:</p>
196 /// <ul>
197 /// <li>
198 /// <p>Must be 8 to 30 characters.</p></li>
199 /// <li>
200 /// <p>Can include any printable ASCII character except forward slash (<code>/</code>), double quote (<code>"</code>), at symbol (<code>@</code>), ampersand (<code>&</code>), or single quote (<code>'</code>).</p></li>
201 /// <li>
202 /// <p>Can't be specified when <code>ManageMasterUserPassword</code> is enabled.</p></li>
203 /// </ul>
204 pub fn set_master_user_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205 self.inner = self.inner.set_master_user_password(input);
206 self
207 }
208 /// <p>The password for the master user in your tenant database.</p>
209 /// <p>Constraints:</p>
210 /// <ul>
211 /// <li>
212 /// <p>Must be 8 to 30 characters.</p></li>
213 /// <li>
214 /// <p>Can include any printable ASCII character except forward slash (<code>/</code>), double quote (<code>"</code>), at symbol (<code>@</code>), ampersand (<code>&</code>), or single quote (<code>'</code>).</p></li>
215 /// <li>
216 /// <p>Can't be specified when <code>ManageMasterUserPassword</code> is enabled.</p></li>
217 /// </ul>
218 pub fn get_master_user_password(&self) -> &::std::option::Option<::std::string::String> {
219 self.inner.get_master_user_password()
220 }
221 /// <p>The character set for your tenant database. If you don't specify a value, the character set name defaults to <code>AL32UTF8</code>.</p>
222 pub fn character_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.inner = self.inner.character_set_name(input.into());
224 self
225 }
226 /// <p>The character set for your tenant database. If you don't specify a value, the character set name defaults to <code>AL32UTF8</code>.</p>
227 pub fn set_character_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.inner = self.inner.set_character_set_name(input);
229 self
230 }
231 /// <p>The character set for your tenant database. If you don't specify a value, the character set name defaults to <code>AL32UTF8</code>.</p>
232 pub fn get_character_set_name(&self) -> &::std::option::Option<::std::string::String> {
233 self.inner.get_character_set_name()
234 }
235 /// <p>The <code>NCHAR</code> value for the tenant database.</p>
236 pub fn nchar_character_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237 self.inner = self.inner.nchar_character_set_name(input.into());
238 self
239 }
240 /// <p>The <code>NCHAR</code> value for the tenant database.</p>
241 pub fn set_nchar_character_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242 self.inner = self.inner.set_nchar_character_set_name(input);
243 self
244 }
245 /// <p>The <code>NCHAR</code> value for the tenant database.</p>
246 pub fn get_nchar_character_set_name(&self) -> &::std::option::Option<::std::string::String> {
247 self.inner.get_nchar_character_set_name()
248 }
249 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
250 /// <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>
251 /// <p>Constraints:</p>
252 /// <ul>
253 /// <li>
254 /// <p>Can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p></li>
255 /// </ul>
256 pub fn manage_master_user_password(mut self, input: bool) -> Self {
257 self.inner = self.inner.manage_master_user_password(input);
258 self
259 }
260 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
261 /// <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>
262 /// <p>Constraints:</p>
263 /// <ul>
264 /// <li>
265 /// <p>Can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p></li>
266 /// </ul>
267 pub fn set_manage_master_user_password(mut self, input: ::std::option::Option<bool>) -> Self {
268 self.inner = self.inner.set_manage_master_user_password(input);
269 self
270 }
271 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
272 /// <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>
273 /// <p>Constraints:</p>
274 /// <ul>
275 /// <li>
276 /// <p>Can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p></li>
277 /// </ul>
278 pub fn get_manage_master_user_password(&self) -> &::std::option::Option<bool> {
279 self.inner.get_manage_master_user_password()
280 }
281 /// <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>
282 /// <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.</p>
283 /// <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
284 /// <p>If you 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 customer managed KMS key.</p>
285 /// <p>There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
286 pub fn master_user_secret_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
287 self.inner = self.inner.master_user_secret_kms_key_id(input.into());
288 self
289 }
290 /// <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>
291 /// <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.</p>
292 /// <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
293 /// <p>If you 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 customer managed KMS key.</p>
294 /// <p>There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
295 pub fn set_master_user_secret_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296 self.inner = self.inner.set_master_user_secret_kms_key_id(input);
297 self
298 }
299 /// <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>
300 /// <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.</p>
301 /// <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
302 /// <p>If you 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 customer managed KMS key.</p>
303 /// <p>There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
304 pub fn get_master_user_secret_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
305 self.inner.get_master_user_secret_kms_key_id()
306 }
307 ///
308 /// Appends an item to `Tags`.
309 ///
310 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
311 ///
312 /// <p>A list of tags.</p>
313 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
314 pub fn tags(mut self, input: crate::types::Tag) -> Self {
315 self.inner = self.inner.tags(input);
316 self
317 }
318 /// <p>A list of tags.</p>
319 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
320 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
321 self.inner = self.inner.set_tags(input);
322 self
323 }
324 /// <p>A list of tags.</p>
325 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
326 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
327 self.inner.get_tags()
328 }
329}