aws_sdk_rds/operation/create_db_proxy_endpoint/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_db_proxy_endpoint::_create_db_proxy_endpoint_output::CreateDbProxyEndpointOutputBuilder;
3
4pub use crate::operation::create_db_proxy_endpoint::_create_db_proxy_endpoint_input::CreateDbProxyEndpointInputBuilder;
5
6impl crate::operation::create_db_proxy_endpoint::builders::CreateDbProxyEndpointInputBuilder {
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::create_db_proxy_endpoint::CreateDbProxyEndpointOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_db_proxy_endpoint::CreateDBProxyEndpointError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_db_proxy_endpoint();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateDBProxyEndpoint`.
24///
25/// <p>Creates a <code>DBProxyEndpoint</code>. Only applies to proxies that are associated with Aurora DB clusters. You can use DB proxy endpoints to specify read/write or read-only access to the DB cluster. You can also use DB proxy endpoints to access a DB proxy through a different VPC than the proxy's default VPC.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateDBProxyEndpointFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_db_proxy_endpoint::builders::CreateDbProxyEndpointInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_db_proxy_endpoint::CreateDbProxyEndpointOutput,
35 crate::operation::create_db_proxy_endpoint::CreateDBProxyEndpointError,
36 > for CreateDBProxyEndpointFluentBuilder
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::create_db_proxy_endpoint::CreateDbProxyEndpointOutput,
44 crate::operation::create_db_proxy_endpoint::CreateDBProxyEndpointError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateDBProxyEndpointFluentBuilder {
51 /// Creates a new `CreateDBProxyEndpointFluentBuilder`.
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 CreateDBProxyEndpoint as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_db_proxy_endpoint::builders::CreateDbProxyEndpointInputBuilder {
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::create_db_proxy_endpoint::CreateDbProxyEndpointOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_db_proxy_endpoint::CreateDBProxyEndpointError,
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::create_db_proxy_endpoint::CreateDBProxyEndpoint::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_db_proxy_endpoint::CreateDBProxyEndpoint::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::create_db_proxy_endpoint::CreateDbProxyEndpointOutput,
97 crate::operation::create_db_proxy_endpoint::CreateDBProxyEndpointError,
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 name of the DB proxy associated with the DB proxy endpoint that you create.</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 name of the DB proxy associated with the DB proxy endpoint that you create.</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 name of the DB proxy associated with the DB proxy endpoint that you create.</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 name of the DB proxy endpoint to create.</p>
126 pub fn db_proxy_endpoint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.db_proxy_endpoint_name(input.into());
128 self
129 }
130 /// <p>The name of the DB proxy endpoint to create.</p>
131 pub fn set_db_proxy_endpoint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_db_proxy_endpoint_name(input);
133 self
134 }
135 /// <p>The name of the DB proxy endpoint to create.</p>
136 pub fn get_db_proxy_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_db_proxy_endpoint_name()
138 }
139 ///
140 /// Appends an item to `VpcSubnetIds`.
141 ///
142 /// To override the contents of this collection use [`set_vpc_subnet_ids`](Self::set_vpc_subnet_ids).
143 ///
144 /// <p>The VPC subnet IDs for the DB proxy endpoint that you create. You can specify a different set of subnet IDs than for the original DB proxy.</p>
145 pub fn vpc_subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.inner = self.inner.vpc_subnet_ids(input.into());
147 self
148 }
149 /// <p>The VPC subnet IDs for the DB proxy endpoint that you create. You can specify a different set of subnet IDs than for the original DB proxy.</p>
150 pub fn set_vpc_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
151 self.inner = self.inner.set_vpc_subnet_ids(input);
152 self
153 }
154 /// <p>The VPC subnet IDs for the DB proxy endpoint that you create. You can specify a different set of subnet IDs than for the original DB proxy.</p>
155 pub fn get_vpc_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
156 self.inner.get_vpc_subnet_ids()
157 }
158 ///
159 /// Appends an item to `VpcSecurityGroupIds`.
160 ///
161 /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
162 ///
163 /// <p>The VPC security group IDs for the DB proxy endpoint that you create. You can specify a different set of security group IDs than for the original DB proxy. The default is the default security group for the VPC.</p>
164 pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.inner = self.inner.vpc_security_group_ids(input.into());
166 self
167 }
168 /// <p>The VPC security group IDs for the DB proxy endpoint that you create. You can specify a different set of security group IDs than for the original DB proxy. The default is the default security group for the VPC.</p>
169 pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
170 self.inner = self.inner.set_vpc_security_group_ids(input);
171 self
172 }
173 /// <p>The VPC security group IDs for the DB proxy endpoint that you create. You can specify a different set of security group IDs than for the original DB proxy. The default is the default security group for the VPC.</p>
174 pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
175 self.inner.get_vpc_security_group_ids()
176 }
177 /// <p>The role of the DB proxy endpoint. The role determines whether the endpoint can be used for read/write or only read operations. The default is <code>READ_WRITE</code>. The only role that proxies for RDS for Microsoft SQL Server support is <code>READ_WRITE</code>.</p>
178 pub fn target_role(mut self, input: crate::types::DbProxyEndpointTargetRole) -> Self {
179 self.inner = self.inner.target_role(input);
180 self
181 }
182 /// <p>The role of the DB proxy endpoint. The role determines whether the endpoint can be used for read/write or only read operations. The default is <code>READ_WRITE</code>. The only role that proxies for RDS for Microsoft SQL Server support is <code>READ_WRITE</code>.</p>
183 pub fn set_target_role(mut self, input: ::std::option::Option<crate::types::DbProxyEndpointTargetRole>) -> Self {
184 self.inner = self.inner.set_target_role(input);
185 self
186 }
187 /// <p>The role of the DB proxy endpoint. The role determines whether the endpoint can be used for read/write or only read operations. The default is <code>READ_WRITE</code>. The only role that proxies for RDS for Microsoft SQL Server support is <code>READ_WRITE</code>.</p>
188 pub fn get_target_role(&self) -> &::std::option::Option<crate::types::DbProxyEndpointTargetRole> {
189 self.inner.get_target_role()
190 }
191 ///
192 /// Appends an item to `Tags`.
193 ///
194 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
195 ///
196 /// <p>A list of tags.</p>
197 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
198 pub fn tags(mut self, input: crate::types::Tag) -> Self {
199 self.inner = self.inner.tags(input);
200 self
201 }
202 /// <p>A list of tags.</p>
203 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
204 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
205 self.inner = self.inner.set_tags(input);
206 self
207 }
208 /// <p>A list of tags.</p>
209 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
210 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
211 self.inner.get_tags()
212 }
213 /// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
214 /// <p>Valid values:</p>
215 /// <ul>
216 /// <li>
217 /// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
218 /// <li>
219 /// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
220 /// <li>
221 /// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
222 /// </ul>
223 /// <p>Default: <code>IPV4</code></p>
224 /// <p>Constraints:</p>
225 /// <ul>
226 /// <li>
227 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
228 /// <li>
229 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
230 /// </ul>
231 pub fn endpoint_network_type(mut self, input: crate::types::EndpointNetworkType) -> Self {
232 self.inner = self.inner.endpoint_network_type(input);
233 self
234 }
235 /// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
236 /// <p>Valid values:</p>
237 /// <ul>
238 /// <li>
239 /// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
240 /// <li>
241 /// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
242 /// <li>
243 /// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
244 /// </ul>
245 /// <p>Default: <code>IPV4</code></p>
246 /// <p>Constraints:</p>
247 /// <ul>
248 /// <li>
249 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
250 /// <li>
251 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
252 /// </ul>
253 pub fn set_endpoint_network_type(mut self, input: ::std::option::Option<crate::types::EndpointNetworkType>) -> Self {
254 self.inner = self.inner.set_endpoint_network_type(input);
255 self
256 }
257 /// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
258 /// <p>Valid values:</p>
259 /// <ul>
260 /// <li>
261 /// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
262 /// <li>
263 /// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
264 /// <li>
265 /// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
266 /// </ul>
267 /// <p>Default: <code>IPV4</code></p>
268 /// <p>Constraints:</p>
269 /// <ul>
270 /// <li>
271 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
272 /// <li>
273 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
274 /// </ul>
275 pub fn get_endpoint_network_type(&self) -> &::std::option::Option<crate::types::EndpointNetworkType> {
276 self.inner.get_endpoint_network_type()
277 }
278}