aws_sdk_docdbelastic/operation/update_cluster/_update_cluster_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)]
5pub struct UpdateClusterInput {
6 /// <p>The ARN identifier of the elastic cluster.</p>
7 pub cluster_arn: ::std::option::Option<::std::string::String>,
8 /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
9 pub auth_type: ::std::option::Option<crate::types::Auth>,
10 /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
11 pub shard_capacity: ::std::option::Option<i32>,
12 /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
13 pub shard_count: ::std::option::Option<i32>,
14 /// <p>A list of EC2 VPC security groups to associate with the elastic cluster.</p>
15 pub vpc_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16 /// <p>The Amazon EC2 subnet IDs for the elastic cluster.</p>
17 pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
18 /// <p>The password associated with the elastic cluster administrator. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).</p>
19 /// <p><i>Constraints</i>: Must contain from 8 to 100 characters.</p>
20 pub admin_user_password: ::std::option::Option<::std::string::String>,
21 /// <p>The client token for the elastic cluster.</p>
22 pub client_token: ::std::option::Option<::std::string::String>,
23 /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
24 /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
25 /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
26 /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
27 /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
28 pub preferred_maintenance_window: ::std::option::Option<::std::string::String>,
29 /// <p>The number of days for which automatic snapshots are retained.</p>
30 pub backup_retention_period: ::std::option::Option<i32>,
31 /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
32 pub preferred_backup_window: ::std::option::Option<::std::string::String>,
33 /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
34 pub shard_instance_count: ::std::option::Option<i32>,
35}
36impl UpdateClusterInput {
37 /// <p>The ARN identifier of the elastic cluster.</p>
38 pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
39 self.cluster_arn.as_deref()
40 }
41 /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
42 pub fn auth_type(&self) -> ::std::option::Option<&crate::types::Auth> {
43 self.auth_type.as_ref()
44 }
45 /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
46 pub fn shard_capacity(&self) -> ::std::option::Option<i32> {
47 self.shard_capacity
48 }
49 /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
50 pub fn shard_count(&self) -> ::std::option::Option<i32> {
51 self.shard_count
52 }
53 /// <p>A list of EC2 VPC security groups to associate with the elastic cluster.</p>
54 ///
55 /// 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()`.
56 pub fn vpc_security_group_ids(&self) -> &[::std::string::String] {
57 self.vpc_security_group_ids.as_deref().unwrap_or_default()
58 }
59 /// <p>The Amazon EC2 subnet IDs for the elastic cluster.</p>
60 ///
61 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
62 pub fn subnet_ids(&self) -> &[::std::string::String] {
63 self.subnet_ids.as_deref().unwrap_or_default()
64 }
65 /// <p>The password associated with the elastic cluster administrator. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).</p>
66 /// <p><i>Constraints</i>: Must contain from 8 to 100 characters.</p>
67 pub fn admin_user_password(&self) -> ::std::option::Option<&str> {
68 self.admin_user_password.as_deref()
69 }
70 /// <p>The client token for the elastic cluster.</p>
71 pub fn client_token(&self) -> ::std::option::Option<&str> {
72 self.client_token.as_deref()
73 }
74 /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
75 /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
76 /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
77 /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
78 /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
79 pub fn preferred_maintenance_window(&self) -> ::std::option::Option<&str> {
80 self.preferred_maintenance_window.as_deref()
81 }
82 /// <p>The number of days for which automatic snapshots are retained.</p>
83 pub fn backup_retention_period(&self) -> ::std::option::Option<i32> {
84 self.backup_retention_period
85 }
86 /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
87 pub fn preferred_backup_window(&self) -> ::std::option::Option<&str> {
88 self.preferred_backup_window.as_deref()
89 }
90 /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
91 pub fn shard_instance_count(&self) -> ::std::option::Option<i32> {
92 self.shard_instance_count
93 }
94}
95impl ::std::fmt::Debug for UpdateClusterInput {
96 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
97 let mut formatter = f.debug_struct("UpdateClusterInput");
98 formatter.field("cluster_arn", &self.cluster_arn);
99 formatter.field("auth_type", &self.auth_type);
100 formatter.field("shard_capacity", &self.shard_capacity);
101 formatter.field("shard_count", &self.shard_count);
102 formatter.field("vpc_security_group_ids", &self.vpc_security_group_ids);
103 formatter.field("subnet_ids", &self.subnet_ids);
104 formatter.field("admin_user_password", &"*** Sensitive Data Redacted ***");
105 formatter.field("client_token", &self.client_token);
106 formatter.field("preferred_maintenance_window", &self.preferred_maintenance_window);
107 formatter.field("backup_retention_period", &self.backup_retention_period);
108 formatter.field("preferred_backup_window", &self.preferred_backup_window);
109 formatter.field("shard_instance_count", &self.shard_instance_count);
110 formatter.finish()
111 }
112}
113impl UpdateClusterInput {
114 /// Creates a new builder-style object to manufacture [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
115 pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
116 crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
117 }
118}
119
120/// A builder for [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
121#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
122#[non_exhaustive]
123pub struct UpdateClusterInputBuilder {
124 pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
125 pub(crate) auth_type: ::std::option::Option<crate::types::Auth>,
126 pub(crate) shard_capacity: ::std::option::Option<i32>,
127 pub(crate) shard_count: ::std::option::Option<i32>,
128 pub(crate) vpc_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
129 pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
130 pub(crate) admin_user_password: ::std::option::Option<::std::string::String>,
131 pub(crate) client_token: ::std::option::Option<::std::string::String>,
132 pub(crate) preferred_maintenance_window: ::std::option::Option<::std::string::String>,
133 pub(crate) backup_retention_period: ::std::option::Option<i32>,
134 pub(crate) preferred_backup_window: ::std::option::Option<::std::string::String>,
135 pub(crate) shard_instance_count: ::std::option::Option<i32>,
136}
137impl UpdateClusterInputBuilder {
138 /// <p>The ARN identifier of the elastic cluster.</p>
139 /// This field is required.
140 pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 self.cluster_arn = ::std::option::Option::Some(input.into());
142 self
143 }
144 /// <p>The ARN identifier of the elastic cluster.</p>
145 pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146 self.cluster_arn = input;
147 self
148 }
149 /// <p>The ARN identifier of the elastic cluster.</p>
150 pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
151 &self.cluster_arn
152 }
153 /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
154 pub fn auth_type(mut self, input: crate::types::Auth) -> Self {
155 self.auth_type = ::std::option::Option::Some(input);
156 self
157 }
158 /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
159 pub fn set_auth_type(mut self, input: ::std::option::Option<crate::types::Auth>) -> Self {
160 self.auth_type = input;
161 self
162 }
163 /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
164 pub fn get_auth_type(&self) -> &::std::option::Option<crate::types::Auth> {
165 &self.auth_type
166 }
167 /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
168 pub fn shard_capacity(mut self, input: i32) -> Self {
169 self.shard_capacity = ::std::option::Option::Some(input);
170 self
171 }
172 /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
173 pub fn set_shard_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
174 self.shard_capacity = input;
175 self
176 }
177 /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
178 pub fn get_shard_capacity(&self) -> &::std::option::Option<i32> {
179 &self.shard_capacity
180 }
181 /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
182 pub fn shard_count(mut self, input: i32) -> Self {
183 self.shard_count = ::std::option::Option::Some(input);
184 self
185 }
186 /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
187 pub fn set_shard_count(mut self, input: ::std::option::Option<i32>) -> Self {
188 self.shard_count = input;
189 self
190 }
191 /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
192 pub fn get_shard_count(&self) -> &::std::option::Option<i32> {
193 &self.shard_count
194 }
195 /// Appends an item to `vpc_security_group_ids`.
196 ///
197 /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
198 ///
199 /// <p>A list of EC2 VPC security groups to associate with the elastic cluster.</p>
200 pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201 let mut v = self.vpc_security_group_ids.unwrap_or_default();
202 v.push(input.into());
203 self.vpc_security_group_ids = ::std::option::Option::Some(v);
204 self
205 }
206 /// <p>A list of EC2 VPC security groups to associate with the elastic cluster.</p>
207 pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
208 self.vpc_security_group_ids = input;
209 self
210 }
211 /// <p>A list of EC2 VPC security groups to associate with the elastic cluster.</p>
212 pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
213 &self.vpc_security_group_ids
214 }
215 /// Appends an item to `subnet_ids`.
216 ///
217 /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
218 ///
219 /// <p>The Amazon EC2 subnet IDs for the elastic cluster.</p>
220 pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221 let mut v = self.subnet_ids.unwrap_or_default();
222 v.push(input.into());
223 self.subnet_ids = ::std::option::Option::Some(v);
224 self
225 }
226 /// <p>The Amazon EC2 subnet IDs for the elastic cluster.</p>
227 pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
228 self.subnet_ids = input;
229 self
230 }
231 /// <p>The Amazon EC2 subnet IDs for the elastic cluster.</p>
232 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
233 &self.subnet_ids
234 }
235 /// <p>The password associated with the elastic cluster administrator. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).</p>
236 /// <p><i>Constraints</i>: Must contain from 8 to 100 characters.</p>
237 pub fn admin_user_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238 self.admin_user_password = ::std::option::Option::Some(input.into());
239 self
240 }
241 /// <p>The password associated with the elastic cluster administrator. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).</p>
242 /// <p><i>Constraints</i>: Must contain from 8 to 100 characters.</p>
243 pub fn set_admin_user_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.admin_user_password = input;
245 self
246 }
247 /// <p>The password associated with the elastic cluster administrator. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).</p>
248 /// <p><i>Constraints</i>: Must contain from 8 to 100 characters.</p>
249 pub fn get_admin_user_password(&self) -> &::std::option::Option<::std::string::String> {
250 &self.admin_user_password
251 }
252 /// <p>The client token for the elastic cluster.</p>
253 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254 self.client_token = ::std::option::Option::Some(input.into());
255 self
256 }
257 /// <p>The client token for the elastic cluster.</p>
258 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.client_token = input;
260 self
261 }
262 /// <p>The client token for the elastic cluster.</p>
263 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
264 &self.client_token
265 }
266 /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
267 /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
268 /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
269 /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
270 /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
271 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
272 self.preferred_maintenance_window = ::std::option::Option::Some(input.into());
273 self
274 }
275 /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
276 /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
277 /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
278 /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
279 /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
280 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
281 self.preferred_maintenance_window = input;
282 self
283 }
284 /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
285 /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
286 /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
287 /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
288 /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
289 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
290 &self.preferred_maintenance_window
291 }
292 /// <p>The number of days for which automatic snapshots are retained.</p>
293 pub fn backup_retention_period(mut self, input: i32) -> Self {
294 self.backup_retention_period = ::std::option::Option::Some(input);
295 self
296 }
297 /// <p>The number of days for which automatic snapshots are retained.</p>
298 pub fn set_backup_retention_period(mut self, input: ::std::option::Option<i32>) -> Self {
299 self.backup_retention_period = input;
300 self
301 }
302 /// <p>The number of days for which automatic snapshots are retained.</p>
303 pub fn get_backup_retention_period(&self) -> &::std::option::Option<i32> {
304 &self.backup_retention_period
305 }
306 /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
307 pub fn preferred_backup_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
308 self.preferred_backup_window = ::std::option::Option::Some(input.into());
309 self
310 }
311 /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
312 pub fn set_preferred_backup_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313 self.preferred_backup_window = input;
314 self
315 }
316 /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
317 pub fn get_preferred_backup_window(&self) -> &::std::option::Option<::std::string::String> {
318 &self.preferred_backup_window
319 }
320 /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
321 pub fn shard_instance_count(mut self, input: i32) -> Self {
322 self.shard_instance_count = ::std::option::Option::Some(input);
323 self
324 }
325 /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
326 pub fn set_shard_instance_count(mut self, input: ::std::option::Option<i32>) -> Self {
327 self.shard_instance_count = input;
328 self
329 }
330 /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
331 pub fn get_shard_instance_count(&self) -> &::std::option::Option<i32> {
332 &self.shard_instance_count
333 }
334 /// Consumes the builder and constructs a [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
335 pub fn build(
336 self,
337 ) -> ::std::result::Result<crate::operation::update_cluster::UpdateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
338 ::std::result::Result::Ok(crate::operation::update_cluster::UpdateClusterInput {
339 cluster_arn: self.cluster_arn,
340 auth_type: self.auth_type,
341 shard_capacity: self.shard_capacity,
342 shard_count: self.shard_count,
343 vpc_security_group_ids: self.vpc_security_group_ids,
344 subnet_ids: self.subnet_ids,
345 admin_user_password: self.admin_user_password,
346 client_token: self.client_token,
347 preferred_maintenance_window: self.preferred_maintenance_window,
348 backup_retention_period: self.backup_retention_period,
349 preferred_backup_window: self.preferred_backup_window,
350 shard_instance_count: self.shard_instance_count,
351 })
352 }
353}
354impl ::std::fmt::Debug for UpdateClusterInputBuilder {
355 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
356 let mut formatter = f.debug_struct("UpdateClusterInputBuilder");
357 formatter.field("cluster_arn", &self.cluster_arn);
358 formatter.field("auth_type", &self.auth_type);
359 formatter.field("shard_capacity", &self.shard_capacity);
360 formatter.field("shard_count", &self.shard_count);
361 formatter.field("vpc_security_group_ids", &self.vpc_security_group_ids);
362 formatter.field("subnet_ids", &self.subnet_ids);
363 formatter.field("admin_user_password", &"*** Sensitive Data Redacted ***");
364 formatter.field("client_token", &self.client_token);
365 formatter.field("preferred_maintenance_window", &self.preferred_maintenance_window);
366 formatter.field("backup_retention_period", &self.backup_retention_period);
367 formatter.field("preferred_backup_window", &self.preferred_backup_window);
368 formatter.field("shard_instance_count", &self.shard_instance_count);
369 formatter.finish()
370 }
371}