aws_sdk_memorydb/operation/update_cluster/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_cluster::_update_cluster_output::UpdateClusterOutputBuilder;
3
4pub use crate::operation::update_cluster::_update_cluster_input::UpdateClusterInputBuilder;
5
6impl crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
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::update_cluster::UpdateClusterOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_cluster::UpdateClusterError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_cluster();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateCluster`.
24///
25/// <p>Modifies the settings for a cluster. You can use this operation to change one or more cluster configuration settings by specifying the settings and the new values.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateClusterFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_cluster::builders::UpdateClusterInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_cluster::UpdateClusterOutput,
35        crate::operation::update_cluster::UpdateClusterError,
36    > for UpdateClusterFluentBuilder
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::update_cluster::UpdateClusterOutput,
44            crate::operation::update_cluster::UpdateClusterError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateClusterFluentBuilder {
51    /// Creates a new `UpdateClusterFluentBuilder`.
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 UpdateCluster as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
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::update_cluster::UpdateClusterOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_cluster::UpdateClusterError,
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::update_cluster::UpdateCluster::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_cluster::UpdateCluster::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::update_cluster::UpdateClusterOutput,
97        crate::operation::update_cluster::UpdateClusterError,
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 cluster to update.</p>
112    pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.cluster_name(input.into());
114        self
115    }
116    /// <p>The name of the cluster to update.</p>
117    pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_cluster_name(input);
119        self
120    }
121    /// <p>The name of the cluster to update.</p>
122    pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_cluster_name()
124    }
125    /// <p>The description of the cluster to update.</p>
126    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.description(input.into());
128        self
129    }
130    /// <p>The description of the cluster to update.</p>
131    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_description(input);
133        self
134    }
135    /// <p>The description of the cluster to update.</p>
136    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_description()
138    }
139    ///
140    /// Appends an item to `SecurityGroupIds`.
141    ///
142    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
143    ///
144    /// <p>The SecurityGroupIds to update.</p>
145    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.security_group_ids(input.into());
147        self
148    }
149    /// <p>The SecurityGroupIds to update.</p>
150    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
151        self.inner = self.inner.set_security_group_ids(input);
152        self
153    }
154    /// <p>The SecurityGroupIds to update.</p>
155    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
156        self.inner.get_security_group_ids()
157    }
158    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p>
159    /// <p>Valid values for <code>ddd</code> are:</p>
160    /// <ul>
161    /// <li>
162    /// <p><code>sun</code></p></li>
163    /// <li>
164    /// <p><code>mon</code></p></li>
165    /// <li>
166    /// <p><code>tue</code></p></li>
167    /// <li>
168    /// <p><code>wed</code></p></li>
169    /// <li>
170    /// <p><code>thu</code></p></li>
171    /// <li>
172    /// <p><code>fri</code></p></li>
173    /// <li>
174    /// <p><code>sat</code></p></li>
175    /// </ul>
176    /// <p>Example: <code>sun:23:00-mon:01:30</code></p>
177    pub fn maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.inner = self.inner.maintenance_window(input.into());
179        self
180    }
181    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p>
182    /// <p>Valid values for <code>ddd</code> are:</p>
183    /// <ul>
184    /// <li>
185    /// <p><code>sun</code></p></li>
186    /// <li>
187    /// <p><code>mon</code></p></li>
188    /// <li>
189    /// <p><code>tue</code></p></li>
190    /// <li>
191    /// <p><code>wed</code></p></li>
192    /// <li>
193    /// <p><code>thu</code></p></li>
194    /// <li>
195    /// <p><code>fri</code></p></li>
196    /// <li>
197    /// <p><code>sat</code></p></li>
198    /// </ul>
199    /// <p>Example: <code>sun:23:00-mon:01:30</code></p>
200    pub fn set_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.inner = self.inner.set_maintenance_window(input);
202        self
203    }
204    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p>
205    /// <p>Valid values for <code>ddd</code> are:</p>
206    /// <ul>
207    /// <li>
208    /// <p><code>sun</code></p></li>
209    /// <li>
210    /// <p><code>mon</code></p></li>
211    /// <li>
212    /// <p><code>tue</code></p></li>
213    /// <li>
214    /// <p><code>wed</code></p></li>
215    /// <li>
216    /// <p><code>thu</code></p></li>
217    /// <li>
218    /// <p><code>fri</code></p></li>
219    /// <li>
220    /// <p><code>sat</code></p></li>
221    /// </ul>
222    /// <p>Example: <code>sun:23:00-mon:01:30</code></p>
223    pub fn get_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
224        self.inner.get_maintenance_window()
225    }
226    /// <p>The SNS topic ARN to update.</p>
227    pub fn sns_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228        self.inner = self.inner.sns_topic_arn(input.into());
229        self
230    }
231    /// <p>The SNS topic ARN to update.</p>
232    pub fn set_sns_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233        self.inner = self.inner.set_sns_topic_arn(input);
234        self
235    }
236    /// <p>The SNS topic ARN to update.</p>
237    pub fn get_sns_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
238        self.inner.get_sns_topic_arn()
239    }
240    /// <p>The status of the Amazon SNS notification topic. Notifications are sent only if the status is active.</p>
241    pub fn sns_topic_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242        self.inner = self.inner.sns_topic_status(input.into());
243        self
244    }
245    /// <p>The status of the Amazon SNS notification topic. Notifications are sent only if the status is active.</p>
246    pub fn set_sns_topic_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
247        self.inner = self.inner.set_sns_topic_status(input);
248        self
249    }
250    /// <p>The status of the Amazon SNS notification topic. Notifications are sent only if the status is active.</p>
251    pub fn get_sns_topic_status(&self) -> &::std::option::Option<::std::string::String> {
252        self.inner.get_sns_topic_status()
253    }
254    /// <p>The name of the parameter group to update.</p>
255    pub fn parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256        self.inner = self.inner.parameter_group_name(input.into());
257        self
258    }
259    /// <p>The name of the parameter group to update.</p>
260    pub fn set_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
261        self.inner = self.inner.set_parameter_group_name(input);
262        self
263    }
264    /// <p>The name of the parameter group to update.</p>
265    pub fn get_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
266        self.inner.get_parameter_group_name()
267    }
268    /// <p>The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your cluster.</p>
269    pub fn snapshot_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270        self.inner = self.inner.snapshot_window(input.into());
271        self
272    }
273    /// <p>The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your cluster.</p>
274    pub fn set_snapshot_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
275        self.inner = self.inner.set_snapshot_window(input);
276        self
277    }
278    /// <p>The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your cluster.</p>
279    pub fn get_snapshot_window(&self) -> &::std::option::Option<::std::string::String> {
280        self.inner.get_snapshot_window()
281    }
282    /// <p>The number of days for which MemoryDB retains automatic cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p>
283    pub fn snapshot_retention_limit(mut self, input: i32) -> Self {
284        self.inner = self.inner.snapshot_retention_limit(input);
285        self
286    }
287    /// <p>The number of days for which MemoryDB retains automatic cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p>
288    pub fn set_snapshot_retention_limit(mut self, input: ::std::option::Option<i32>) -> Self {
289        self.inner = self.inner.set_snapshot_retention_limit(input);
290        self
291    }
292    /// <p>The number of days for which MemoryDB retains automatic cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p>
293    pub fn get_snapshot_retention_limit(&self) -> &::std::option::Option<i32> {
294        self.inner.get_snapshot_retention_limit()
295    }
296    /// <p>A valid node type that you want to scale this cluster up or down to.</p>
297    pub fn node_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
298        self.inner = self.inner.node_type(input.into());
299        self
300    }
301    /// <p>A valid node type that you want to scale this cluster up or down to.</p>
302    pub fn set_node_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
303        self.inner = self.inner.set_node_type(input);
304        self
305    }
306    /// <p>A valid node type that you want to scale this cluster up or down to.</p>
307    pub fn get_node_type(&self) -> &::std::option::Option<::std::string::String> {
308        self.inner.get_node_type()
309    }
310    /// <p>The name of the engine to be used for the cluster.</p>
311    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
312        self.inner = self.inner.engine(input.into());
313        self
314    }
315    /// <p>The name of the engine to be used for the cluster.</p>
316    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
317        self.inner = self.inner.set_engine(input);
318        self
319    }
320    /// <p>The name of the engine to be used for the cluster.</p>
321    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
322        self.inner.get_engine()
323    }
324    /// <p>The upgraded version of the engine to be run on the nodes. You can upgrade to a newer engine version, but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing cluster and create it anew with the earlier engine version.</p>
325    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
326        self.inner = self.inner.engine_version(input.into());
327        self
328    }
329    /// <p>The upgraded version of the engine to be run on the nodes. You can upgrade to a newer engine version, but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing cluster and create it anew with the earlier engine version.</p>
330    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331        self.inner = self.inner.set_engine_version(input);
332        self
333    }
334    /// <p>The upgraded version of the engine to be run on the nodes. You can upgrade to a newer engine version, but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing cluster and create it anew with the earlier engine version.</p>
335    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
336        self.inner.get_engine_version()
337    }
338    /// <p>The number of replicas that will reside in each shard.</p>
339    pub fn replica_configuration(mut self, input: crate::types::ReplicaConfigurationRequest) -> Self {
340        self.inner = self.inner.replica_configuration(input);
341        self
342    }
343    /// <p>The number of replicas that will reside in each shard.</p>
344    pub fn set_replica_configuration(mut self, input: ::std::option::Option<crate::types::ReplicaConfigurationRequest>) -> Self {
345        self.inner = self.inner.set_replica_configuration(input);
346        self
347    }
348    /// <p>The number of replicas that will reside in each shard.</p>
349    pub fn get_replica_configuration(&self) -> &::std::option::Option<crate::types::ReplicaConfigurationRequest> {
350        self.inner.get_replica_configuration()
351    }
352    /// <p>The number of shards in the cluster.</p>
353    pub fn shard_configuration(mut self, input: crate::types::ShardConfigurationRequest) -> Self {
354        self.inner = self.inner.shard_configuration(input);
355        self
356    }
357    /// <p>The number of shards in the cluster.</p>
358    pub fn set_shard_configuration(mut self, input: ::std::option::Option<crate::types::ShardConfigurationRequest>) -> Self {
359        self.inner = self.inner.set_shard_configuration(input);
360        self
361    }
362    /// <p>The number of shards in the cluster.</p>
363    pub fn get_shard_configuration(&self) -> &::std::option::Option<crate::types::ShardConfigurationRequest> {
364        self.inner.get_shard_configuration()
365    }
366    /// <p>The Access Control List that is associated with the cluster.</p>
367    pub fn acl_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
368        self.inner = self.inner.acl_name(input.into());
369        self
370    }
371    /// <p>The Access Control List that is associated with the cluster.</p>
372    pub fn set_acl_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
373        self.inner = self.inner.set_acl_name(input);
374        self
375    }
376    /// <p>The Access Control List that is associated with the cluster.</p>
377    pub fn get_acl_name(&self) -> &::std::option::Option<::std::string::String> {
378        self.inner.get_acl_name()
379    }
380    /// <p>The mechanism for discovering IP addresses for the cluster discovery protocol. Valid values are 'ipv4' or 'ipv6'. When set to 'ipv4', cluster discovery functions such as cluster slots, cluster shards, and cluster nodes will return IPv4 addresses for cluster nodes. When set to 'ipv6', the cluster discovery functions return IPv6 addresses for cluster nodes. The value must be compatible with the NetworkType parameter. If not specified, the default is 'ipv4'.</p>
381    pub fn ip_discovery(mut self, input: crate::types::IpDiscovery) -> Self {
382        self.inner = self.inner.ip_discovery(input);
383        self
384    }
385    /// <p>The mechanism for discovering IP addresses for the cluster discovery protocol. Valid values are 'ipv4' or 'ipv6'. When set to 'ipv4', cluster discovery functions such as cluster slots, cluster shards, and cluster nodes will return IPv4 addresses for cluster nodes. When set to 'ipv6', the cluster discovery functions return IPv6 addresses for cluster nodes. The value must be compatible with the NetworkType parameter. If not specified, the default is 'ipv4'.</p>
386    pub fn set_ip_discovery(mut self, input: ::std::option::Option<crate::types::IpDiscovery>) -> Self {
387        self.inner = self.inner.set_ip_discovery(input);
388        self
389    }
390    /// <p>The mechanism for discovering IP addresses for the cluster discovery protocol. Valid values are 'ipv4' or 'ipv6'. When set to 'ipv4', cluster discovery functions such as cluster slots, cluster shards, and cluster nodes will return IPv4 addresses for cluster nodes. When set to 'ipv6', the cluster discovery functions return IPv6 addresses for cluster nodes. The value must be compatible with the NetworkType parameter. If not specified, the default is 'ipv4'.</p>
391    pub fn get_ip_discovery(&self) -> &::std::option::Option<crate::types::IpDiscovery> {
392        self.inner.get_ip_discovery()
393    }
394}