aws_sdk_mgn/operation/update_launch_configuration_template/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_launch_configuration_template::_update_launch_configuration_template_output::UpdateLaunchConfigurationTemplateOutputBuilder;
3
4pub use crate::operation::update_launch_configuration_template::_update_launch_configuration_template_input::UpdateLaunchConfigurationTemplateInputBuilder;
5
6impl crate::operation::update_launch_configuration_template::builders::UpdateLaunchConfigurationTemplateInputBuilder {
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_launch_configuration_template::UpdateLaunchConfigurationTemplateOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_launch_configuration_template::UpdateLaunchConfigurationTemplateError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_launch_configuration_template();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateLaunchConfigurationTemplate`.
24///
25/// <p>Updates an existing Launch Configuration Template by ID.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateLaunchConfigurationTemplateFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_launch_configuration_template::builders::UpdateLaunchConfigurationTemplateInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_launch_configuration_template::UpdateLaunchConfigurationTemplateOutput,
35        crate::operation::update_launch_configuration_template::UpdateLaunchConfigurationTemplateError,
36    > for UpdateLaunchConfigurationTemplateFluentBuilder
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_launch_configuration_template::UpdateLaunchConfigurationTemplateOutput,
44            crate::operation::update_launch_configuration_template::UpdateLaunchConfigurationTemplateError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateLaunchConfigurationTemplateFluentBuilder {
51    /// Creates a new `UpdateLaunchConfigurationTemplateFluentBuilder`.
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 UpdateLaunchConfigurationTemplate as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_launch_configuration_template::builders::UpdateLaunchConfigurationTemplateInputBuilder {
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_launch_configuration_template::UpdateLaunchConfigurationTemplateOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_launch_configuration_template::UpdateLaunchConfigurationTemplateError,
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_launch_configuration_template::UpdateLaunchConfigurationTemplate::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_launch_configuration_template::UpdateLaunchConfigurationTemplate::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_launch_configuration_template::UpdateLaunchConfigurationTemplateOutput,
97        crate::operation::update_launch_configuration_template::UpdateLaunchConfigurationTemplateError,
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>Launch Configuration Template ID.</p>
112    pub fn launch_configuration_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.launch_configuration_template_id(input.into());
114        self
115    }
116    /// <p>Launch Configuration Template ID.</p>
117    pub fn set_launch_configuration_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_launch_configuration_template_id(input);
119        self
120    }
121    /// <p>Launch Configuration Template ID.</p>
122    pub fn get_launch_configuration_template_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_launch_configuration_template_id()
124    }
125    /// <p>Post Launch Action to execute on the Test or Cutover instance.</p>
126    pub fn post_launch_actions(mut self, input: crate::types::PostLaunchActions) -> Self {
127        self.inner = self.inner.post_launch_actions(input);
128        self
129    }
130    /// <p>Post Launch Action to execute on the Test or Cutover instance.</p>
131    pub fn set_post_launch_actions(mut self, input: ::std::option::Option<crate::types::PostLaunchActions>) -> Self {
132        self.inner = self.inner.set_post_launch_actions(input);
133        self
134    }
135    /// <p>Post Launch Action to execute on the Test or Cutover instance.</p>
136    pub fn get_post_launch_actions(&self) -> &::std::option::Option<crate::types::PostLaunchActions> {
137        self.inner.get_post_launch_actions()
138    }
139    /// <p>Enable map auto tagging.</p>
140    pub fn enable_map_auto_tagging(mut self, input: bool) -> Self {
141        self.inner = self.inner.enable_map_auto_tagging(input);
142        self
143    }
144    /// <p>Enable map auto tagging.</p>
145    pub fn set_enable_map_auto_tagging(mut self, input: ::std::option::Option<bool>) -> Self {
146        self.inner = self.inner.set_enable_map_auto_tagging(input);
147        self
148    }
149    /// <p>Enable map auto tagging.</p>
150    pub fn get_enable_map_auto_tagging(&self) -> &::std::option::Option<bool> {
151        self.inner.get_enable_map_auto_tagging()
152    }
153    /// <p>Launch configuration template map auto tagging MPE ID.</p>
154    pub fn map_auto_tagging_mpe_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.map_auto_tagging_mpe_id(input.into());
156        self
157    }
158    /// <p>Launch configuration template map auto tagging MPE ID.</p>
159    pub fn set_map_auto_tagging_mpe_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_map_auto_tagging_mpe_id(input);
161        self
162    }
163    /// <p>Launch configuration template map auto tagging MPE ID.</p>
164    pub fn get_map_auto_tagging_mpe_id(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_map_auto_tagging_mpe_id()
166    }
167    /// <p>Launch disposition.</p>
168    pub fn launch_disposition(mut self, input: crate::types::LaunchDisposition) -> Self {
169        self.inner = self.inner.launch_disposition(input);
170        self
171    }
172    /// <p>Launch disposition.</p>
173    pub fn set_launch_disposition(mut self, input: ::std::option::Option<crate::types::LaunchDisposition>) -> Self {
174        self.inner = self.inner.set_launch_disposition(input);
175        self
176    }
177    /// <p>Launch disposition.</p>
178    pub fn get_launch_disposition(&self) -> &::std::option::Option<crate::types::LaunchDisposition> {
179        self.inner.get_launch_disposition()
180    }
181    /// <p>Target instance type right-sizing method.</p>
182    pub fn target_instance_type_right_sizing_method(mut self, input: crate::types::TargetInstanceTypeRightSizingMethod) -> Self {
183        self.inner = self.inner.target_instance_type_right_sizing_method(input);
184        self
185    }
186    /// <p>Target instance type right-sizing method.</p>
187    pub fn set_target_instance_type_right_sizing_method(
188        mut self,
189        input: ::std::option::Option<crate::types::TargetInstanceTypeRightSizingMethod>,
190    ) -> Self {
191        self.inner = self.inner.set_target_instance_type_right_sizing_method(input);
192        self
193    }
194    /// <p>Target instance type right-sizing method.</p>
195    pub fn get_target_instance_type_right_sizing_method(&self) -> &::std::option::Option<crate::types::TargetInstanceTypeRightSizingMethod> {
196        self.inner.get_target_instance_type_right_sizing_method()
197    }
198    /// <p>Copy private Ip.</p>
199    pub fn copy_private_ip(mut self, input: bool) -> Self {
200        self.inner = self.inner.copy_private_ip(input);
201        self
202    }
203    /// <p>Copy private Ip.</p>
204    pub fn set_copy_private_ip(mut self, input: ::std::option::Option<bool>) -> Self {
205        self.inner = self.inner.set_copy_private_ip(input);
206        self
207    }
208    /// <p>Copy private Ip.</p>
209    pub fn get_copy_private_ip(&self) -> &::std::option::Option<bool> {
210        self.inner.get_copy_private_ip()
211    }
212    /// <p>Associate public Ip address.</p>
213    pub fn associate_public_ip_address(mut self, input: bool) -> Self {
214        self.inner = self.inner.associate_public_ip_address(input);
215        self
216    }
217    /// <p>Associate public Ip address.</p>
218    pub fn set_associate_public_ip_address(mut self, input: ::std::option::Option<bool>) -> Self {
219        self.inner = self.inner.set_associate_public_ip_address(input);
220        self
221    }
222    /// <p>Associate public Ip address.</p>
223    pub fn get_associate_public_ip_address(&self) -> &::std::option::Option<bool> {
224        self.inner.get_associate_public_ip_address()
225    }
226    /// <p>Copy tags.</p>
227    pub fn copy_tags(mut self, input: bool) -> Self {
228        self.inner = self.inner.copy_tags(input);
229        self
230    }
231    /// <p>Copy tags.</p>
232    pub fn set_copy_tags(mut self, input: ::std::option::Option<bool>) -> Self {
233        self.inner = self.inner.set_copy_tags(input);
234        self
235    }
236    /// <p>Copy tags.</p>
237    pub fn get_copy_tags(&self) -> &::std::option::Option<bool> {
238        self.inner.get_copy_tags()
239    }
240    /// <p>Configure Licensing.</p>
241    pub fn licensing(mut self, input: crate::types::Licensing) -> Self {
242        self.inner = self.inner.licensing(input);
243        self
244    }
245    /// <p>Configure Licensing.</p>
246    pub fn set_licensing(mut self, input: ::std::option::Option<crate::types::Licensing>) -> Self {
247        self.inner = self.inner.set_licensing(input);
248        self
249    }
250    /// <p>Configure Licensing.</p>
251    pub fn get_licensing(&self) -> &::std::option::Option<crate::types::Licensing> {
252        self.inner.get_licensing()
253    }
254    /// <p>Launch configuration template boot mode.</p>
255    pub fn boot_mode(mut self, input: crate::types::BootMode) -> Self {
256        self.inner = self.inner.boot_mode(input);
257        self
258    }
259    /// <p>Launch configuration template boot mode.</p>
260    pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootMode>) -> Self {
261        self.inner = self.inner.set_boot_mode(input);
262        self
263    }
264    /// <p>Launch configuration template boot mode.</p>
265    pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootMode> {
266        self.inner.get_boot_mode()
267    }
268    /// <p>Small volume maximum size.</p>
269    pub fn small_volume_max_size(mut self, input: i64) -> Self {
270        self.inner = self.inner.small_volume_max_size(input);
271        self
272    }
273    /// <p>Small volume maximum size.</p>
274    pub fn set_small_volume_max_size(mut self, input: ::std::option::Option<i64>) -> Self {
275        self.inner = self.inner.set_small_volume_max_size(input);
276        self
277    }
278    /// <p>Small volume maximum size.</p>
279    pub fn get_small_volume_max_size(&self) -> &::std::option::Option<i64> {
280        self.inner.get_small_volume_max_size()
281    }
282    /// <p>Small volume config.</p>
283    pub fn small_volume_conf(mut self, input: crate::types::LaunchTemplateDiskConf) -> Self {
284        self.inner = self.inner.small_volume_conf(input);
285        self
286    }
287    /// <p>Small volume config.</p>
288    pub fn set_small_volume_conf(mut self, input: ::std::option::Option<crate::types::LaunchTemplateDiskConf>) -> Self {
289        self.inner = self.inner.set_small_volume_conf(input);
290        self
291    }
292    /// <p>Small volume config.</p>
293    pub fn get_small_volume_conf(&self) -> &::std::option::Option<crate::types::LaunchTemplateDiskConf> {
294        self.inner.get_small_volume_conf()
295    }
296    /// <p>Large volume config.</p>
297    pub fn large_volume_conf(mut self, input: crate::types::LaunchTemplateDiskConf) -> Self {
298        self.inner = self.inner.large_volume_conf(input);
299        self
300    }
301    /// <p>Large volume config.</p>
302    pub fn set_large_volume_conf(mut self, input: ::std::option::Option<crate::types::LaunchTemplateDiskConf>) -> Self {
303        self.inner = self.inner.set_large_volume_conf(input);
304        self
305    }
306    /// <p>Large volume config.</p>
307    pub fn get_large_volume_conf(&self) -> &::std::option::Option<crate::types::LaunchTemplateDiskConf> {
308        self.inner.get_large_volume_conf()
309    }
310}