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. RDS Custom for Oracle supports the following values:</p>
115    /// <ul>
116    /// <li>
117    /// <p><code>custom-oracle-ee</code></p></li>
118    /// <li>
119    /// <p><code>custom-oracle-ee-cdb</code></p></li>
120    /// <li>
121    /// <p><code>custom-oracle-se2</code></p></li>
122    /// <li>
123    /// <p><code>custom-oracle-se2-cdb</code></p></li>
124    /// </ul>
125    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.engine(input.into());
127        self
128    }
129    /// <p>The database engine. RDS Custom for Oracle supports the following values:</p>
130    /// <ul>
131    /// <li>
132    /// <p><code>custom-oracle-ee</code></p></li>
133    /// <li>
134    /// <p><code>custom-oracle-ee-cdb</code></p></li>
135    /// <li>
136    /// <p><code>custom-oracle-se2</code></p></li>
137    /// <li>
138    /// <p><code>custom-oracle-se2-cdb</code></p></li>
139    /// </ul>
140    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.inner = self.inner.set_engine(input);
142        self
143    }
144    /// <p>The database engine. RDS Custom for Oracle supports the following values:</p>
145    /// <ul>
146    /// <li>
147    /// <p><code>custom-oracle-ee</code></p></li>
148    /// <li>
149    /// <p><code>custom-oracle-ee-cdb</code></p></li>
150    /// <li>
151    /// <p><code>custom-oracle-se2</code></p></li>
152    /// <li>
153    /// <p><code>custom-oracle-se2-cdb</code></p></li>
154    /// </ul>
155    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
156        self.inner.get_engine()
157    }
158    /// <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>
159    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.inner = self.inner.engine_version(input.into());
161        self
162    }
163    /// <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>
164    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.inner = self.inner.set_engine_version(input);
166        self
167    }
168    /// <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>
169    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
170        self.inner.get_engine_version()
171    }
172    /// <p>An optional description of your CEV.</p>
173    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.description(input.into());
175        self
176    }
177    /// <p>An optional description of your CEV.</p>
178    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179        self.inner = self.inner.set_description(input);
180        self
181    }
182    /// <p>An optional description of your CEV.</p>
183    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
184        self.inner.get_description()
185    }
186    /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
187    /// <dl>
188    /// <dt>
189    /// available
190    /// </dt>
191    /// <dd>
192    /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
193    /// </dd>
194    /// <dt>
195    /// inactive
196    /// </dt>
197    /// <dd>
198    /// <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>
199    /// </dd>
200    /// </dl>
201    /// <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>
202    pub fn status(mut self, input: crate::types::CustomEngineVersionStatus) -> Self {
203        self.inner = self.inner.status(input);
204        self
205    }
206    /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
207    /// <dl>
208    /// <dt>
209    /// available
210    /// </dt>
211    /// <dd>
212    /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
213    /// </dd>
214    /// <dt>
215    /// inactive
216    /// </dt>
217    /// <dd>
218    /// <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>
219    /// </dd>
220    /// </dl>
221    /// <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>
222    pub fn set_status(mut self, input: ::std::option::Option<crate::types::CustomEngineVersionStatus>) -> Self {
223        self.inner = self.inner.set_status(input);
224        self
225    }
226    /// <p>The availability status to be assigned to the CEV. Valid values are as follows:</p>
227    /// <dl>
228    /// <dt>
229    /// available
230    /// </dt>
231    /// <dd>
232    /// <p>You can use this CEV to create a new RDS Custom DB instance.</p>
233    /// </dd>
234    /// <dt>
235    /// inactive
236    /// </dt>
237    /// <dd>
238    /// <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>
239    /// </dd>
240    /// </dl>
241    /// <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>
242    pub fn get_status(&self) -> &::std::option::Option<crate::types::CustomEngineVersionStatus> {
243        self.inner.get_status()
244    }
245}