aws_sdk_rds/operation/delete_custom_db_engine_version/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_custom_db_engine_version::_delete_custom_db_engine_version_output::DeleteCustomDbEngineVersionOutputBuilder;
3
4pub use crate::operation::delete_custom_db_engine_version::_delete_custom_db_engine_version_input::DeleteCustomDbEngineVersionInputBuilder;
5
6impl crate::operation::delete_custom_db_engine_version::builders::DeleteCustomDbEngineVersionInputBuilder {
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::delete_custom_db_engine_version::DeleteCustomDbEngineVersionOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_custom_db_engine_version::DeleteCustomDBEngineVersionError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_custom_db_engine_version();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteCustomDBEngineVersion`.
24///
25/// <p>Deletes a custom engine version. To run this command, make sure you meet the following prerequisites:</p>
26/// <ul>
27/// <li>
28/// <p>The CEV must not be the default for RDS Custom. If it is, change the default before running this command.</p></li>
29/// <li>
30/// <p>The CEV must not be associated with an RDS Custom DB instance, RDS Custom instance snapshot, or automated backup of your RDS Custom instance.</p></li>
31/// </ul>
32/// <p>Typically, deletion takes a few minutes.</p><note>
33/// <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>DeleteCustomDbEngineVersion</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>DeleteCustomDbEngineVersion</code> event.</p>
34/// </note>
35/// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.delete">Deleting a CEV</a> in the <i>Amazon RDS User Guide</i>.</p>
36#[derive(::std::clone::Clone, ::std::fmt::Debug)]
37pub struct DeleteCustomDBEngineVersionFluentBuilder {
38    handle: ::std::sync::Arc<crate::client::Handle>,
39    inner: crate::operation::delete_custom_db_engine_version::builders::DeleteCustomDbEngineVersionInputBuilder,
40    config_override: ::std::option::Option<crate::config::Builder>,
41}
42impl
43    crate::client::customize::internal::CustomizableSend<
44        crate::operation::delete_custom_db_engine_version::DeleteCustomDbEngineVersionOutput,
45        crate::operation::delete_custom_db_engine_version::DeleteCustomDBEngineVersionError,
46    > for DeleteCustomDBEngineVersionFluentBuilder
47{
48    fn send(
49        self,
50        config_override: crate::config::Builder,
51    ) -> crate::client::customize::internal::BoxFuture<
52        crate::client::customize::internal::SendResult<
53            crate::operation::delete_custom_db_engine_version::DeleteCustomDbEngineVersionOutput,
54            crate::operation::delete_custom_db_engine_version::DeleteCustomDBEngineVersionError,
55        >,
56    > {
57        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
58    }
59}
60impl DeleteCustomDBEngineVersionFluentBuilder {
61    /// Creates a new `DeleteCustomDBEngineVersionFluentBuilder`.
62    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
63        Self {
64            handle,
65            inner: ::std::default::Default::default(),
66            config_override: ::std::option::Option::None,
67        }
68    }
69    /// Access the DeleteCustomDBEngineVersion as a reference.
70    pub fn as_input(&self) -> &crate::operation::delete_custom_db_engine_version::builders::DeleteCustomDbEngineVersionInputBuilder {
71        &self.inner
72    }
73    /// Sends the request and returns the response.
74    ///
75    /// If an error occurs, an `SdkError` will be returned with additional details that
76    /// can be matched against.
77    ///
78    /// By default, any retryable failures will be retried twice. Retry behavior
79    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
80    /// set when configuring the client.
81    pub async fn send(
82        self,
83    ) -> ::std::result::Result<
84        crate::operation::delete_custom_db_engine_version::DeleteCustomDbEngineVersionOutput,
85        ::aws_smithy_runtime_api::client::result::SdkError<
86            crate::operation::delete_custom_db_engine_version::DeleteCustomDBEngineVersionError,
87            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
88        >,
89    > {
90        let input = self
91            .inner
92            .build()
93            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
94        let runtime_plugins = crate::operation::delete_custom_db_engine_version::DeleteCustomDBEngineVersion::operation_runtime_plugins(
95            self.handle.runtime_plugins.clone(),
96            &self.handle.conf,
97            self.config_override,
98        );
99        crate::operation::delete_custom_db_engine_version::DeleteCustomDBEngineVersion::orchestrate(&runtime_plugins, input).await
100    }
101
102    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
103    pub fn customize(
104        self,
105    ) -> crate::client::customize::CustomizableOperation<
106        crate::operation::delete_custom_db_engine_version::DeleteCustomDbEngineVersionOutput,
107        crate::operation::delete_custom_db_engine_version::DeleteCustomDBEngineVersionError,
108        Self,
109    > {
110        crate::client::customize::CustomizableOperation::new(self)
111    }
112    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
113        self.set_config_override(::std::option::Option::Some(config_override.into()));
114        self
115    }
116
117    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
118        self.config_override = config_override;
119        self
120    }
121    /// <p>The database engine. RDS Custom for Oracle supports the following values:</p>
122    /// <ul>
123    /// <li>
124    /// <p><code>custom-oracle-ee</code></p></li>
125    /// <li>
126    /// <p><code>custom-oracle-ee-cdb</code></p></li>
127    /// <li>
128    /// <p><code>custom-oracle-se2</code></p></li>
129    /// <li>
130    /// <p><code>custom-oracle-se2-cdb</code></p></li>
131    /// </ul>
132    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.inner = self.inner.engine(input.into());
134        self
135    }
136    /// <p>The database engine. RDS Custom for Oracle supports the following values:</p>
137    /// <ul>
138    /// <li>
139    /// <p><code>custom-oracle-ee</code></p></li>
140    /// <li>
141    /// <p><code>custom-oracle-ee-cdb</code></p></li>
142    /// <li>
143    /// <p><code>custom-oracle-se2</code></p></li>
144    /// <li>
145    /// <p><code>custom-oracle-se2-cdb</code></p></li>
146    /// </ul>
147    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.inner = self.inner.set_engine(input);
149        self
150    }
151    /// <p>The database engine. 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    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
163        self.inner.get_engine()
164    }
165    /// <p>The custom engine version (CEV) for your DB instance. This option is required for RDS Custom, 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>
166    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.inner = self.inner.engine_version(input.into());
168        self
169    }
170    /// <p>The custom engine version (CEV) for your DB instance. This option is required for RDS Custom, 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>
171    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172        self.inner = self.inner.set_engine_version(input);
173        self
174    }
175    /// <p>The custom engine version (CEV) for your DB instance. This option is required for RDS Custom, 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>
176    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
177        self.inner.get_engine_version()
178    }
179}