aws_sdk_lightsail/operation/create_relational_database/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_relational_database::_create_relational_database_output::CreateRelationalDatabaseOutputBuilder;
3
4pub use crate::operation::create_relational_database::_create_relational_database_input::CreateRelationalDatabaseInputBuilder;
5
6impl crate::operation::create_relational_database::builders::CreateRelationalDatabaseInputBuilder {
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_relational_database::CreateRelationalDatabaseOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_relational_database::CreateRelationalDatabaseError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_relational_database();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateRelationalDatabase`.
24///
25/// <p>Creates a new database in Amazon Lightsail.</p>
26/// <p>The <code>create relational database</code> operation supports tag-based access control via request tags. For more information, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-controlling-access-using-tags">Amazon Lightsail Developer Guide</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateRelationalDatabaseFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::create_relational_database::builders::CreateRelationalDatabaseInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::create_relational_database::CreateRelationalDatabaseOutput,
36 crate::operation::create_relational_database::CreateRelationalDatabaseError,
37 > for CreateRelationalDatabaseFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::create_relational_database::CreateRelationalDatabaseOutput,
45 crate::operation::create_relational_database::CreateRelationalDatabaseError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl CreateRelationalDatabaseFluentBuilder {
52 /// Creates a new `CreateRelationalDatabaseFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the CreateRelationalDatabase as a reference.
61 pub fn as_input(&self) -> &crate::operation::create_relational_database::builders::CreateRelationalDatabaseInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::create_relational_database::CreateRelationalDatabaseOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::create_relational_database::CreateRelationalDatabaseError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::create_relational_database::CreateRelationalDatabase::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::create_relational_database::CreateRelationalDatabase::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::create_relational_database::CreateRelationalDatabaseOutput,
98 crate::operation::create_relational_database::CreateRelationalDatabaseError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <p>The name to use for your new Lightsail database resource.</p>
113 /// <p>Constraints:</p>
114 /// <ul>
115 /// <li>
116 /// <p>Must contain from 2 to 255 alphanumeric characters, or hyphens.</p></li>
117 /// <li>
118 /// <p>The first and last character must be a letter or number.</p></li>
119 /// </ul>
120 pub fn relational_database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121 self.inner = self.inner.relational_database_name(input.into());
122 self
123 }
124 /// <p>The name to use for your new Lightsail database resource.</p>
125 /// <p>Constraints:</p>
126 /// <ul>
127 /// <li>
128 /// <p>Must contain from 2 to 255 alphanumeric characters, or hyphens.</p></li>
129 /// <li>
130 /// <p>The first and last character must be a letter or number.</p></li>
131 /// </ul>
132 pub fn set_relational_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.inner = self.inner.set_relational_database_name(input);
134 self
135 }
136 /// <p>The name to use for your new Lightsail database resource.</p>
137 /// <p>Constraints:</p>
138 /// <ul>
139 /// <li>
140 /// <p>Must contain from 2 to 255 alphanumeric characters, or hyphens.</p></li>
141 /// <li>
142 /// <p>The first and last character must be a letter or number.</p></li>
143 /// </ul>
144 pub fn get_relational_database_name(&self) -> &::std::option::Option<::std::string::String> {
145 self.inner.get_relational_database_name()
146 }
147 /// <p>The Availability Zone in which to create your new database. Use the <code>us-east-2a</code> case-sensitive format.</p>
148 /// <p>You can get a list of Availability Zones by using the <code>get regions</code> operation. Be sure to add the <code>include relational database Availability Zones</code> parameter to your request.</p>
149 pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.inner = self.inner.availability_zone(input.into());
151 self
152 }
153 /// <p>The Availability Zone in which to create your new database. Use the <code>us-east-2a</code> case-sensitive format.</p>
154 /// <p>You can get a list of Availability Zones by using the <code>get regions</code> operation. Be sure to add the <code>include relational database Availability Zones</code> parameter to your request.</p>
155 pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.inner = self.inner.set_availability_zone(input);
157 self
158 }
159 /// <p>The Availability Zone in which to create your new database. Use the <code>us-east-2a</code> case-sensitive format.</p>
160 /// <p>You can get a list of Availability Zones by using the <code>get regions</code> operation. Be sure to add the <code>include relational database Availability Zones</code> parameter to your request.</p>
161 pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
162 self.inner.get_availability_zone()
163 }
164 /// <p>The blueprint ID for your new database. A blueprint describes the major engine version of a database.</p>
165 /// <p>You can get a list of database blueprints IDs by using the <code>get relational database blueprints</code> operation.</p>
166 pub fn relational_database_blueprint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167 self.inner = self.inner.relational_database_blueprint_id(input.into());
168 self
169 }
170 /// <p>The blueprint ID for your new database. A blueprint describes the major engine version of a database.</p>
171 /// <p>You can get a list of database blueprints IDs by using the <code>get relational database blueprints</code> operation.</p>
172 pub fn set_relational_database_blueprint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.inner = self.inner.set_relational_database_blueprint_id(input);
174 self
175 }
176 /// <p>The blueprint ID for your new database. A blueprint describes the major engine version of a database.</p>
177 /// <p>You can get a list of database blueprints IDs by using the <code>get relational database blueprints</code> operation.</p>
178 pub fn get_relational_database_blueprint_id(&self) -> &::std::option::Option<::std::string::String> {
179 self.inner.get_relational_database_blueprint_id()
180 }
181 /// <p>The bundle ID for your new database. A bundle describes the performance specifications for your database.</p>
182 /// <p>You can get a list of database bundle IDs by using the <code>get relational database bundles</code> operation.</p>
183 pub fn relational_database_bundle_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184 self.inner = self.inner.relational_database_bundle_id(input.into());
185 self
186 }
187 /// <p>The bundle ID for your new database. A bundle describes the performance specifications for your database.</p>
188 /// <p>You can get a list of database bundle IDs by using the <code>get relational database bundles</code> operation.</p>
189 pub fn set_relational_database_bundle_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190 self.inner = self.inner.set_relational_database_bundle_id(input);
191 self
192 }
193 /// <p>The bundle ID for your new database. A bundle describes the performance specifications for your database.</p>
194 /// <p>You can get a list of database bundle IDs by using the <code>get relational database bundles</code> operation.</p>
195 pub fn get_relational_database_bundle_id(&self) -> &::std::option::Option<::std::string::String> {
196 self.inner.get_relational_database_bundle_id()
197 }
198 /// <p>The meaning of this parameter differs according to the database engine you use.</p>
199 /// <p><b>MySQL</b></p>
200 /// <p>The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, no database is created in the database resource.</p>
201 /// <p>Constraints:</p>
202 /// <ul>
203 /// <li>
204 /// <p>Must contain 1 to 64 letters or numbers.</p></li>
205 /// <li>
206 /// <p>Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0- 9).</p></li>
207 /// <li>
208 /// <p>Can't be a word reserved by the specified database engine.</p>
209 /// <p>For more information about reserved words in MySQL, see the Keywords and Reserved Words articles for <a href="https://dev.mysql.com/doc/refman/5.6/en/keywords.html">MySQL 5.6</a>, <a href="https://dev.mysql.com/doc/refman/5.7/en/keywords.html">MySQL 5.7</a>, and <a href="https://dev.mysql.com/doc/refman/8.0/en/keywords.html">MySQL 8.0</a>.</p></li>
210 /// </ul>
211 /// <p><b>PostgreSQL</b></p>
212 /// <p>The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, a database named <code>postgres</code> is created in the database resource.</p>
213 /// <p>Constraints:</p>
214 /// <ul>
215 /// <li>
216 /// <p>Must contain 1 to 63 letters or numbers.</p></li>
217 /// <li>
218 /// <p>Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0- 9).</p></li>
219 /// <li>
220 /// <p>Can't be a word reserved by the specified database engine.</p>
221 /// <p>For more information about reserved words in PostgreSQL, see the SQL Key Words articles for <a href="https://www.postgresql.org/docs/9.6/sql-keywords-appendix.html">PostgreSQL 9.6</a>, <a href="https://www.postgresql.org/docs/10/sql-keywords-appendix.html">PostgreSQL 10</a>, <a href="https://www.postgresql.org/docs/11/sql-keywords-appendix.html">PostgreSQL 11</a>, and <a href="https://www.postgresql.org/docs/12/sql-keywords-appendix.html">PostgreSQL 12</a>.</p></li>
222 /// </ul>
223 pub fn master_database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
224 self.inner = self.inner.master_database_name(input.into());
225 self
226 }
227 /// <p>The meaning of this parameter differs according to the database engine you use.</p>
228 /// <p><b>MySQL</b></p>
229 /// <p>The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, no database is created in the database resource.</p>
230 /// <p>Constraints:</p>
231 /// <ul>
232 /// <li>
233 /// <p>Must contain 1 to 64 letters or numbers.</p></li>
234 /// <li>
235 /// <p>Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0- 9).</p></li>
236 /// <li>
237 /// <p>Can't be a word reserved by the specified database engine.</p>
238 /// <p>For more information about reserved words in MySQL, see the Keywords and Reserved Words articles for <a href="https://dev.mysql.com/doc/refman/5.6/en/keywords.html">MySQL 5.6</a>, <a href="https://dev.mysql.com/doc/refman/5.7/en/keywords.html">MySQL 5.7</a>, and <a href="https://dev.mysql.com/doc/refman/8.0/en/keywords.html">MySQL 8.0</a>.</p></li>
239 /// </ul>
240 /// <p><b>PostgreSQL</b></p>
241 /// <p>The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, a database named <code>postgres</code> is created in the database resource.</p>
242 /// <p>Constraints:</p>
243 /// <ul>
244 /// <li>
245 /// <p>Must contain 1 to 63 letters or numbers.</p></li>
246 /// <li>
247 /// <p>Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0- 9).</p></li>
248 /// <li>
249 /// <p>Can't be a word reserved by the specified database engine.</p>
250 /// <p>For more information about reserved words in PostgreSQL, see the SQL Key Words articles for <a href="https://www.postgresql.org/docs/9.6/sql-keywords-appendix.html">PostgreSQL 9.6</a>, <a href="https://www.postgresql.org/docs/10/sql-keywords-appendix.html">PostgreSQL 10</a>, <a href="https://www.postgresql.org/docs/11/sql-keywords-appendix.html">PostgreSQL 11</a>, and <a href="https://www.postgresql.org/docs/12/sql-keywords-appendix.html">PostgreSQL 12</a>.</p></li>
251 /// </ul>
252 pub fn set_master_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253 self.inner = self.inner.set_master_database_name(input);
254 self
255 }
256 /// <p>The meaning of this parameter differs according to the database engine you use.</p>
257 /// <p><b>MySQL</b></p>
258 /// <p>The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, no database is created in the database resource.</p>
259 /// <p>Constraints:</p>
260 /// <ul>
261 /// <li>
262 /// <p>Must contain 1 to 64 letters or numbers.</p></li>
263 /// <li>
264 /// <p>Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0- 9).</p></li>
265 /// <li>
266 /// <p>Can't be a word reserved by the specified database engine.</p>
267 /// <p>For more information about reserved words in MySQL, see the Keywords and Reserved Words articles for <a href="https://dev.mysql.com/doc/refman/5.6/en/keywords.html">MySQL 5.6</a>, <a href="https://dev.mysql.com/doc/refman/5.7/en/keywords.html">MySQL 5.7</a>, and <a href="https://dev.mysql.com/doc/refman/8.0/en/keywords.html">MySQL 8.0</a>.</p></li>
268 /// </ul>
269 /// <p><b>PostgreSQL</b></p>
270 /// <p>The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, a database named <code>postgres</code> is created in the database resource.</p>
271 /// <p>Constraints:</p>
272 /// <ul>
273 /// <li>
274 /// <p>Must contain 1 to 63 letters or numbers.</p></li>
275 /// <li>
276 /// <p>Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0- 9).</p></li>
277 /// <li>
278 /// <p>Can't be a word reserved by the specified database engine.</p>
279 /// <p>For more information about reserved words in PostgreSQL, see the SQL Key Words articles for <a href="https://www.postgresql.org/docs/9.6/sql-keywords-appendix.html">PostgreSQL 9.6</a>, <a href="https://www.postgresql.org/docs/10/sql-keywords-appendix.html">PostgreSQL 10</a>, <a href="https://www.postgresql.org/docs/11/sql-keywords-appendix.html">PostgreSQL 11</a>, and <a href="https://www.postgresql.org/docs/12/sql-keywords-appendix.html">PostgreSQL 12</a>.</p></li>
280 /// </ul>
281 pub fn get_master_database_name(&self) -> &::std::option::Option<::std::string::String> {
282 self.inner.get_master_database_name()
283 }
284 /// <p>The name for the master user.</p>
285 /// <p><b>MySQL</b></p>
286 /// <p>Constraints:</p>
287 /// <ul>
288 /// <li>
289 /// <p>Required for MySQL.</p></li>
290 /// <li>
291 /// <p>Must be 1 to 16 letters or numbers. Can contain underscores.</p></li>
292 /// <li>
293 /// <p>First character must be a letter.</p></li>
294 /// <li>
295 /// <p>Can't be a reserved word for the chosen database engine.</p>
296 /// <p>For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for <a href="https://dev.mysql.com/doc/refman/5.6/en/keywords.html">MySQL 5.6</a>, <a href="https://dev.mysql.com/doc/refman/5.7/en/keywords.html">MySQL 5.7</a>, or <a href="https://dev.mysql.com/doc/refman/8.0/en/keywords.html">MySQL 8.0</a>.</p></li>
297 /// </ul>
298 /// <p><b>PostgreSQL</b></p>
299 /// <p>Constraints:</p>
300 /// <ul>
301 /// <li>
302 /// <p>Required for PostgreSQL.</p></li>
303 /// <li>
304 /// <p>Must be 1 to 63 letters or numbers. Can contain underscores.</p></li>
305 /// <li>
306 /// <p>First character must be a letter.</p></li>
307 /// <li>
308 /// <p>Can't be a reserved word for the chosen database engine.</p>
309 /// <p>For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for <a href="https://www.postgresql.org/docs/9.6/sql-keywords-appendix.html">PostgreSQL 9.6</a>, <a href="https://www.postgresql.org/docs/10/sql-keywords-appendix.html">PostgreSQL 10</a>, <a href="https://www.postgresql.org/docs/11/sql-keywords-appendix.html">PostgreSQL 11</a>, and <a href="https://www.postgresql.org/docs/12/sql-keywords-appendix.html">PostgreSQL 12</a>.</p></li>
310 /// </ul>
311 pub fn master_username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
312 self.inner = self.inner.master_username(input.into());
313 self
314 }
315 /// <p>The name for the master user.</p>
316 /// <p><b>MySQL</b></p>
317 /// <p>Constraints:</p>
318 /// <ul>
319 /// <li>
320 /// <p>Required for MySQL.</p></li>
321 /// <li>
322 /// <p>Must be 1 to 16 letters or numbers. Can contain underscores.</p></li>
323 /// <li>
324 /// <p>First character must be a letter.</p></li>
325 /// <li>
326 /// <p>Can't be a reserved word for the chosen database engine.</p>
327 /// <p>For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for <a href="https://dev.mysql.com/doc/refman/5.6/en/keywords.html">MySQL 5.6</a>, <a href="https://dev.mysql.com/doc/refman/5.7/en/keywords.html">MySQL 5.7</a>, or <a href="https://dev.mysql.com/doc/refman/8.0/en/keywords.html">MySQL 8.0</a>.</p></li>
328 /// </ul>
329 /// <p><b>PostgreSQL</b></p>
330 /// <p>Constraints:</p>
331 /// <ul>
332 /// <li>
333 /// <p>Required for PostgreSQL.</p></li>
334 /// <li>
335 /// <p>Must be 1 to 63 letters or numbers. Can contain underscores.</p></li>
336 /// <li>
337 /// <p>First character must be a letter.</p></li>
338 /// <li>
339 /// <p>Can't be a reserved word for the chosen database engine.</p>
340 /// <p>For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for <a href="https://www.postgresql.org/docs/9.6/sql-keywords-appendix.html">PostgreSQL 9.6</a>, <a href="https://www.postgresql.org/docs/10/sql-keywords-appendix.html">PostgreSQL 10</a>, <a href="https://www.postgresql.org/docs/11/sql-keywords-appendix.html">PostgreSQL 11</a>, and <a href="https://www.postgresql.org/docs/12/sql-keywords-appendix.html">PostgreSQL 12</a>.</p></li>
341 /// </ul>
342 pub fn set_master_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
343 self.inner = self.inner.set_master_username(input);
344 self
345 }
346 /// <p>The name for the master user.</p>
347 /// <p><b>MySQL</b></p>
348 /// <p>Constraints:</p>
349 /// <ul>
350 /// <li>
351 /// <p>Required for MySQL.</p></li>
352 /// <li>
353 /// <p>Must be 1 to 16 letters or numbers. Can contain underscores.</p></li>
354 /// <li>
355 /// <p>First character must be a letter.</p></li>
356 /// <li>
357 /// <p>Can't be a reserved word for the chosen database engine.</p>
358 /// <p>For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for <a href="https://dev.mysql.com/doc/refman/5.6/en/keywords.html">MySQL 5.6</a>, <a href="https://dev.mysql.com/doc/refman/5.7/en/keywords.html">MySQL 5.7</a>, or <a href="https://dev.mysql.com/doc/refman/8.0/en/keywords.html">MySQL 8.0</a>.</p></li>
359 /// </ul>
360 /// <p><b>PostgreSQL</b></p>
361 /// <p>Constraints:</p>
362 /// <ul>
363 /// <li>
364 /// <p>Required for PostgreSQL.</p></li>
365 /// <li>
366 /// <p>Must be 1 to 63 letters or numbers. Can contain underscores.</p></li>
367 /// <li>
368 /// <p>First character must be a letter.</p></li>
369 /// <li>
370 /// <p>Can't be a reserved word for the chosen database engine.</p>
371 /// <p>For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for <a href="https://www.postgresql.org/docs/9.6/sql-keywords-appendix.html">PostgreSQL 9.6</a>, <a href="https://www.postgresql.org/docs/10/sql-keywords-appendix.html">PostgreSQL 10</a>, <a href="https://www.postgresql.org/docs/11/sql-keywords-appendix.html">PostgreSQL 11</a>, and <a href="https://www.postgresql.org/docs/12/sql-keywords-appendix.html">PostgreSQL 12</a>.</p></li>
372 /// </ul>
373 pub fn get_master_username(&self) -> &::std::option::Option<::std::string::String> {
374 self.inner.get_master_username()
375 }
376 /// <p>The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.</p>
377 /// <p><b>MySQL</b></p>
378 /// <p>Constraints: Must contain from 8 to 41 characters.</p>
379 /// <p><b>PostgreSQL</b></p>
380 /// <p>Constraints: Must contain from 8 to 128 characters.</p>
381 pub fn master_user_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
382 self.inner = self.inner.master_user_password(input.into());
383 self
384 }
385 /// <p>The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.</p>
386 /// <p><b>MySQL</b></p>
387 /// <p>Constraints: Must contain from 8 to 41 characters.</p>
388 /// <p><b>PostgreSQL</b></p>
389 /// <p>Constraints: Must contain from 8 to 128 characters.</p>
390 pub fn set_master_user_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
391 self.inner = self.inner.set_master_user_password(input);
392 self
393 }
394 /// <p>The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.</p>
395 /// <p><b>MySQL</b></p>
396 /// <p>Constraints: Must contain from 8 to 41 characters.</p>
397 /// <p><b>PostgreSQL</b></p>
398 /// <p>Constraints: Must contain from 8 to 128 characters.</p>
399 pub fn get_master_user_password(&self) -> &::std::option::Option<::std::string::String> {
400 self.inner.get_master_user_password()
401 }
402 /// <p>The daily time range during which automated backups are created for your new database if automated backups are enabled.</p>
403 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. For more information about the preferred backup window time blocks for each region, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow">Working With Backups</a> guide in the Amazon Relational Database Service documentation.</p>
404 /// <p>Constraints:</p>
405 /// <ul>
406 /// <li>
407 /// <p>Must be in the <code>hh24:mi-hh24:mi</code> format.</p>
408 /// <p>Example: <code>16:00-16:30</code></p></li>
409 /// <li>
410 /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
411 /// <li>
412 /// <p>Must not conflict with the preferred maintenance window.</p></li>
413 /// <li>
414 /// <p>Must be at least 30 minutes.</p></li>
415 /// </ul>
416 pub fn preferred_backup_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
417 self.inner = self.inner.preferred_backup_window(input.into());
418 self
419 }
420 /// <p>The daily time range during which automated backups are created for your new database if automated backups are enabled.</p>
421 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. For more information about the preferred backup window time blocks for each region, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow">Working With Backups</a> guide in the Amazon Relational Database Service documentation.</p>
422 /// <p>Constraints:</p>
423 /// <ul>
424 /// <li>
425 /// <p>Must be in the <code>hh24:mi-hh24:mi</code> format.</p>
426 /// <p>Example: <code>16:00-16:30</code></p></li>
427 /// <li>
428 /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
429 /// <li>
430 /// <p>Must not conflict with the preferred maintenance window.</p></li>
431 /// <li>
432 /// <p>Must be at least 30 minutes.</p></li>
433 /// </ul>
434 pub fn set_preferred_backup_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
435 self.inner = self.inner.set_preferred_backup_window(input);
436 self
437 }
438 /// <p>The daily time range during which automated backups are created for your new database if automated backups are enabled.</p>
439 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. For more information about the preferred backup window time blocks for each region, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow">Working With Backups</a> guide in the Amazon Relational Database Service documentation.</p>
440 /// <p>Constraints:</p>
441 /// <ul>
442 /// <li>
443 /// <p>Must be in the <code>hh24:mi-hh24:mi</code> format.</p>
444 /// <p>Example: <code>16:00-16:30</code></p></li>
445 /// <li>
446 /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
447 /// <li>
448 /// <p>Must not conflict with the preferred maintenance window.</p></li>
449 /// <li>
450 /// <p>Must be at least 30 minutes.</p></li>
451 /// </ul>
452 pub fn get_preferred_backup_window(&self) -> &::std::option::Option<::std::string::String> {
453 self.inner.get_preferred_backup_window()
454 }
455 /// <p>The weekly time range during which system maintenance can occur on your new database.</p>
456 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.</p>
457 /// <p>Constraints:</p>
458 /// <ul>
459 /// <li>
460 /// <p>Must be in the <code>ddd:hh24:mi-ddd:hh24:mi</code> format.</p></li>
461 /// <li>
462 /// <p>Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.</p></li>
463 /// <li>
464 /// <p>Must be at least 30 minutes.</p></li>
465 /// <li>
466 /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
467 /// <li>
468 /// <p>Example: <code>Tue:17:00-Tue:17:30</code></p></li>
469 /// </ul>
470 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
471 self.inner = self.inner.preferred_maintenance_window(input.into());
472 self
473 }
474 /// <p>The weekly time range during which system maintenance can occur on your new database.</p>
475 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.</p>
476 /// <p>Constraints:</p>
477 /// <ul>
478 /// <li>
479 /// <p>Must be in the <code>ddd:hh24:mi-ddd:hh24:mi</code> format.</p></li>
480 /// <li>
481 /// <p>Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.</p></li>
482 /// <li>
483 /// <p>Must be at least 30 minutes.</p></li>
484 /// <li>
485 /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
486 /// <li>
487 /// <p>Example: <code>Tue:17:00-Tue:17:30</code></p></li>
488 /// </ul>
489 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
490 self.inner = self.inner.set_preferred_maintenance_window(input);
491 self
492 }
493 /// <p>The weekly time range during which system maintenance can occur on your new database.</p>
494 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.</p>
495 /// <p>Constraints:</p>
496 /// <ul>
497 /// <li>
498 /// <p>Must be in the <code>ddd:hh24:mi-ddd:hh24:mi</code> format.</p></li>
499 /// <li>
500 /// <p>Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.</p></li>
501 /// <li>
502 /// <p>Must be at least 30 minutes.</p></li>
503 /// <li>
504 /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
505 /// <li>
506 /// <p>Example: <code>Tue:17:00-Tue:17:30</code></p></li>
507 /// </ul>
508 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
509 self.inner.get_preferred_maintenance_window()
510 }
511 /// <p>Specifies the accessibility options for your new database. A value of <code>true</code> specifies a database that is available to resources outside of your Lightsail account. A value of <code>false</code> specifies a database that is available only to your Lightsail resources in the same region as your database.</p>
512 pub fn publicly_accessible(mut self, input: bool) -> Self {
513 self.inner = self.inner.publicly_accessible(input);
514 self
515 }
516 /// <p>Specifies the accessibility options for your new database. A value of <code>true</code> specifies a database that is available to resources outside of your Lightsail account. A value of <code>false</code> specifies a database that is available only to your Lightsail resources in the same region as your database.</p>
517 pub fn set_publicly_accessible(mut self, input: ::std::option::Option<bool>) -> Self {
518 self.inner = self.inner.set_publicly_accessible(input);
519 self
520 }
521 /// <p>Specifies the accessibility options for your new database. A value of <code>true</code> specifies a database that is available to resources outside of your Lightsail account. A value of <code>false</code> specifies a database that is available only to your Lightsail resources in the same region as your database.</p>
522 pub fn get_publicly_accessible(&self) -> &::std::option::Option<bool> {
523 self.inner.get_publicly_accessible()
524 }
525 ///
526 /// Appends an item to `tags`.
527 ///
528 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
529 ///
530 /// <p>The tag keys and optional values to add to the resource during create.</p>
531 /// <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>
532 pub fn tags(mut self, input: crate::types::Tag) -> Self {
533 self.inner = self.inner.tags(input);
534 self
535 }
536 /// <p>The tag keys and optional values to add to the resource during create.</p>
537 /// <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>
538 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
539 self.inner = self.inner.set_tags(input);
540 self
541 }
542 /// <p>The tag keys and optional values to add to the resource during create.</p>
543 /// <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>
544 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
545 self.inner.get_tags()
546 }
547}