aws_sdk_rds/operation/modify_custom_db_engine_version/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_custom_db_engine_version::_modify_custom_db_engine_version_input::ModifyCustomDbEngineVersionInputBuilder;
3
4pub use crate::operation::modify_custom_db_engine_version::_modify_custom_db_engine_version_output::ModifyCustomDbEngineVersionOutputBuilder;
5
6impl crate::operation::modify_custom_db_engine_version::builders::ModifyCustomDbEngineVersionInputBuilder {
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_custom_db_engine_version::ModifyCustomDbEngineVersionOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::modify_custom_db_engine_version::ModifyCustomDBEngineVersionError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.modify_custom_db_engine_version();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ModifyCustomDBEngineVersion`.
24///
25/// <p>Modifies the status of a custom engine version (CEV). You can find CEVs to modify by calling <code>DescribeDBEngineVersions</code>.</p><note>
26/// <p>The MediaImport service that imports files from Amazon S3 to create CEVs isn't integrated with Amazon Web Services CloudTrail. If you turn on data logging for Amazon RDS in CloudTrail, calls to the <code>ModifyCustomDbEngineVersion</code> event aren't logged. However, you might see calls from the API gateway that accesses your Amazon S3 bucket. These calls originate from the MediaImport service for the <code>ModifyCustomDbEngineVersion</code> event.</p>
27/// </note>
28/// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.modify">Modifying CEV status</a> in the <i>Amazon RDS User Guide</i>.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct ModifyCustomDBEngineVersionFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::modify_custom_db_engine_version::builders::ModifyCustomDbEngineVersionInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::modify_custom_db_engine_version::ModifyCustomDbEngineVersionOutput,
38 crate::operation::modify_custom_db_engine_version::ModifyCustomDBEngineVersionError,
39 > for ModifyCustomDBEngineVersionFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::modify_custom_db_engine_version::ModifyCustomDbEngineVersionOutput,
47 crate::operation::modify_custom_db_engine_version::ModifyCustomDBEngineVersionError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl ModifyCustomDBEngineVersionFluentBuilder {
54 /// Creates a new `ModifyCustomDBEngineVersionFluentBuilder`.
55 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 /// Access the ModifyCustomDBEngineVersion as a reference.
63 pub fn as_input(&self) -> &crate::operation::modify_custom_db_engine_version::builders::ModifyCustomDbEngineVersionInputBuilder {
64 &self.inner
65 }
66 /// Sends the request and returns the response.
67 ///
68 /// If an error occurs, an `SdkError` will be returned with additional details that
69 /// can be matched against.
70 ///
71 /// By default, any retryable failures will be retried twice. Retry behavior
72 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73 /// set when configuring the client.
74 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::modify_custom_db_engine_version::ModifyCustomDbEngineVersionOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::modify_custom_db_engine_version::ModifyCustomDBEngineVersionError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::modify_custom_db_engine_version::ModifyCustomDBEngineVersion::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::modify_custom_db_engine_version::ModifyCustomDBEngineVersion::orchestrate(&runtime_plugins, input).await
93 }
94
95 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::modify_custom_db_engine_version::ModifyCustomDbEngineVersionOutput,
100 crate::operation::modify_custom_db_engine_version::ModifyCustomDBEngineVersionError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 /// <p>The database engine.</p>
115 /// <p>RDS Custom for Oracle supports the following values:</p>
116 /// <ul>
117 /// <li>
118 /// <p><code>custom-oracle-ee</code></p></li>
119 /// <li>
120 /// <p><code>custom-oracle-ee-cdb</code></p></li>
121 /// <li>
122 /// <p><code>custom-oracle-se2</code></p></li>
123 /// <li>
124 /// <p><code>custom-oracle-se2-cdb</code></p></li>
125 /// </ul>
126 /// <p>RDS Custom for SQL Server supports the following values:</p>
127 /// <ul>
128 /// <li>
129 /// <p><code>custom-sqlserver-ee</code></p></li>
130 /// <li>
131 /// <p><code>custom-sqlserver-se</code></p></li>
132 /// <li>
133 /// <p><code>custom-sqlserver-web</code></p></li>
134 /// <li>
135 /// <p><code>custom-sqlserver-dev</code></p></li>
136 /// </ul>
137 /// <p>RDS for SQL Server supports the following values:</p>
138 /// <ul>
139 /// <li>
140 /// <p><code>sqlserver-ee</code> (Bring Your Own Media)</p></li>
141 /// <li>
142 /// <p><code>sqlserver-se</code> (Bring Your Own Media)</p></li>
143 /// <li>
144 /// <p><code>sqlserver-dev-ee</code></p></li>
145 /// </ul>
146 pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.inner = self.inner.engine(input.into());
148 self
149 }
150 /// <p>The database engine.</p>
151 /// <p>RDS Custom for Oracle supports the following values:</p>
152 /// <ul>
153 /// <li>
154 /// <p><code>custom-oracle-ee</code></p></li>
155 /// <li>
156 /// <p><code>custom-oracle-ee-cdb</code></p></li>
157 /// <li>
158 /// <p><code>custom-oracle-se2</code></p></li>
159 /// <li>
160 /// <p><code>custom-oracle-se2-cdb</code></p></li>
161 /// </ul>
162 /// <p>RDS Custom for SQL Server supports the following values:</p>
163 /// <ul>
164 /// <li>
165 /// <p><code>custom-sqlserver-ee</code></p></li>
166 /// <li>
167 /// <p><code>custom-sqlserver-se</code></p></li>
168 /// <li>
169 /// <p><code>custom-sqlserver-web</code></p></li>
170 /// <li>
171 /// <p><code>custom-sqlserver-dev</code></p></li>
172 /// </ul>
173 /// <p>RDS for SQL Server supports the following values:</p>
174 /// <ul>
175 /// <li>
176 /// <p><code>sqlserver-ee</code> (Bring Your Own Media)</p></li>
177 /// <li>
178 /// <p><code>sqlserver-se</code> (Bring Your Own Media)</p></li>
179 /// <li>
180 /// <p><code>sqlserver-dev-ee</code></p></li>
181 /// </ul>
182 pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183 self.inner = self.inner.set_engine(input);
184 self
185 }
186 /// <p>The database engine.</p>
187 /// <p>RDS Custom for Oracle supports the following values:</p>
188 /// <ul>
189 /// <li>
190 /// <p><code>custom-oracle-ee</code></p></li>
191 /// <li>
192 /// <p><code>custom-oracle-ee-cdb</code></p></li>
193 /// <li>
194 /// <p><code>custom-oracle-se2</code></p></li>
195 /// <li>
196 /// <p><code>custom-oracle-se2-cdb</code></p></li>
197 /// </ul>
198 /// <p>RDS Custom for SQL Server supports the following values:</p>
199 /// <ul>
200 /// <li>
201 /// <p><code>custom-sqlserver-ee</code></p></li>
202 /// <li>
203 /// <p><code>custom-sqlserver-se</code></p></li>
204 /// <li>
205 /// <p><code>custom-sqlserver-web</code></p></li>
206 /// <li>
207 /// <p><code>custom-sqlserver-dev</code></p></li>
208 /// </ul>
209 /// <p>RDS for SQL Server supports the following values:</p>
210 /// <ul>
211 /// <li>
212 /// <p><code>sqlserver-ee</code> (Bring Your Own Media)</p></li>
213 /// <li>
214 /// <p><code>sqlserver-se</code> (Bring Your Own Media)</p></li>
215 /// <li>
216 /// <p><code>sqlserver-dev-ee</code></p></li>
217 /// </ul>
218 pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
219 self.inner.get_engine()
220 }
221 /// <p>The custom engine version (CEV) that you want to modify. This option is required for RDS Custom for Oracle, but optional for Amazon RDS. The combination of <code>Engine</code> and <code>EngineVersion</code> is unique per customer per Amazon Web Services Region.</p>
222 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.inner = self.inner.engine_version(input.into());
224 self
225 }
226 /// <p>The custom engine version (CEV) that you want to modify. This option is required for RDS Custom for Oracle, but optional for Amazon RDS. The combination of <code>Engine</code> and <code>EngineVersion</code> is unique per customer per Amazon Web Services Region.</p>
227 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.inner = self.inner.set_engine_version(input);
229 self
230 }
231 /// <p>The custom engine version (CEV) that you want to modify. This option is required for RDS Custom for Oracle, but optional for Amazon RDS. The combination of <code>Engine</code> and <code>EngineVersion</code> is unique per customer per Amazon Web Services Region.</p>
232 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
233 self.inner.get_engine_version()
234 }
235 /// <p>An optional description of your CEV.</p>
236 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237 self.inner = self.inner.description(input.into());
238 self
239 }
240 /// <p>An optional description of your CEV.</p>
241 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242 self.inner = self.inner.set_description(input);
243 self
244 }
245 /// <p>An optional description of your CEV.</p>
246 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
247 self.inner.get_description()
248 }
249 /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
250 /// <dl>
251 /// <dt>
252 /// available
253 /// </dt>
254 /// <dd>
255 /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
256 /// </dd>
257 /// <dt>
258 /// inactive
259 /// </dt>
260 /// <dd>
261 /// <p>You can create a new RDS Custom instance by restoring a DB snapshot with this CEV. You can't patch or create new instances with this CEV.</p>
262 /// </dd>
263 /// </dl>
264 /// <p>You can change any status to any status. A typical reason to change status is to prevent the accidental use of a CEV, or to make a deprecated CEV eligible for use again. For example, you might change the status of your CEV from <code>available</code> to <code>inactive</code>, and from <code>inactive</code> back to <code>available</code>. To change the availability status of the CEV, it must not currently be in use by an RDS Custom instance, snapshot, or automated backup.</p>
265 pub fn status(mut self, input: crate::types::CustomEngineVersionStatus) -> Self {
266 self.inner = self.inner.status(input);
267 self
268 }
269 /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
270 /// <dl>
271 /// <dt>
272 /// available
273 /// </dt>
274 /// <dd>
275 /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
276 /// </dd>
277 /// <dt>
278 /// inactive
279 /// </dt>
280 /// <dd>
281 /// <p>You can create a new RDS Custom instance by restoring a DB snapshot with this CEV. You can't patch or create new instances with this CEV.</p>
282 /// </dd>
283 /// </dl>
284 /// <p>You can change any status to any status. A typical reason to change status is to prevent the accidental use of a CEV, or to make a deprecated CEV eligible for use again. For example, you might change the status of your CEV from <code>available</code> to <code>inactive</code>, and from <code>inactive</code> back to <code>available</code>. To change the availability status of the CEV, it must not currently be in use by an RDS Custom instance, snapshot, or automated backup.</p>
285 pub fn set_status(mut self, input: ::std::option::Option<crate::types::CustomEngineVersionStatus>) -> Self {
286 self.inner = self.inner.set_status(input);
287 self
288 }
289 /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
290 /// <dl>
291 /// <dt>
292 /// available
293 /// </dt>
294 /// <dd>
295 /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
296 /// </dd>
297 /// <dt>
298 /// inactive
299 /// </dt>
300 /// <dd>
301 /// <p>You can create a new RDS Custom instance by restoring a DB snapshot with this CEV. You can't patch or create new instances with this CEV.</p>
302 /// </dd>
303 /// </dl>
304 /// <p>You can change any status to any status. A typical reason to change status is to prevent the accidental use of a CEV, or to make a deprecated CEV eligible for use again. For example, you might change the status of your CEV from <code>available</code> to <code>inactive</code>, and from <code>inactive</code> back to <code>available</code>. To change the availability status of the CEV, it must not currently be in use by an RDS Custom instance, snapshot, or automated backup.</p>
305 pub fn get_status(&self) -> &::std::option::Option<crate::types::CustomEngineVersionStatus> {
306 self.inner.get_status()
307 }
308}