aws_sdk_lightsail/client/create_relational_database.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateRelationalDatabase`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`relational_database_name(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::relational_database_name) / [`set_relational_database_name(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_relational_database_name):<br>required: **true**<br><p>The name to use for your new Lightsail database resource.</p> <p>Constraints:</p> <ul> <li> <p>Must contain from 2 to 255 alphanumeric characters, or hyphens.</p></li> <li> <p>The first and last character must be a letter or number.</p></li> </ul><br>
7 /// - [`availability_zone(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::availability_zone) / [`set_availability_zone(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_availability_zone):<br>required: **false**<br><p>The Availability Zone in which to create your new database. Use the <code>us-east-2a</code> case-sensitive format.</p> <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><br>
8 /// - [`relational_database_blueprint_id(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::relational_database_blueprint_id) / [`set_relational_database_blueprint_id(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_relational_database_blueprint_id):<br>required: **true**<br><p>The blueprint ID for your new database. A blueprint describes the major engine version of a database.</p> <p>You can get a list of database blueprints IDs by using the <code>get relational database blueprints</code> operation.</p><br>
9 /// - [`relational_database_bundle_id(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::relational_database_bundle_id) / [`set_relational_database_bundle_id(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_relational_database_bundle_id):<br>required: **true**<br><p>The bundle ID for your new database. A bundle describes the performance specifications for your database.</p> <p>You can get a list of database bundle IDs by using the <code>get relational database bundles</code> operation.</p><br>
10 /// - [`master_database_name(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::master_database_name) / [`set_master_database_name(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_master_database_name):<br>required: **true**<br><p>The meaning of this parameter differs according to the database engine you use.</p> <p><b>MySQL</b></p> <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> <p>Constraints:</p> <ul> <li> <p>Must contain 1 to 64 letters or numbers.</p></li> <li> <p>Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0- 9).</p></li> <li> <p>Can't be a word reserved by the specified database engine.</p> <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> </ul> <p><b>PostgreSQL</b></p> <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> <p>Constraints:</p> <ul> <li> <p>Must contain 1 to 63 letters or numbers.</p></li> <li> <p>Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0- 9).</p></li> <li> <p>Can't be a word reserved by the specified database engine.</p> <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> </ul><br>
11 /// - [`master_username(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::master_username) / [`set_master_username(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_master_username):<br>required: **true**<br><p>The name for the master user.</p> <p><b>MySQL</b></p> <p>Constraints:</p> <ul> <li> <p>Required for MySQL.</p></li> <li> <p>Must be 1 to 16 letters or numbers. Can contain underscores.</p></li> <li> <p>First character must be a letter.</p></li> <li> <p>Can't be a reserved word for the chosen database engine.</p> <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> </ul> <p><b>PostgreSQL</b></p> <p>Constraints:</p> <ul> <li> <p>Required for PostgreSQL.</p></li> <li> <p>Must be 1 to 63 letters or numbers. Can contain underscores.</p></li> <li> <p>First character must be a letter.</p></li> <li> <p>Can't be a reserved word for the chosen database engine.</p> <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> </ul><br>
12 /// - [`master_user_password(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::master_user_password) / [`set_master_user_password(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_master_user_password):<br>required: **false**<br><p>The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.</p> <p><b>MySQL</b></p> <p>Constraints: Must contain from 8 to 41 characters.</p> <p><b>PostgreSQL</b></p> <p>Constraints: Must contain from 8 to 128 characters.</p><br>
13 /// - [`preferred_backup_window(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::preferred_backup_window) / [`set_preferred_backup_window(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_preferred_backup_window):<br>required: **false**<br><p>The daily time range during which automated backups are created for your new database if automated backups are enabled.</p> <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> <p>Constraints:</p> <ul> <li> <p>Must be in the <code>hh24:mi-hh24:mi</code> format.</p> <p>Example: <code>16:00-16:30</code></p></li> <li> <p>Specified in Coordinated Universal Time (UTC).</p></li> <li> <p>Must not conflict with the preferred maintenance window.</p></li> <li> <p>Must be at least 30 minutes.</p></li> </ul><br>
14 /// - [`preferred_maintenance_window(impl Into<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::preferred_maintenance_window) / [`set_preferred_maintenance_window(Option<String>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_preferred_maintenance_window):<br>required: **false**<br><p>The weekly time range during which system maintenance can occur on your new database.</p> <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> <p>Constraints:</p> <ul> <li> <p>Must be in the <code>ddd:hh24:mi-ddd:hh24:mi</code> format.</p></li> <li> <p>Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.</p></li> <li> <p>Must be at least 30 minutes.</p></li> <li> <p>Specified in Coordinated Universal Time (UTC).</p></li> <li> <p>Example: <code>Tue:17:00-Tue:17:30</code></p></li> </ul><br>
15 /// - [`publicly_accessible(bool)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::publicly_accessible) / [`set_publicly_accessible(Option<bool>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_publicly_accessible):<br>required: **false**<br><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><br>
16 /// - [`tags(Tag)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::set_tags):<br>required: **false**<br><p>The tag keys and optional values to add to the resource during create.</p> <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p><br>
17 /// - On success, responds with [`CreateRelationalDatabaseOutput`](crate::operation::create_relational_database::CreateRelationalDatabaseOutput) with field(s):
18 /// - [`operations(Option<Vec::<Operation>>)`](crate::operation::create_relational_database::CreateRelationalDatabaseOutput::operations): <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
19 /// - On failure, responds with [`SdkError<CreateRelationalDatabaseError>`](crate::operation::create_relational_database::CreateRelationalDatabaseError)
20 pub fn create_relational_database(&self) -> crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder {
21 crate::operation::create_relational_database::builders::CreateRelationalDatabaseFluentBuilder::new(self.handle.clone())
22 }
23}