1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateDbProxyInput {
/// <p>The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region. 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>
pub db_proxy_name: ::std::option::Option<::std::string::String>,
/// <p>The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify <code>MYSQL</code>. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify <code>POSTGRESQL</code>. For RDS for Microsoft SQL Server, specify <code>SQLSERVER</code>.</p>
pub engine_family: ::std::option::Option<crate::types::EngineFamily>,
/// <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. If you don't specify <code>DefaultAuthScheme</code> or specify this parameter as <code>NONE</code>, you must specify the <code>Auth</code> option.</p>
pub default_auth_scheme: ::std::option::Option<crate::types::DefaultAuthScheme>,
/// <p>The authorization mechanism that the proxy uses.</p>
pub auth: ::std::option::Option<::std::vec::Vec<crate::types::UserAuthConfig>>,
/// <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>One or more VPC subnet IDs to associate with the new proxy.</p>
pub vpc_subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>One or more VPC security group IDs to associate with the new proxy.</p>
pub vpc_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Specifies 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.</p>
pub require_tls: ::std::option::Option<bool>,
/// <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>
pub idle_client_timeout: ::std::option::Option<i32>,
/// <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>
pub debug_logging: ::std::option::Option<bool>,
/// <p>An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
/// <li>
/// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
/// </ul>
pub endpoint_network_type: ::std::option::Option<crate::types::EndpointNetworkType>,
/// <p>The network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy connects to the database using IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy connects to the database using IPv6 only.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code>, the database must support dual-stack mode. RDS doesn't support IPv6-only databases.</p></li>
/// <li>
/// <p>All targets registered with the proxy must be compatible with the specified network type.</p></li>
/// </ul>
pub target_connection_network_type: ::std::option::Option<crate::types::TargetConnectionNetworkType>,
}
impl CreateDbProxyInput {
/// <p>The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region. 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>
pub fn db_proxy_name(&self) -> ::std::option::Option<&str> {
self.db_proxy_name.as_deref()
}
/// <p>The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify <code>MYSQL</code>. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify <code>POSTGRESQL</code>. For RDS for Microsoft SQL Server, specify <code>SQLSERVER</code>.</p>
pub fn engine_family(&self) -> ::std::option::Option<&crate::types::EngineFamily> {
self.engine_family.as_ref()
}
/// <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. If you don't specify <code>DefaultAuthScheme</code> or specify this parameter as <code>NONE</code>, you must specify the <code>Auth</code> option.</p>
pub fn default_auth_scheme(&self) -> ::std::option::Option<&crate::types::DefaultAuthScheme> {
self.default_auth_scheme.as_ref()
}
/// <p>The authorization mechanism that the proxy uses.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.auth.is_none()`.
pub fn auth(&self) -> &[crate::types::UserAuthConfig] {
self.auth.as_deref().unwrap_or_default()
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>One or more VPC subnet IDs to associate with the new proxy.</p>
///
/// 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()`.
pub fn vpc_subnet_ids(&self) -> &[::std::string::String] {
self.vpc_subnet_ids.as_deref().unwrap_or_default()
}
/// <p>One or more VPC security group IDs to associate with the new proxy.</p>
///
/// 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()`.
pub fn vpc_security_group_ids(&self) -> &[::std::string::String] {
self.vpc_security_group_ids.as_deref().unwrap_or_default()
}
/// <p>Specifies 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.</p>
pub fn require_tls(&self) -> ::std::option::Option<bool> {
self.require_tls
}
/// <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>
pub fn idle_client_timeout(&self) -> ::std::option::Option<i32> {
self.idle_client_timeout
}
/// <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>
pub fn debug_logging(&self) -> ::std::option::Option<bool> {
self.debug_logging
}
/// <p>An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.</p>
///
/// 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()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
/// <li>
/// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
/// </ul>
pub fn endpoint_network_type(&self) -> ::std::option::Option<&crate::types::EndpointNetworkType> {
self.endpoint_network_type.as_ref()
}
/// <p>The network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy connects to the database using IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy connects to the database using IPv6 only.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code>, the database must support dual-stack mode. RDS doesn't support IPv6-only databases.</p></li>
/// <li>
/// <p>All targets registered with the proxy must be compatible with the specified network type.</p></li>
/// </ul>
pub fn target_connection_network_type(&self) -> ::std::option::Option<&crate::types::TargetConnectionNetworkType> {
self.target_connection_network_type.as_ref()
}
}
impl CreateDbProxyInput {
/// Creates a new builder-style object to manufacture [`CreateDbProxyInput`](crate::operation::create_db_proxy::CreateDbProxyInput).
pub fn builder() -> crate::operation::create_db_proxy::builders::CreateDbProxyInputBuilder {
crate::operation::create_db_proxy::builders::CreateDbProxyInputBuilder::default()
}
}
/// A builder for [`CreateDbProxyInput`](crate::operation::create_db_proxy::CreateDbProxyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDbProxyInputBuilder {
pub(crate) db_proxy_name: ::std::option::Option<::std::string::String>,
pub(crate) engine_family: ::std::option::Option<crate::types::EngineFamily>,
pub(crate) default_auth_scheme: ::std::option::Option<crate::types::DefaultAuthScheme>,
pub(crate) auth: ::std::option::Option<::std::vec::Vec<crate::types::UserAuthConfig>>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) vpc_subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) vpc_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) require_tls: ::std::option::Option<bool>,
pub(crate) idle_client_timeout: ::std::option::Option<i32>,
pub(crate) debug_logging: ::std::option::Option<bool>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) endpoint_network_type: ::std::option::Option<crate::types::EndpointNetworkType>,
pub(crate) target_connection_network_type: ::std::option::Option<crate::types::TargetConnectionNetworkType>,
}
impl CreateDbProxyInputBuilder {
/// <p>The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region. 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>
/// This field is required.
pub fn db_proxy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.db_proxy_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region. 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>
pub fn set_db_proxy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.db_proxy_name = input;
self
}
/// <p>The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region. 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>
pub fn get_db_proxy_name(&self) -> &::std::option::Option<::std::string::String> {
&self.db_proxy_name
}
/// <p>The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify <code>MYSQL</code>. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify <code>POSTGRESQL</code>. For RDS for Microsoft SQL Server, specify <code>SQLSERVER</code>.</p>
/// This field is required.
pub fn engine_family(mut self, input: crate::types::EngineFamily) -> Self {
self.engine_family = ::std::option::Option::Some(input);
self
}
/// <p>The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify <code>MYSQL</code>. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify <code>POSTGRESQL</code>. For RDS for Microsoft SQL Server, specify <code>SQLSERVER</code>.</p>
pub fn set_engine_family(mut self, input: ::std::option::Option<crate::types::EngineFamily>) -> Self {
self.engine_family = input;
self
}
/// <p>The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify <code>MYSQL</code>. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify <code>POSTGRESQL</code>. For RDS for Microsoft SQL Server, specify <code>SQLSERVER</code>.</p>
pub fn get_engine_family(&self) -> &::std::option::Option<crate::types::EngineFamily> {
&self.engine_family
}
/// <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. If you don't specify <code>DefaultAuthScheme</code> or specify this parameter as <code>NONE</code>, you must specify the <code>Auth</code> option.</p>
pub fn default_auth_scheme(mut self, input: crate::types::DefaultAuthScheme) -> Self {
self.default_auth_scheme = ::std::option::Option::Some(input);
self
}
/// <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. If you don't specify <code>DefaultAuthScheme</code> or specify this parameter as <code>NONE</code>, you must specify the <code>Auth</code> option.</p>
pub fn set_default_auth_scheme(mut self, input: ::std::option::Option<crate::types::DefaultAuthScheme>) -> Self {
self.default_auth_scheme = input;
self
}
/// <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. If you don't specify <code>DefaultAuthScheme</code> or specify this parameter as <code>NONE</code>, you must specify the <code>Auth</code> option.</p>
pub fn get_default_auth_scheme(&self) -> &::std::option::Option<crate::types::DefaultAuthScheme> {
&self.default_auth_scheme
}
/// Appends an item to `auth`.
///
/// To override the contents of this collection use [`set_auth`](Self::set_auth).
///
/// <p>The authorization mechanism that the proxy uses.</p>
pub fn auth(mut self, input: crate::types::UserAuthConfig) -> Self {
let mut v = self.auth.unwrap_or_default();
v.push(input);
self.auth = ::std::option::Option::Some(v);
self
}
/// <p>The authorization mechanism that the proxy uses.</p>
pub fn set_auth(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserAuthConfig>>) -> Self {
self.auth = input;
self
}
/// <p>The authorization mechanism that the proxy uses.</p>
pub fn get_auth(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserAuthConfig>> {
&self.auth
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
/// This field is required.
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// Appends an item to `vpc_subnet_ids`.
///
/// To override the contents of this collection use [`set_vpc_subnet_ids`](Self::set_vpc_subnet_ids).
///
/// <p>One or more VPC subnet IDs to associate with the new proxy.</p>
pub fn vpc_subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.vpc_subnet_ids.unwrap_or_default();
v.push(input.into());
self.vpc_subnet_ids = ::std::option::Option::Some(v);
self
}
/// <p>One or more VPC subnet IDs to associate with the new proxy.</p>
pub fn set_vpc_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.vpc_subnet_ids = input;
self
}
/// <p>One or more VPC subnet IDs to associate with the new proxy.</p>
pub fn get_vpc_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.vpc_subnet_ids
}
/// Appends an item to `vpc_security_group_ids`.
///
/// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
///
/// <p>One or more VPC security group IDs to associate with the new proxy.</p>
pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.vpc_security_group_ids.unwrap_or_default();
v.push(input.into());
self.vpc_security_group_ids = ::std::option::Option::Some(v);
self
}
/// <p>One or more VPC security group IDs to associate with the new proxy.</p>
pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.vpc_security_group_ids = input;
self
}
/// <p>One or more VPC security group IDs to associate with the new proxy.</p>
pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.vpc_security_group_ids
}
/// <p>Specifies 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.</p>
pub fn require_tls(mut self, input: bool) -> Self {
self.require_tls = ::std::option::Option::Some(input);
self
}
/// <p>Specifies 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.</p>
pub fn set_require_tls(mut self, input: ::std::option::Option<bool>) -> Self {
self.require_tls = input;
self
}
/// <p>Specifies 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.</p>
pub fn get_require_tls(&self) -> &::std::option::Option<bool> {
&self.require_tls
}
/// <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>
pub fn idle_client_timeout(mut self, input: i32) -> Self {
self.idle_client_timeout = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_idle_client_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
self.idle_client_timeout = input;
self
}
/// <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>
pub fn get_idle_client_timeout(&self) -> &::std::option::Option<i32> {
&self.idle_client_timeout
}
/// <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>
pub fn debug_logging(mut self, input: bool) -> Self {
self.debug_logging = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_debug_logging(mut self, input: ::std::option::Option<bool>) -> Self {
self.debug_logging = input;
self
}
/// <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>
pub fn get_debug_logging(&self) -> &::std::option::Option<bool> {
&self.debug_logging
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
/// <li>
/// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
/// </ul>
pub fn endpoint_network_type(mut self, input: crate::types::EndpointNetworkType) -> Self {
self.endpoint_network_type = ::std::option::Option::Some(input);
self
}
/// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
/// <li>
/// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
/// </ul>
pub fn set_endpoint_network_type(mut self, input: ::std::option::Option<crate::types::EndpointNetworkType>) -> Self {
self.endpoint_network_type = input;
self
}
/// <p>The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy endpoint supports IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy endpoint supports IPv6 only.</p></li>
/// <li>
/// <p><code>DUAL</code> - The proxy endpoint supports both IPv4 and IPv6.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC and all subnets must have an IPv6 CIDR block.</p></li>
/// <li>
/// <p>If you specify <code>IPV6</code> or <code>DUAL</code>, the VPC tenancy cannot be <code>dedicated</code>.</p></li>
/// </ul>
pub fn get_endpoint_network_type(&self) -> &::std::option::Option<crate::types::EndpointNetworkType> {
&self.endpoint_network_type
}
/// <p>The network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy connects to the database using IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy connects to the database using IPv6 only.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code>, the database must support dual-stack mode. RDS doesn't support IPv6-only databases.</p></li>
/// <li>
/// <p>All targets registered with the proxy must be compatible with the specified network type.</p></li>
/// </ul>
pub fn target_connection_network_type(mut self, input: crate::types::TargetConnectionNetworkType) -> Self {
self.target_connection_network_type = ::std::option::Option::Some(input);
self
}
/// <p>The network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy connects to the database using IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy connects to the database using IPv6 only.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code>, the database must support dual-stack mode. RDS doesn't support IPv6-only databases.</p></li>
/// <li>
/// <p>All targets registered with the proxy must be compatible with the specified network type.</p></li>
/// </ul>
pub fn set_target_connection_network_type(mut self, input: ::std::option::Option<crate::types::TargetConnectionNetworkType>) -> Self {
self.target_connection_network_type = input;
self
}
/// <p>The network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>IPV4</code> - The proxy connects to the database using IPv4 only.</p></li>
/// <li>
/// <p><code>IPV6</code> - The proxy connects to the database using IPv6 only.</p></li>
/// </ul>
/// <p>Default: <code>IPV4</code></p>
/// <p>Constraints:</p>
/// <ul>
/// <li>
/// <p>If you specify <code>IPV6</code>, the database must support dual-stack mode. RDS doesn't support IPv6-only databases.</p></li>
/// <li>
/// <p>All targets registered with the proxy must be compatible with the specified network type.</p></li>
/// </ul>
pub fn get_target_connection_network_type(&self) -> &::std::option::Option<crate::types::TargetConnectionNetworkType> {
&self.target_connection_network_type
}
/// Consumes the builder and constructs a [`CreateDbProxyInput`](crate::operation::create_db_proxy::CreateDbProxyInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_db_proxy::CreateDbProxyInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_db_proxy::CreateDbProxyInput {
db_proxy_name: self.db_proxy_name,
engine_family: self.engine_family,
default_auth_scheme: self.default_auth_scheme,
auth: self.auth,
role_arn: self.role_arn,
vpc_subnet_ids: self.vpc_subnet_ids,
vpc_security_group_ids: self.vpc_security_group_ids,
require_tls: self.require_tls,
idle_client_timeout: self.idle_client_timeout,
debug_logging: self.debug_logging,
tags: self.tags,
endpoint_network_type: self.endpoint_network_type,
target_connection_network_type: self.target_connection_network_type,
})
}
}