aws_sdk_rds/operation/create_db_proxy_endpoint/_create_db_proxy_endpoint_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateDbProxyEndpointInput {
6 /// <p>The name of the DB proxy associated with the DB proxy endpoint that you create.</p>
7 pub db_proxy_name: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the DB proxy endpoint to create.</p>
9 pub db_proxy_endpoint_name: ::std::option::Option<::std::string::String>,
10 /// <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>
11 pub vpc_subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12 /// <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>
13 pub vpc_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14 /// <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>
15 pub target_role: ::std::option::Option<crate::types::DbProxyEndpointTargetRole>,
16 /// <p>A list of tags.</p>
17 /// <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>
18 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
19 /// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
20 /// <p>Valid values:</p>
21 /// <ul>
22 /// <li>
23 /// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
24 /// <li>
25 /// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
26 /// <li>
27 /// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
28 /// </ul>
29 /// <p>Default: <code>IPV4</code></p>
30 /// <p>Constraints:</p>
31 /// <ul>
32 /// <li>
33 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
34 /// <li>
35 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
36 /// </ul>
37 pub endpoint_network_type: ::std::option::Option<crate::types::EndpointNetworkType>,
38}
39impl CreateDbProxyEndpointInput {
40 /// <p>The name of the DB proxy associated with the DB proxy endpoint that you create.</p>
41 pub fn db_proxy_name(&self) -> ::std::option::Option<&str> {
42 self.db_proxy_name.as_deref()
43 }
44 /// <p>The name of the DB proxy endpoint to create.</p>
45 pub fn db_proxy_endpoint_name(&self) -> ::std::option::Option<&str> {
46 self.db_proxy_endpoint_name.as_deref()
47 }
48 /// <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>
49 ///
50 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_subnet_ids.is_none()`.
51 pub fn vpc_subnet_ids(&self) -> &[::std::string::String] {
52 self.vpc_subnet_ids.as_deref().unwrap_or_default()
53 }
54 /// <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>
55 ///
56 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_security_group_ids.is_none()`.
57 pub fn vpc_security_group_ids(&self) -> &[::std::string::String] {
58 self.vpc_security_group_ids.as_deref().unwrap_or_default()
59 }
60 /// <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>
61 pub fn target_role(&self) -> ::std::option::Option<&crate::types::DbProxyEndpointTargetRole> {
62 self.target_role.as_ref()
63 }
64 /// <p>A list of tags.</p>
65 /// <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>
66 ///
67 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
68 pub fn tags(&self) -> &[crate::types::Tag] {
69 self.tags.as_deref().unwrap_or_default()
70 }
71 /// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
72 /// <p>Valid values:</p>
73 /// <ul>
74 /// <li>
75 /// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
76 /// <li>
77 /// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
78 /// <li>
79 /// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
80 /// </ul>
81 /// <p>Default: <code>IPV4</code></p>
82 /// <p>Constraints:</p>
83 /// <ul>
84 /// <li>
85 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
86 /// <li>
87 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
88 /// </ul>
89 pub fn endpoint_network_type(&self) -> ::std::option::Option<&crate::types::EndpointNetworkType> {
90 self.endpoint_network_type.as_ref()
91 }
92}
93impl CreateDbProxyEndpointInput {
94 /// Creates a new builder-style object to manufacture [`CreateDbProxyEndpointInput`](crate::operation::create_db_proxy_endpoint::CreateDbProxyEndpointInput).
95 pub fn builder() -> crate::operation::create_db_proxy_endpoint::builders::CreateDbProxyEndpointInputBuilder {
96 crate::operation::create_db_proxy_endpoint::builders::CreateDbProxyEndpointInputBuilder::default()
97 }
98}
99
100/// A builder for [`CreateDbProxyEndpointInput`](crate::operation::create_db_proxy_endpoint::CreateDbProxyEndpointInput).
101#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
102#[non_exhaustive]
103pub struct CreateDbProxyEndpointInputBuilder {
104 pub(crate) db_proxy_name: ::std::option::Option<::std::string::String>,
105 pub(crate) db_proxy_endpoint_name: ::std::option::Option<::std::string::String>,
106 pub(crate) vpc_subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
107 pub(crate) vpc_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
108 pub(crate) target_role: ::std::option::Option<crate::types::DbProxyEndpointTargetRole>,
109 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
110 pub(crate) endpoint_network_type: ::std::option::Option<crate::types::EndpointNetworkType>,
111}
112impl CreateDbProxyEndpointInputBuilder {
113 /// <p>The name of the DB proxy associated with the DB proxy endpoint that you create.</p>
114 /// This field is required.
115 pub fn db_proxy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.db_proxy_name = ::std::option::Option::Some(input.into());
117 self
118 }
119 /// <p>The name of the DB proxy associated with the DB proxy endpoint that you create.</p>
120 pub fn set_db_proxy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.db_proxy_name = input;
122 self
123 }
124 /// <p>The name of the DB proxy associated with the DB proxy endpoint that you create.</p>
125 pub fn get_db_proxy_name(&self) -> &::std::option::Option<::std::string::String> {
126 &self.db_proxy_name
127 }
128 /// <p>The name of the DB proxy endpoint to create.</p>
129 /// This field is required.
130 pub fn db_proxy_endpoint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.db_proxy_endpoint_name = ::std::option::Option::Some(input.into());
132 self
133 }
134 /// <p>The name of the DB proxy endpoint to create.</p>
135 pub fn set_db_proxy_endpoint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.db_proxy_endpoint_name = input;
137 self
138 }
139 /// <p>The name of the DB proxy endpoint to create.</p>
140 pub fn get_db_proxy_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
141 &self.db_proxy_endpoint_name
142 }
143 /// Appends an item to `vpc_subnet_ids`.
144 ///
145 /// To override the contents of this collection use [`set_vpc_subnet_ids`](Self::set_vpc_subnet_ids).
146 ///
147 /// <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>
148 pub fn vpc_subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149 let mut v = self.vpc_subnet_ids.unwrap_or_default();
150 v.push(input.into());
151 self.vpc_subnet_ids = ::std::option::Option::Some(v);
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 set_vpc_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
156 self.vpc_subnet_ids = input;
157 self
158 }
159 /// <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>
160 pub fn get_vpc_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
161 &self.vpc_subnet_ids
162 }
163 /// Appends an item to `vpc_security_group_ids`.
164 ///
165 /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
166 ///
167 /// <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>
168 pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169 let mut v = self.vpc_security_group_ids.unwrap_or_default();
170 v.push(input.into());
171 self.vpc_security_group_ids = ::std::option::Option::Some(v);
172 self
173 }
174 /// <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>
175 pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
176 self.vpc_security_group_ids = input;
177 self
178 }
179 /// <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>
180 pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
181 &self.vpc_security_group_ids
182 }
183 /// <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>
184 pub fn target_role(mut self, input: crate::types::DbProxyEndpointTargetRole) -> Self {
185 self.target_role = ::std::option::Option::Some(input);
186 self
187 }
188 /// <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>
189 pub fn set_target_role(mut self, input: ::std::option::Option<crate::types::DbProxyEndpointTargetRole>) -> Self {
190 self.target_role = input;
191 self
192 }
193 /// <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>
194 pub fn get_target_role(&self) -> &::std::option::Option<crate::types::DbProxyEndpointTargetRole> {
195 &self.target_role
196 }
197 /// Appends an item to `tags`.
198 ///
199 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
200 ///
201 /// <p>A list of tags.</p>
202 /// <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>
203 pub fn tags(mut self, input: crate::types::Tag) -> Self {
204 let mut v = self.tags.unwrap_or_default();
205 v.push(input);
206 self.tags = ::std::option::Option::Some(v);
207 self
208 }
209 /// <p>A list of tags.</p>
210 /// <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>
211 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
212 self.tags = input;
213 self
214 }
215 /// <p>A list of tags.</p>
216 /// <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>
217 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
218 &self.tags
219 }
220 /// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
221 /// <p>Valid values:</p>
222 /// <ul>
223 /// <li>
224 /// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
225 /// <li>
226 /// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
227 /// <li>
228 /// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
229 /// </ul>
230 /// <p>Default: <code>IPV4</code></p>
231 /// <p>Constraints:</p>
232 /// <ul>
233 /// <li>
234 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
235 /// <li>
236 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
237 /// </ul>
238 pub fn endpoint_network_type(mut self, input: crate::types::EndpointNetworkType) -> Self {
239 self.endpoint_network_type = ::std::option::Option::Some(input);
240 self
241 }
242 /// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
243 /// <p>Valid values:</p>
244 /// <ul>
245 /// <li>
246 /// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
247 /// <li>
248 /// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
249 /// <li>
250 /// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
251 /// </ul>
252 /// <p>Default: <code>IPV4</code></p>
253 /// <p>Constraints:</p>
254 /// <ul>
255 /// <li>
256 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
257 /// <li>
258 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
259 /// </ul>
260 pub fn set_endpoint_network_type(mut self, input: ::std::option::Option<crate::types::EndpointNetworkType>) -> Self {
261 self.endpoint_network_type = input;
262 self
263 }
264 /// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
265 /// <p>Valid values:</p>
266 /// <ul>
267 /// <li>
268 /// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
269 /// <li>
270 /// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
271 /// <li>
272 /// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
273 /// </ul>
274 /// <p>Default: <code>IPV4</code></p>
275 /// <p>Constraints:</p>
276 /// <ul>
277 /// <li>
278 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
279 /// <li>
280 /// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
281 /// </ul>
282 pub fn get_endpoint_network_type(&self) -> &::std::option::Option<crate::types::EndpointNetworkType> {
283 &self.endpoint_network_type
284 }
285 /// Consumes the builder and constructs a [`CreateDbProxyEndpointInput`](crate::operation::create_db_proxy_endpoint::CreateDbProxyEndpointInput).
286 pub fn build(
287 self,
288 ) -> ::std::result::Result<crate::operation::create_db_proxy_endpoint::CreateDbProxyEndpointInput, ::aws_smithy_types::error::operation::BuildError>
289 {
290 ::std::result::Result::Ok(crate::operation::create_db_proxy_endpoint::CreateDbProxyEndpointInput {
291 db_proxy_name: self.db_proxy_name,
292 db_proxy_endpoint_name: self.db_proxy_endpoint_name,
293 vpc_subnet_ids: self.vpc_subnet_ids,
294 vpc_security_group_ids: self.vpc_security_group_ids,
295 target_role: self.target_role,
296 tags: self.tags,
297 endpoint_network_type: self.endpoint_network_type,
298 })
299 }
300}