aws_sdk_databasemigration/operation/modify_replication_instance/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_replication_instance::_modify_replication_instance_output::ModifyReplicationInstanceOutputBuilder;
3
4pub use crate::operation::modify_replication_instance::_modify_replication_instance_input::ModifyReplicationInstanceInputBuilder;
5
6impl crate::operation::modify_replication_instance::builders::ModifyReplicationInstanceInputBuilder {
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::modify_replication_instance::ModifyReplicationInstanceOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::modify_replication_instance::ModifyReplicationInstanceError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.modify_replication_instance();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ModifyReplicationInstance`.
24///
25/// <p>Modifies the replication instance to apply new settings. You can change one or more parameters by specifying these parameters and the new values in the request.</p>
26/// <p>Some settings are applied during the maintenance window.</p>
27/// <p></p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct ModifyReplicationInstanceFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::modify_replication_instance::builders::ModifyReplicationInstanceInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::modify_replication_instance::ModifyReplicationInstanceOutput,
37        crate::operation::modify_replication_instance::ModifyReplicationInstanceError,
38    > for ModifyReplicationInstanceFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::modify_replication_instance::ModifyReplicationInstanceOutput,
46            crate::operation::modify_replication_instance::ModifyReplicationInstanceError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl ModifyReplicationInstanceFluentBuilder {
53    /// Creates a new `ModifyReplicationInstanceFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the ModifyReplicationInstance as a reference.
62    pub fn as_input(&self) -> &crate::operation::modify_replication_instance::builders::ModifyReplicationInstanceInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::modify_replication_instance::ModifyReplicationInstanceOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::modify_replication_instance::ModifyReplicationInstanceError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins = crate::operation::modify_replication_instance::ModifyReplicationInstance::operation_runtime_plugins(
87            self.handle.runtime_plugins.clone(),
88            &self.handle.conf,
89            self.config_override,
90        );
91        crate::operation::modify_replication_instance::ModifyReplicationInstance::orchestrate(&runtime_plugins, input).await
92    }
93
94    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95    pub fn customize(
96        self,
97    ) -> crate::client::customize::CustomizableOperation<
98        crate::operation::modify_replication_instance::ModifyReplicationInstanceOutput,
99        crate::operation::modify_replication_instance::ModifyReplicationInstanceError,
100        Self,
101    > {
102        crate::client::customize::CustomizableOperation::new(self)
103    }
104    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105        self.set_config_override(::std::option::Option::Some(config_override.into()));
106        self
107    }
108
109    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110        self.config_override = config_override;
111        self
112    }
113    /// <p>The Amazon Resource Name (ARN) of the replication instance.</p>
114    pub fn replication_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.inner = self.inner.replication_instance_arn(input.into());
116        self
117    }
118    /// <p>The Amazon Resource Name (ARN) of the replication instance.</p>
119    pub fn set_replication_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.inner = self.inner.set_replication_instance_arn(input);
121        self
122    }
123    /// <p>The Amazon Resource Name (ARN) of the replication instance.</p>
124    pub fn get_replication_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
125        self.inner.get_replication_instance_arn()
126    }
127    /// <p>The amount of storage (in gigabytes) to be allocated for the replication instance.</p>
128    pub fn allocated_storage(mut self, input: i32) -> Self {
129        self.inner = self.inner.allocated_storage(input);
130        self
131    }
132    /// <p>The amount of storage (in gigabytes) to be allocated for the replication instance.</p>
133    pub fn set_allocated_storage(mut self, input: ::std::option::Option<i32>) -> Self {
134        self.inner = self.inner.set_allocated_storage(input);
135        self
136    }
137    /// <p>The amount of storage (in gigabytes) to be allocated for the replication instance.</p>
138    pub fn get_allocated_storage(&self) -> &::std::option::Option<i32> {
139        self.inner.get_allocated_storage()
140    }
141    /// <p>Indicates whether the changes should be applied immediately or during the next maintenance window.</p>
142    pub fn apply_immediately(mut self, input: bool) -> Self {
143        self.inner = self.inner.apply_immediately(input);
144        self
145    }
146    /// <p>Indicates whether the changes should be applied immediately or during the next maintenance window.</p>
147    pub fn set_apply_immediately(mut self, input: ::std::option::Option<bool>) -> Self {
148        self.inner = self.inner.set_apply_immediately(input);
149        self
150    }
151    /// <p>Indicates whether the changes should be applied immediately or during the next maintenance window.</p>
152    pub fn get_apply_immediately(&self) -> &::std::option::Option<bool> {
153        self.inner.get_apply_immediately()
154    }
155    /// <p>The compute and memory capacity of the replication instance as defined for the specified replication instance class. For example to specify the instance class dms.c4.large, set this parameter to <code>"dms.c4.large"</code>.</p>
156    /// <p>For more information on the settings and capacities for the available replication instance classes, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.html#CHAP_ReplicationInstance.InDepth"> Selecting the right DMS replication instance for your migration</a>.</p>
157    pub fn replication_instance_class(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.inner = self.inner.replication_instance_class(input.into());
159        self
160    }
161    /// <p>The compute and memory capacity of the replication instance as defined for the specified replication instance class. For example to specify the instance class dms.c4.large, set this parameter to <code>"dms.c4.large"</code>.</p>
162    /// <p>For more information on the settings and capacities for the available replication instance classes, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.html#CHAP_ReplicationInstance.InDepth"> Selecting the right DMS replication instance for your migration</a>.</p>
163    pub fn set_replication_instance_class(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.inner = self.inner.set_replication_instance_class(input);
165        self
166    }
167    /// <p>The compute and memory capacity of the replication instance as defined for the specified replication instance class. For example to specify the instance class dms.c4.large, set this parameter to <code>"dms.c4.large"</code>.</p>
168    /// <p>For more information on the settings and capacities for the available replication instance classes, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.html#CHAP_ReplicationInstance.InDepth"> Selecting the right DMS replication instance for your migration</a>.</p>
169    pub fn get_replication_instance_class(&self) -> &::std::option::Option<::std::string::String> {
170        self.inner.get_replication_instance_class()
171    }
172    ///
173    /// Appends an item to `VpcSecurityGroupIds`.
174    ///
175    /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
176    ///
177    /// <p>Specifies the VPC security group to be used with the replication instance. The VPC security group must work with the VPC containing the replication instance.</p>
178    pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.inner = self.inner.vpc_security_group_ids(input.into());
180        self
181    }
182    /// <p>Specifies the VPC security group to be used with the replication instance. The VPC security group must work with the VPC containing the replication instance.</p>
183    pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
184        self.inner = self.inner.set_vpc_security_group_ids(input);
185        self
186    }
187    /// <p>Specifies the VPC security group to be used with the replication instance. The VPC security group must work with the VPC containing the replication instance.</p>
188    pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
189        self.inner.get_vpc_security_group_ids()
190    }
191    /// <p>The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter does not result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.</p>
192    /// <p>Default: Uses existing setting</p>
193    /// <p>Format: ddd:hh24:mi-ddd:hh24:mi</p>
194    /// <p>Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun</p>
195    /// <p>Constraints: Must be at least 30 minutes</p>
196    pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197        self.inner = self.inner.preferred_maintenance_window(input.into());
198        self
199    }
200    /// <p>The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter does not result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.</p>
201    /// <p>Default: Uses existing setting</p>
202    /// <p>Format: ddd:hh24:mi-ddd:hh24:mi</p>
203    /// <p>Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun</p>
204    /// <p>Constraints: Must be at least 30 minutes</p>
205    pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206        self.inner = self.inner.set_preferred_maintenance_window(input);
207        self
208    }
209    /// <p>The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter does not result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.</p>
210    /// <p>Default: Uses existing setting</p>
211    /// <p>Format: ddd:hh24:mi-ddd:hh24:mi</p>
212    /// <p>Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun</p>
213    /// <p>Constraints: Must be at least 30 minutes</p>
214    pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
215        self.inner.get_preferred_maintenance_window()
216    }
217    /// <p>Specifies whether the replication instance is a Multi-AZ deployment. You can't set the <code>AvailabilityZone</code> parameter if the Multi-AZ parameter is set to <code>true</code>.</p>
218    pub fn multi_az(mut self, input: bool) -> Self {
219        self.inner = self.inner.multi_az(input);
220        self
221    }
222    /// <p>Specifies whether the replication instance is a Multi-AZ deployment. You can't set the <code>AvailabilityZone</code> parameter if the Multi-AZ parameter is set to <code>true</code>.</p>
223    pub fn set_multi_az(mut self, input: ::std::option::Option<bool>) -> Self {
224        self.inner = self.inner.set_multi_az(input);
225        self
226    }
227    /// <p>Specifies whether the replication instance is a Multi-AZ deployment. You can't set the <code>AvailabilityZone</code> parameter if the Multi-AZ parameter is set to <code>true</code>.</p>
228    pub fn get_multi_az(&self) -> &::std::option::Option<bool> {
229        self.inner.get_multi_az()
230    }
231    /// <p>The engine version number of the replication instance.</p>
232    /// <p>When modifying a major engine version of an instance, also set <code>AllowMajorVersionUpgrade</code> to <code>true</code>.</p>
233    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234        self.inner = self.inner.engine_version(input.into());
235        self
236    }
237    /// <p>The engine version number of the replication instance.</p>
238    /// <p>When modifying a major engine version of an instance, also set <code>AllowMajorVersionUpgrade</code> to <code>true</code>.</p>
239    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
240        self.inner = self.inner.set_engine_version(input);
241        self
242    }
243    /// <p>The engine version number of the replication instance.</p>
244    /// <p>When modifying a major engine version of an instance, also set <code>AllowMajorVersionUpgrade</code> to <code>true</code>.</p>
245    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
246        self.inner.get_engine_version()
247    }
248    /// <p>Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage, and the change is asynchronously applied as soon as possible.</p>
249    /// <p>This parameter must be set to <code>true</code> when specifying a value for the <code>EngineVersion</code> parameter that is a different major version than the replication instance's current version.</p>
250    pub fn allow_major_version_upgrade(mut self, input: bool) -> Self {
251        self.inner = self.inner.allow_major_version_upgrade(input);
252        self
253    }
254    /// <p>Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage, and the change is asynchronously applied as soon as possible.</p>
255    /// <p>This parameter must be set to <code>true</code> when specifying a value for the <code>EngineVersion</code> parameter that is a different major version than the replication instance's current version.</p>
256    pub fn set_allow_major_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
257        self.inner = self.inner.set_allow_major_version_upgrade(input);
258        self
259    }
260    /// <p>Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage, and the change is asynchronously applied as soon as possible.</p>
261    /// <p>This parameter must be set to <code>true</code> when specifying a value for the <code>EngineVersion</code> parameter that is a different major version than the replication instance's current version.</p>
262    pub fn get_allow_major_version_upgrade(&self) -> &::std::option::Option<bool> {
263        self.inner.get_allow_major_version_upgrade()
264    }
265    /// <p>A value that indicates that minor version upgrades are applied automatically to the replication instance during the maintenance window. Changing this parameter doesn't result in an outage, except in the case described following. The change is asynchronously applied as soon as possible.</p>
266    /// <p>An outage does result if these factors apply:</p>
267    /// <ul>
268    /// <li>
269    /// <p>This parameter is set to <code>true</code> during the maintenance window.</p></li>
270    /// <li>
271    /// <p>A newer minor version is available.</p></li>
272    /// <li>
273    /// <p>DMS has enabled automatic patching for the given engine version.</p></li>
274    /// </ul>
275    pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
276        self.inner = self.inner.auto_minor_version_upgrade(input);
277        self
278    }
279    /// <p>A value that indicates that minor version upgrades are applied automatically to the replication instance during the maintenance window. Changing this parameter doesn't result in an outage, except in the case described following. The change is asynchronously applied as soon as possible.</p>
280    /// <p>An outage does result if these factors apply:</p>
281    /// <ul>
282    /// <li>
283    /// <p>This parameter is set to <code>true</code> during the maintenance window.</p></li>
284    /// <li>
285    /// <p>A newer minor version is available.</p></li>
286    /// <li>
287    /// <p>DMS has enabled automatic patching for the given engine version.</p></li>
288    /// </ul>
289    pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
290        self.inner = self.inner.set_auto_minor_version_upgrade(input);
291        self
292    }
293    /// <p>A value that indicates that minor version upgrades are applied automatically to the replication instance during the maintenance window. Changing this parameter doesn't result in an outage, except in the case described following. The change is asynchronously applied as soon as possible.</p>
294    /// <p>An outage does result if these factors apply:</p>
295    /// <ul>
296    /// <li>
297    /// <p>This parameter is set to <code>true</code> during the maintenance window.</p></li>
298    /// <li>
299    /// <p>A newer minor version is available.</p></li>
300    /// <li>
301    /// <p>DMS has enabled automatic patching for the given engine version.</p></li>
302    /// </ul>
303    pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
304        self.inner.get_auto_minor_version_upgrade()
305    }
306    /// <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
307    pub fn replication_instance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
308        self.inner = self.inner.replication_instance_identifier(input.into());
309        self
310    }
311    /// <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
312    pub fn set_replication_instance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313        self.inner = self.inner.set_replication_instance_identifier(input);
314        self
315    }
316    /// <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
317    pub fn get_replication_instance_identifier(&self) -> &::std::option::Option<::std::string::String> {
318        self.inner.get_replication_instance_identifier()
319    }
320    /// <p>The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not yet supported.</p>
321    pub fn network_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322        self.inner = self.inner.network_type(input.into());
323        self
324    }
325    /// <p>The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not yet supported.</p>
326    pub fn set_network_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327        self.inner = self.inner.set_network_type(input);
328        self
329    }
330    /// <p>The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not yet supported.</p>
331    pub fn get_network_type(&self) -> &::std::option::Option<::std::string::String> {
332        self.inner.get_network_type()
333    }
334    /// <p>Specifies the settings required for kerberos authentication when modifying a replication instance.</p>
335    pub fn kerberos_authentication_settings(mut self, input: crate::types::KerberosAuthenticationSettings) -> Self {
336        self.inner = self.inner.kerberos_authentication_settings(input);
337        self
338    }
339    /// <p>Specifies the settings required for kerberos authentication when modifying a replication instance.</p>
340    pub fn set_kerberos_authentication_settings(mut self, input: ::std::option::Option<crate::types::KerberosAuthenticationSettings>) -> Self {
341        self.inner = self.inner.set_kerberos_authentication_settings(input);
342        self
343    }
344    /// <p>Specifies the settings required for kerberos authentication when modifying a replication instance.</p>
345    pub fn get_kerberos_authentication_settings(&self) -> &::std::option::Option<crate::types::KerberosAuthenticationSettings> {
346        self.inner.get_kerberos_authentication_settings()
347    }
348}