aws_sdk_drs/operation/update_replication_configuration_template/
builders.rs

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