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_output::ModifyCustomDbEngineVersionOutputBuilder;
3
4pub use crate::operation::modify_custom_db_engine_version::_modify_custom_db_engine_version_input::ModifyCustomDbEngineVersionInputBuilder;
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>ccustom-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 only <code>sqlserver-dev-ee</code>.</p>
138 pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139 self.inner = self.inner.engine(input.into());
140 self
141 }
142 /// <p>The database engine.</p>
143 /// <p>RDS Custom for Oracle supports the following values:</p>
144 /// <ul>
145 /// <li>
146 /// <p><code>custom-oracle-ee</code></p></li>
147 /// <li>
148 /// <p><code>custom-oracle-ee-cdb</code></p></li>
149 /// <li>
150 /// <p><code>custom-oracle-se2</code></p></li>
151 /// <li>
152 /// <p><code>custom-oracle-se2-cdb</code></p></li>
153 /// </ul>
154 /// <p>RDS Custom for SQL Server supports the following values:</p>
155 /// <ul>
156 /// <li>
157 /// <p><code>custom-sqlserver-ee</code></p></li>
158 /// <li>
159 /// <p><code>custom-sqlserver-se</code></p></li>
160 /// <li>
161 /// <p><code>ccustom-sqlserver-web</code></p></li>
162 /// <li>
163 /// <p><code>custom-sqlserver-dev</code></p></li>
164 /// </ul>
165 /// <p>RDS for SQL Server supports only <code>sqlserver-dev-ee</code>.</p>
166 pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.inner = self.inner.set_engine(input);
168 self
169 }
170 /// <p>The database engine.</p>
171 /// <p>RDS Custom for Oracle supports the following values:</p>
172 /// <ul>
173 /// <li>
174 /// <p><code>custom-oracle-ee</code></p></li>
175 /// <li>
176 /// <p><code>custom-oracle-ee-cdb</code></p></li>
177 /// <li>
178 /// <p><code>custom-oracle-se2</code></p></li>
179 /// <li>
180 /// <p><code>custom-oracle-se2-cdb</code></p></li>
181 /// </ul>
182 /// <p>RDS Custom for SQL Server supports the following values:</p>
183 /// <ul>
184 /// <li>
185 /// <p><code>custom-sqlserver-ee</code></p></li>
186 /// <li>
187 /// <p><code>custom-sqlserver-se</code></p></li>
188 /// <li>
189 /// <p><code>ccustom-sqlserver-web</code></p></li>
190 /// <li>
191 /// <p><code>custom-sqlserver-dev</code></p></li>
192 /// </ul>
193 /// <p>RDS for SQL Server supports only <code>sqlserver-dev-ee</code>.</p>
194 pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
195 self.inner.get_engine()
196 }
197 /// <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>
198 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199 self.inner = self.inner.engine_version(input.into());
200 self
201 }
202 /// <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>
203 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204 self.inner = self.inner.set_engine_version(input);
205 self
206 }
207 /// <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>
208 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
209 self.inner.get_engine_version()
210 }
211 /// <p>An optional description of your CEV.</p>
212 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213 self.inner = self.inner.description(input.into());
214 self
215 }
216 /// <p>An optional description of your CEV.</p>
217 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218 self.inner = self.inner.set_description(input);
219 self
220 }
221 /// <p>An optional description of your CEV.</p>
222 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
223 self.inner.get_description()
224 }
225 /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
226 /// <dl>
227 /// <dt>
228 /// available
229 /// </dt>
230 /// <dd>
231 /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
232 /// </dd>
233 /// <dt>
234 /// inactive
235 /// </dt>
236 /// <dd>
237 /// <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>
238 /// </dd>
239 /// </dl>
240 /// <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>
241 pub fn status(mut self, input: crate::types::CustomEngineVersionStatus) -> Self {
242 self.inner = self.inner.status(input);
243 self
244 }
245 /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
246 /// <dl>
247 /// <dt>
248 /// available
249 /// </dt>
250 /// <dd>
251 /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
252 /// </dd>
253 /// <dt>
254 /// inactive
255 /// </dt>
256 /// <dd>
257 /// <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>
258 /// </dd>
259 /// </dl>
260 /// <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>
261 pub fn set_status(mut self, input: ::std::option::Option<crate::types::CustomEngineVersionStatus>) -> Self {
262 self.inner = self.inner.set_status(input);
263 self
264 }
265 /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
266 /// <dl>
267 /// <dt>
268 /// available
269 /// </dt>
270 /// <dd>
271 /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
272 /// </dd>
273 /// <dt>
274 /// inactive
275 /// </dt>
276 /// <dd>
277 /// <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>
278 /// </dd>
279 /// </dl>
280 /// <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>
281 pub fn get_status(&self) -> &::std::option::Option<crate::types::CustomEngineVersionStatus> {
282 self.inner.get_status()
283 }
284}