aws_sdk_rds/operation/modify_db_snapshot/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_db_snapshot::_modify_db_snapshot_output::ModifyDbSnapshotOutputBuilder;
3
4pub use crate::operation::modify_db_snapshot::_modify_db_snapshot_input::ModifyDbSnapshotInputBuilder;
5
6impl crate::operation::modify_db_snapshot::builders::ModifyDbSnapshotInputBuilder {
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_db_snapshot::ModifyDbSnapshotOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::modify_db_snapshot::ModifyDBSnapshotError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.modify_db_snapshot();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ModifyDBSnapshot`.
24///
25/// <p>Updates a manual DB snapshot with a new engine version. The snapshot can be encrypted or unencrypted, but not shared or public.</p>
26/// <p>Amazon RDS supports upgrading DB snapshots for MariaDB, MySQL, PostgreSQL, and Oracle. This operation doesn't apply to RDS Custom or RDS for Db2.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct ModifyDBSnapshotFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::modify_db_snapshot::builders::ModifyDbSnapshotInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::modify_db_snapshot::ModifyDbSnapshotOutput,
36 crate::operation::modify_db_snapshot::ModifyDBSnapshotError,
37 > for ModifyDBSnapshotFluentBuilder
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::modify_db_snapshot::ModifyDbSnapshotOutput,
45 crate::operation::modify_db_snapshot::ModifyDBSnapshotError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl ModifyDBSnapshotFluentBuilder {
52 /// Creates a new `ModifyDBSnapshotFluentBuilder`.
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 ModifyDBSnapshot as a reference.
61 pub fn as_input(&self) -> &crate::operation::modify_db_snapshot::builders::ModifyDbSnapshotInputBuilder {
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::modify_db_snapshot::ModifyDbSnapshotOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::modify_db_snapshot::ModifyDBSnapshotError,
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::modify_db_snapshot::ModifyDBSnapshot::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::modify_db_snapshot::ModifyDBSnapshot::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::modify_db_snapshot::ModifyDbSnapshotOutput,
98 crate::operation::modify_db_snapshot::ModifyDBSnapshotError,
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 identifier of the DB snapshot to modify.</p>
113 pub fn db_snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.db_snapshot_identifier(input.into());
115 self
116 }
117 /// <p>The identifier of the DB snapshot to modify.</p>
118 pub fn set_db_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_db_snapshot_identifier(input);
120 self
121 }
122 /// <p>The identifier of the DB snapshot to modify.</p>
123 pub fn get_db_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_db_snapshot_identifier()
125 }
126 /// <p>The engine version to upgrade the DB snapshot to.</p>
127 /// <p>The following are the database engines and engine versions that are available when you upgrade a DB snapshot.</p>
128 /// <p><b>MariaDB</b></p>
129 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mariadb-upgrade-snapshot.html"> Upgrading a MariaDB DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
130 /// <p><b>MySQL</b></p>
131 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql-upgrade-snapshot.html"> Upgrading a MySQL DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
132 /// <p><b>Oracle</b></p>
133 /// <ul>
134 /// <li>
135 /// <p><code>21.0.0.0.ru-2025-04.rur-2025-04.r1</code> (supported for 21.0.0.0.ru-2022-01.rur-2022-01.r1, 21.0.0.0.ru-2022-04.rur-2022-04.r1, 21.0.0.0.ru-2022-07.rur-2022-07.r1, 21.0.0.0.ru-2022-10.rur-2022-10.r1, 21.0.0.0.ru-2023-01.rur-2023-01.r1 and 21.0.0.0.ru-2023-01.rur-2023-01.r2 DB snapshots)</p></li>
136 /// <li>
137 /// <p><code>19.0.0.0.ru-2025-04.rur-2025-04.r1</code> (supported for 19.0.0.0.ru-2019-07.rur-2019-07.r1, 19.0.0.0.ru-2019-10.rur-2019-10.r1 and 0.0.0.ru-2020-01.rur-2020-01.r1 DB snapshots)</p></li>
138 /// <li>
139 /// <p><code>19.0.0.0.ru-2022-01.rur-2022-01.r1</code> (supported for 12.2.0.1 DB snapshots)</p></li>
140 /// <li>
141 /// <p><code>19.0.0.0.ru-2022-07.rur-2022-07.r1</code> (supported for 12.1.0.2 DB snapshots)</p></li>
142 /// <li>
143 /// <p><code>12.1.0.2.v8</code> (supported for 12.1.0.1 DB snapshots)</p></li>
144 /// <li>
145 /// <p><code>11.2.0.4.v12</code> (supported for 11.2.0.2 DB snapshots)</p></li>
146 /// <li>
147 /// <p><code>11.2.0.4.v11</code> (supported for 11.2.0.3 DB snapshots)</p></li>
148 /// </ul>
149 /// <p><b>PostgreSQL</b></p>
150 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBSnapshot.PostgreSQL.html"> Upgrading a PostgreSQL DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
151 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152 self.inner = self.inner.engine_version(input.into());
153 self
154 }
155 /// <p>The engine version to upgrade the DB snapshot to.</p>
156 /// <p>The following are the database engines and engine versions that are available when you upgrade a DB snapshot.</p>
157 /// <p><b>MariaDB</b></p>
158 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mariadb-upgrade-snapshot.html"> Upgrading a MariaDB DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
159 /// <p><b>MySQL</b></p>
160 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql-upgrade-snapshot.html"> Upgrading a MySQL DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
161 /// <p><b>Oracle</b></p>
162 /// <ul>
163 /// <li>
164 /// <p><code>21.0.0.0.ru-2025-04.rur-2025-04.r1</code> (supported for 21.0.0.0.ru-2022-01.rur-2022-01.r1, 21.0.0.0.ru-2022-04.rur-2022-04.r1, 21.0.0.0.ru-2022-07.rur-2022-07.r1, 21.0.0.0.ru-2022-10.rur-2022-10.r1, 21.0.0.0.ru-2023-01.rur-2023-01.r1 and 21.0.0.0.ru-2023-01.rur-2023-01.r2 DB snapshots)</p></li>
165 /// <li>
166 /// <p><code>19.0.0.0.ru-2025-04.rur-2025-04.r1</code> (supported for 19.0.0.0.ru-2019-07.rur-2019-07.r1, 19.0.0.0.ru-2019-10.rur-2019-10.r1 and 0.0.0.ru-2020-01.rur-2020-01.r1 DB snapshots)</p></li>
167 /// <li>
168 /// <p><code>19.0.0.0.ru-2022-01.rur-2022-01.r1</code> (supported for 12.2.0.1 DB snapshots)</p></li>
169 /// <li>
170 /// <p><code>19.0.0.0.ru-2022-07.rur-2022-07.r1</code> (supported for 12.1.0.2 DB snapshots)</p></li>
171 /// <li>
172 /// <p><code>12.1.0.2.v8</code> (supported for 12.1.0.1 DB snapshots)</p></li>
173 /// <li>
174 /// <p><code>11.2.0.4.v12</code> (supported for 11.2.0.2 DB snapshots)</p></li>
175 /// <li>
176 /// <p><code>11.2.0.4.v11</code> (supported for 11.2.0.3 DB snapshots)</p></li>
177 /// </ul>
178 /// <p><b>PostgreSQL</b></p>
179 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBSnapshot.PostgreSQL.html"> Upgrading a PostgreSQL DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
180 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181 self.inner = self.inner.set_engine_version(input);
182 self
183 }
184 /// <p>The engine version to upgrade the DB snapshot to.</p>
185 /// <p>The following are the database engines and engine versions that are available when you upgrade a DB snapshot.</p>
186 /// <p><b>MariaDB</b></p>
187 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mariadb-upgrade-snapshot.html"> Upgrading a MariaDB DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
188 /// <p><b>MySQL</b></p>
189 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql-upgrade-snapshot.html"> Upgrading a MySQL DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
190 /// <p><b>Oracle</b></p>
191 /// <ul>
192 /// <li>
193 /// <p><code>21.0.0.0.ru-2025-04.rur-2025-04.r1</code> (supported for 21.0.0.0.ru-2022-01.rur-2022-01.r1, 21.0.0.0.ru-2022-04.rur-2022-04.r1, 21.0.0.0.ru-2022-07.rur-2022-07.r1, 21.0.0.0.ru-2022-10.rur-2022-10.r1, 21.0.0.0.ru-2023-01.rur-2023-01.r1 and 21.0.0.0.ru-2023-01.rur-2023-01.r2 DB snapshots)</p></li>
194 /// <li>
195 /// <p><code>19.0.0.0.ru-2025-04.rur-2025-04.r1</code> (supported for 19.0.0.0.ru-2019-07.rur-2019-07.r1, 19.0.0.0.ru-2019-10.rur-2019-10.r1 and 0.0.0.ru-2020-01.rur-2020-01.r1 DB snapshots)</p></li>
196 /// <li>
197 /// <p><code>19.0.0.0.ru-2022-01.rur-2022-01.r1</code> (supported for 12.2.0.1 DB snapshots)</p></li>
198 /// <li>
199 /// <p><code>19.0.0.0.ru-2022-07.rur-2022-07.r1</code> (supported for 12.1.0.2 DB snapshots)</p></li>
200 /// <li>
201 /// <p><code>12.1.0.2.v8</code> (supported for 12.1.0.1 DB snapshots)</p></li>
202 /// <li>
203 /// <p><code>11.2.0.4.v12</code> (supported for 11.2.0.2 DB snapshots)</p></li>
204 /// <li>
205 /// <p><code>11.2.0.4.v11</code> (supported for 11.2.0.3 DB snapshots)</p></li>
206 /// </ul>
207 /// <p><b>PostgreSQL</b></p>
208 /// <p>For the list of engine versions that are available for upgrading a DB snapshot, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBSnapshot.PostgreSQL.html"> Upgrading a PostgreSQL DB snapshot engine version</a> in the <i>Amazon RDS User Guide.</i></p>
209 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
210 self.inner.get_engine_version()
211 }
212 /// <p>The option group to identify with the upgraded DB snapshot.</p>
213 /// <p>You can specify this parameter when you upgrade an Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG">Option group considerations</a> in the <i>Amazon RDS User Guide.</i></p>
214 pub fn option_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215 self.inner = self.inner.option_group_name(input.into());
216 self
217 }
218 /// <p>The option group to identify with the upgraded DB snapshot.</p>
219 /// <p>You can specify this parameter when you upgrade an Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG">Option group considerations</a> in the <i>Amazon RDS User Guide.</i></p>
220 pub fn set_option_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.inner = self.inner.set_option_group_name(input);
222 self
223 }
224 /// <p>The option group to identify with the upgraded DB snapshot.</p>
225 /// <p>You can specify this parameter when you upgrade an Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG">Option group considerations</a> in the <i>Amazon RDS User Guide.</i></p>
226 pub fn get_option_group_name(&self) -> &::std::option::Option<::std::string::String> {
227 self.inner.get_option_group_name()
228 }
229}