aws_sdk_rds/operation/modify_db_proxy/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_db_proxy::_modify_db_proxy_output::ModifyDbProxyOutputBuilder;
3
4pub use crate::operation::modify_db_proxy::_modify_db_proxy_input::ModifyDbProxyInputBuilder;
5
6impl crate::operation::modify_db_proxy::builders::ModifyDbProxyInputBuilder {
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_proxy::ModifyDbProxyOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::modify_db_proxy::ModifyDBProxyError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.modify_db_proxy();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ModifyDBProxy`.
24///
25/// <p>Changes the settings for an existing DB proxy.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ModifyDBProxyFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::modify_db_proxy::builders::ModifyDbProxyInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::modify_db_proxy::ModifyDbProxyOutput,
35 crate::operation::modify_db_proxy::ModifyDBProxyError,
36 > for ModifyDBProxyFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::modify_db_proxy::ModifyDbProxyOutput,
44 crate::operation::modify_db_proxy::ModifyDBProxyError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl ModifyDBProxyFluentBuilder {
51 /// Creates a new `ModifyDBProxyFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the ModifyDBProxy as a reference.
60 pub fn as_input(&self) -> &crate::operation::modify_db_proxy::builders::ModifyDbProxyInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::modify_db_proxy::ModifyDbProxyOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::modify_db_proxy::ModifyDBProxyError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::modify_db_proxy::ModifyDBProxy::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::modify_db_proxy::ModifyDBProxy::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::modify_db_proxy::ModifyDbProxyOutput,
97 crate::operation::modify_db_proxy::ModifyDBProxyError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>The identifier for the <code>DBProxy</code> to modify.</p>
112 pub fn db_proxy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.db_proxy_name(input.into());
114 self
115 }
116 /// <p>The identifier for the <code>DBProxy</code> to modify.</p>
117 pub fn set_db_proxy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_db_proxy_name(input);
119 self
120 }
121 /// <p>The identifier for the <code>DBProxy</code> to modify.</p>
122 pub fn get_db_proxy_name(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_db_proxy_name()
124 }
125 /// <p>The new identifier for the <code>DBProxy</code>. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.</p>
126 pub fn new_db_proxy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.new_db_proxy_name(input.into());
128 self
129 }
130 /// <p>The new identifier for the <code>DBProxy</code>. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.</p>
131 pub fn set_new_db_proxy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_new_db_proxy_name(input);
133 self
134 }
135 /// <p>The new identifier for the <code>DBProxy</code>. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.</p>
136 pub fn get_new_db_proxy_name(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_new_db_proxy_name()
138 }
139 /// <p>The default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are <code>NONE</code> and <code>IAM_AUTH</code>. When set to <code>IAM_AUTH</code>, the proxy uses end-to-end IAM authentication to connect to the database.</p>
140 pub fn default_auth_scheme(mut self, input: crate::types::DefaultAuthScheme) -> Self {
141 self.inner = self.inner.default_auth_scheme(input);
142 self
143 }
144 /// <p>The default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are <code>NONE</code> and <code>IAM_AUTH</code>. When set to <code>IAM_AUTH</code>, the proxy uses end-to-end IAM authentication to connect to the database.</p>
145 pub fn set_default_auth_scheme(mut self, input: ::std::option::Option<crate::types::DefaultAuthScheme>) -> Self {
146 self.inner = self.inner.set_default_auth_scheme(input);
147 self
148 }
149 /// <p>The default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are <code>NONE</code> and <code>IAM_AUTH</code>. When set to <code>IAM_AUTH</code>, the proxy uses end-to-end IAM authentication to connect to the database.</p>
150 pub fn get_default_auth_scheme(&self) -> &::std::option::Option<crate::types::DefaultAuthScheme> {
151 self.inner.get_default_auth_scheme()
152 }
153 ///
154 /// Appends an item to `Auth`.
155 ///
156 /// To override the contents of this collection use [`set_auth`](Self::set_auth).
157 ///
158 /// <p>The new authentication settings for the <code>DBProxy</code>.</p>
159 pub fn auth(mut self, input: crate::types::UserAuthConfig) -> Self {
160 self.inner = self.inner.auth(input);
161 self
162 }
163 /// <p>The new authentication settings for the <code>DBProxy</code>.</p>
164 pub fn set_auth(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserAuthConfig>>) -> Self {
165 self.inner = self.inner.set_auth(input);
166 self
167 }
168 /// <p>The new authentication settings for the <code>DBProxy</code>.</p>
169 pub fn get_auth(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserAuthConfig>> {
170 self.inner.get_auth()
171 }
172 /// <p>Whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy, even if the associated database doesn't use TLS.</p>
173 pub fn require_tls(mut self, input: bool) -> Self {
174 self.inner = self.inner.require_tls(input);
175 self
176 }
177 /// <p>Whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy, even if the associated database doesn't use TLS.</p>
178 pub fn set_require_tls(mut self, input: ::std::option::Option<bool>) -> Self {
179 self.inner = self.inner.set_require_tls(input);
180 self
181 }
182 /// <p>Whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy, even if the associated database doesn't use TLS.</p>
183 pub fn get_require_tls(&self) -> &::std::option::Option<bool> {
184 self.inner.get_require_tls()
185 }
186 /// <p>The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database.</p>
187 pub fn idle_client_timeout(mut self, input: i32) -> Self {
188 self.inner = self.inner.idle_client_timeout(input);
189 self
190 }
191 /// <p>The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database.</p>
192 pub fn set_idle_client_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
193 self.inner = self.inner.set_idle_client_timeout(input);
194 self
195 }
196 /// <p>The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database.</p>
197 pub fn get_idle_client_timeout(&self) -> &::std::option::Option<i32> {
198 self.inner.get_idle_client_timeout()
199 }
200 /// <p>Specifies whether the proxy logs detailed connection and query information. When you enable <code>DebugLogging</code>, the proxy captures connection details and connection pool behavior from your queries. Debug logging increases CloudWatch costs and can impact proxy performance. Enable this option only when you need to troubleshoot connection or performance issues.</p>
201 pub fn debug_logging(mut self, input: bool) -> Self {
202 self.inner = self.inner.debug_logging(input);
203 self
204 }
205 /// <p>Specifies whether the proxy logs detailed connection and query information. When you enable <code>DebugLogging</code>, the proxy captures connection details and connection pool behavior from your queries. Debug logging increases CloudWatch costs and can impact proxy performance. Enable this option only when you need to troubleshoot connection or performance issues.</p>
206 pub fn set_debug_logging(mut self, input: ::std::option::Option<bool>) -> Self {
207 self.inner = self.inner.set_debug_logging(input);
208 self
209 }
210 /// <p>Specifies whether the proxy logs detailed connection and query information. When you enable <code>DebugLogging</code>, the proxy captures connection details and connection pool behavior from your queries. Debug logging increases CloudWatch costs and can impact proxy performance. Enable this option only when you need to troubleshoot connection or performance issues.</p>
211 pub fn get_debug_logging(&self) -> &::std::option::Option<bool> {
212 self.inner.get_debug_logging()
213 }
214 /// <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
215 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.inner = self.inner.role_arn(input.into());
217 self
218 }
219 /// <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
220 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.inner = self.inner.set_role_arn(input);
222 self
223 }
224 /// <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
225 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
226 self.inner.get_role_arn()
227 }
228 ///
229 /// Appends an item to `SecurityGroups`.
230 ///
231 /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
232 ///
233 /// <p>The new list of security groups for the <code>DBProxy</code>.</p>
234 pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235 self.inner = self.inner.security_groups(input.into());
236 self
237 }
238 /// <p>The new list of security groups for the <code>DBProxy</code>.</p>
239 pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
240 self.inner = self.inner.set_security_groups(input);
241 self
242 }
243 /// <p>The new list of security groups for the <code>DBProxy</code>.</p>
244 pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
245 self.inner.get_security_groups()
246 }
247}