aws_sdk_drs/operation/update_replication_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_replication_configuration::_update_replication_configuration_output::UpdateReplicationConfigurationOutputBuilder;
3
4pub use crate::operation::update_replication_configuration::_update_replication_configuration_input::UpdateReplicationConfigurationInputBuilder;
5
6impl crate::operation::update_replication_configuration::builders::UpdateReplicationConfigurationInputBuilder {
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_replication_configuration::UpdateReplicationConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_replication_configuration::UpdateReplicationConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_replication_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateReplicationConfiguration`.
24///
25/// <p>Allows you to update a ReplicationConfiguration by Source Server ID.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateReplicationConfigurationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_replication_configuration::builders::UpdateReplicationConfigurationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_replication_configuration::UpdateReplicationConfigurationOutput,
35        crate::operation::update_replication_configuration::UpdateReplicationConfigurationError,
36    > for UpdateReplicationConfigurationFluentBuilder
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_replication_configuration::UpdateReplicationConfigurationOutput,
44            crate::operation::update_replication_configuration::UpdateReplicationConfigurationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateReplicationConfigurationFluentBuilder {
51    /// Creates a new `UpdateReplicationConfigurationFluentBuilder`.
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 UpdateReplicationConfiguration as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_replication_configuration::builders::UpdateReplicationConfigurationInputBuilder {
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_replication_configuration::UpdateReplicationConfigurationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_replication_configuration::UpdateReplicationConfigurationError,
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_replication_configuration::UpdateReplicationConfiguration::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_replication_configuration::UpdateReplicationConfiguration::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_replication_configuration::UpdateReplicationConfigurationOutput,
97        crate::operation::update_replication_configuration::UpdateReplicationConfigurationError,
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 ID of the Source Server for this Replication Configuration.</p>
112    pub fn source_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.source_server_id(input.into());
114        self
115    }
116    /// <p>The ID of the Source Server for this Replication Configuration.</p>
117    pub fn set_source_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_source_server_id(input);
119        self
120    }
121    /// <p>The ID of the Source Server for this Replication Configuration.</p>
122    pub fn get_source_server_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_source_server_id()
124    }
125    /// <p>The name of the Replication Configuration.</p>
126    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.name(input.into());
128        self
129    }
130    /// <p>The name of the Replication Configuration.</p>
131    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_name(input);
133        self
134    }
135    /// <p>The name of the Replication Configuration.</p>
136    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_name()
138    }
139    /// <p>The subnet to be used by the replication staging area.</p>
140    pub fn staging_area_subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.staging_area_subnet_id(input.into());
142        self
143    }
144    /// <p>The subnet to be used by the replication staging area.</p>
145    pub fn set_staging_area_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_staging_area_subnet_id(input);
147        self
148    }
149    /// <p>The subnet to be used by the replication staging area.</p>
150    pub fn get_staging_area_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_staging_area_subnet_id()
152    }
153    /// <p>Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.</p>
154    pub fn associate_default_security_group(mut self, input: bool) -> Self {
155        self.inner = self.inner.associate_default_security_group(input);
156        self
157    }
158    /// <p>Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.</p>
159    pub fn set_associate_default_security_group(mut self, input: ::std::option::Option<bool>) -> Self {
160        self.inner = self.inner.set_associate_default_security_group(input);
161        self
162    }
163    /// <p>Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.</p>
164    pub fn get_associate_default_security_group(&self) -> &::std::option::Option<bool> {
165        self.inner.get_associate_default_security_group()
166    }
167    ///
168    /// Appends an item to `replicationServersSecurityGroupsIDs`.
169    ///
170    /// To override the contents of this collection use [`set_replication_servers_security_groups_ids`](Self::set_replication_servers_security_groups_ids).
171    ///
172    /// <p>The security group IDs that will be used by the replication server.</p>
173    pub fn replication_servers_security_groups_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.replication_servers_security_groups_ids(input.into());
175        self
176    }
177    /// <p>The security group IDs that will be used by the replication server.</p>
178    pub fn set_replication_servers_security_groups_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
179        self.inner = self.inner.set_replication_servers_security_groups_ids(input);
180        self
181    }
182    /// <p>The security group IDs that will be used by the replication server.</p>
183    pub fn get_replication_servers_security_groups_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
184        self.inner.get_replication_servers_security_groups_ids()
185    }
186    /// <p>The instance type to be used for the replication server.</p>
187    pub fn replication_server_instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.inner = self.inner.replication_server_instance_type(input.into());
189        self
190    }
191    /// <p>The instance type to be used for the replication server.</p>
192    pub fn set_replication_server_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.inner = self.inner.set_replication_server_instance_type(input);
194        self
195    }
196    /// <p>The instance type to be used for the replication server.</p>
197    pub fn get_replication_server_instance_type(&self) -> &::std::option::Option<::std::string::String> {
198        self.inner.get_replication_server_instance_type()
199    }
200    /// <p>Whether to use a dedicated Replication Server in the replication staging area.</p>
201    pub fn use_dedicated_replication_server(mut self, input: bool) -> Self {
202        self.inner = self.inner.use_dedicated_replication_server(input);
203        self
204    }
205    /// <p>Whether to use a dedicated Replication Server in the replication staging area.</p>
206    pub fn set_use_dedicated_replication_server(mut self, input: ::std::option::Option<bool>) -> Self {
207        self.inner = self.inner.set_use_dedicated_replication_server(input);
208        self
209    }
210    /// <p>Whether to use a dedicated Replication Server in the replication staging area.</p>
211    pub fn get_use_dedicated_replication_server(&self) -> &::std::option::Option<bool> {
212        self.inner.get_use_dedicated_replication_server()
213    }
214    /// <p>The Staging Disk EBS volume type to be used during replication.</p>
215    pub fn default_large_staging_disk_type(mut self, input: crate::types::ReplicationConfigurationDefaultLargeStagingDiskType) -> Self {
216        self.inner = self.inner.default_large_staging_disk_type(input);
217        self
218    }
219    /// <p>The Staging Disk EBS volume type to be used during replication.</p>
220    pub fn set_default_large_staging_disk_type(
221        mut self,
222        input: ::std::option::Option<crate::types::ReplicationConfigurationDefaultLargeStagingDiskType>,
223    ) -> Self {
224        self.inner = self.inner.set_default_large_staging_disk_type(input);
225        self
226    }
227    /// <p>The Staging Disk EBS volume type to be used during replication.</p>
228    pub fn get_default_large_staging_disk_type(&self) -> &::std::option::Option<crate::types::ReplicationConfigurationDefaultLargeStagingDiskType> {
229        self.inner.get_default_large_staging_disk_type()
230    }
231    ///
232    /// Appends an item to `replicatedDisks`.
233    ///
234    /// To override the contents of this collection use [`set_replicated_disks`](Self::set_replicated_disks).
235    ///
236    /// <p>The configuration of the disks of the Source Server to be replicated.</p>
237    pub fn replicated_disks(mut self, input: crate::types::ReplicationConfigurationReplicatedDisk) -> Self {
238        self.inner = self.inner.replicated_disks(input);
239        self
240    }
241    /// <p>The configuration of the disks of the Source Server to be replicated.</p>
242    pub fn set_replicated_disks(
243        mut self,
244        input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationConfigurationReplicatedDisk>>,
245    ) -> Self {
246        self.inner = self.inner.set_replicated_disks(input);
247        self
248    }
249    /// <p>The configuration of the disks of the Source Server to be replicated.</p>
250    pub fn get_replicated_disks(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicationConfigurationReplicatedDisk>> {
251        self.inner.get_replicated_disks()
252    }
253    /// <p>The type of EBS encryption to be used during replication.</p>
254    pub fn ebs_encryption(mut self, input: crate::types::ReplicationConfigurationEbsEncryption) -> Self {
255        self.inner = self.inner.ebs_encryption(input);
256        self
257    }
258    /// <p>The type of EBS encryption to be used during replication.</p>
259    pub fn set_ebs_encryption(mut self, input: ::std::option::Option<crate::types::ReplicationConfigurationEbsEncryption>) -> Self {
260        self.inner = self.inner.set_ebs_encryption(input);
261        self
262    }
263    /// <p>The type of EBS encryption to be used during replication.</p>
264    pub fn get_ebs_encryption(&self) -> &::std::option::Option<crate::types::ReplicationConfigurationEbsEncryption> {
265        self.inner.get_ebs_encryption()
266    }
267    /// <p>The ARN of the EBS encryption key to be used during replication.</p>
268    pub fn ebs_encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
269        self.inner = self.inner.ebs_encryption_key_arn(input.into());
270        self
271    }
272    /// <p>The ARN of the EBS encryption key to be used during replication.</p>
273    pub fn set_ebs_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
274        self.inner = self.inner.set_ebs_encryption_key_arn(input);
275        self
276    }
277    /// <p>The ARN of the EBS encryption key to be used during replication.</p>
278    pub fn get_ebs_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
279        self.inner.get_ebs_encryption_key_arn()
280    }
281    /// <p>Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.</p>
282    pub fn bandwidth_throttling(mut self, input: i64) -> Self {
283        self.inner = self.inner.bandwidth_throttling(input);
284        self
285    }
286    /// <p>Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.</p>
287    pub fn set_bandwidth_throttling(mut self, input: ::std::option::Option<i64>) -> Self {
288        self.inner = self.inner.set_bandwidth_throttling(input);
289        self
290    }
291    /// <p>Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.</p>
292    pub fn get_bandwidth_throttling(&self) -> &::std::option::Option<i64> {
293        self.inner.get_bandwidth_throttling()
294    }
295    /// <p>The data plane routing mechanism that will be used for replication.</p>
296    pub fn data_plane_routing(mut self, input: crate::types::ReplicationConfigurationDataPlaneRouting) -> Self {
297        self.inner = self.inner.data_plane_routing(input);
298        self
299    }
300    /// <p>The data plane routing mechanism that will be used for replication.</p>
301    pub fn set_data_plane_routing(mut self, input: ::std::option::Option<crate::types::ReplicationConfigurationDataPlaneRouting>) -> Self {
302        self.inner = self.inner.set_data_plane_routing(input);
303        self
304    }
305    /// <p>The data plane routing mechanism that will be used for replication.</p>
306    pub fn get_data_plane_routing(&self) -> &::std::option::Option<crate::types::ReplicationConfigurationDataPlaneRouting> {
307        self.inner.get_data_plane_routing()
308    }
309    /// <p>Whether to create a Public IP for the Recovery Instance by default.</p>
310    pub fn create_public_ip(mut self, input: bool) -> Self {
311        self.inner = self.inner.create_public_ip(input);
312        self
313    }
314    /// <p>Whether to create a Public IP for the Recovery Instance by default.</p>
315    pub fn set_create_public_ip(mut self, input: ::std::option::Option<bool>) -> Self {
316        self.inner = self.inner.set_create_public_ip(input);
317        self
318    }
319    /// <p>Whether to create a Public IP for the Recovery Instance by default.</p>
320    pub fn get_create_public_ip(&self) -> &::std::option::Option<bool> {
321        self.inner.get_create_public_ip()
322    }
323    ///
324    /// Adds a key-value pair to `stagingAreaTags`.
325    ///
326    /// To override the contents of this collection use [`set_staging_area_tags`](Self::set_staging_area_tags).
327    ///
328    /// <p>A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.</p>
329    pub fn staging_area_tags(
330        mut self,
331        k: impl ::std::convert::Into<::std::string::String>,
332        v: impl ::std::convert::Into<::std::string::String>,
333    ) -> Self {
334        self.inner = self.inner.staging_area_tags(k.into(), v.into());
335        self
336    }
337    /// <p>A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.</p>
338    pub fn set_staging_area_tags(
339        mut self,
340        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
341    ) -> Self {
342        self.inner = self.inner.set_staging_area_tags(input);
343        self
344    }
345    /// <p>A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.</p>
346    pub fn get_staging_area_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
347        self.inner.get_staging_area_tags()
348    }
349    ///
350    /// Appends an item to `pitPolicy`.
351    ///
352    /// To override the contents of this collection use [`set_pit_policy`](Self::set_pit_policy).
353    ///
354    /// <p>The Point in time (PIT) policy to manage snapshots taken during replication.</p>
355    pub fn pit_policy(mut self, input: crate::types::PitPolicyRule) -> Self {
356        self.inner = self.inner.pit_policy(input);
357        self
358    }
359    /// <p>The Point in time (PIT) policy to manage snapshots taken during replication.</p>
360    pub fn set_pit_policy(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PitPolicyRule>>) -> Self {
361        self.inner = self.inner.set_pit_policy(input);
362        self
363    }
364    /// <p>The Point in time (PIT) policy to manage snapshots taken during replication.</p>
365    pub fn get_pit_policy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PitPolicyRule>> {
366        self.inner.get_pit_policy()
367    }
368    /// <p>Whether to allow the AWS replication agent to automatically replicate newly added disks.</p>
369    pub fn auto_replicate_new_disks(mut self, input: bool) -> Self {
370        self.inner = self.inner.auto_replicate_new_disks(input);
371        self
372    }
373    /// <p>Whether to allow the AWS replication agent to automatically replicate newly added disks.</p>
374    pub fn set_auto_replicate_new_disks(mut self, input: ::std::option::Option<bool>) -> Self {
375        self.inner = self.inner.set_auto_replicate_new_disks(input);
376        self
377    }
378    /// <p>Whether to allow the AWS replication agent to automatically replicate newly added disks.</p>
379    pub fn get_auto_replicate_new_disks(&self) -> &::std::option::Option<bool> {
380        self.inner.get_auto_replicate_new_disks()
381    }
382}