aws_sdk_mgn/operation/update_launch_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_launch_configuration::_update_launch_configuration_output::UpdateLaunchConfigurationOutputBuilder;
3
4pub use crate::operation::update_launch_configuration::_update_launch_configuration_input::UpdateLaunchConfigurationInputBuilder;
5
6impl crate::operation::update_launch_configuration::builders::UpdateLaunchConfigurationInputBuilder {
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::UpdateLaunchConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_launch_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateLaunchConfiguration`.
24///
25/// <p>Updates multiple LaunchConfigurations by Source Server ID.</p><note>
26/// <p>bootMode valid values are <code>LEGACY_BIOS | UEFI</code></p>
27/// </note>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct UpdateLaunchConfigurationFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::update_launch_configuration::builders::UpdateLaunchConfigurationInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::update_launch_configuration::UpdateLaunchConfigurationOutput,
37        crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
38    > for UpdateLaunchConfigurationFluentBuilder
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::update_launch_configuration::UpdateLaunchConfigurationOutput,
46            crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl UpdateLaunchConfigurationFluentBuilder {
53    /// Creates a new `UpdateLaunchConfigurationFluentBuilder`.
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 UpdateLaunchConfiguration as a reference.
62    pub fn as_input(&self) -> &crate::operation::update_launch_configuration::builders::UpdateLaunchConfigurationInputBuilder {
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_launch_configuration::UpdateLaunchConfigurationOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
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::update_launch_configuration::UpdateLaunchConfiguration::operation_runtime_plugins(
87            self.handle.runtime_plugins.clone(),
88            &self.handle.conf,
89            self.config_override,
90        );
91        crate::operation::update_launch_configuration::UpdateLaunchConfiguration::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::update_launch_configuration::UpdateLaunchConfigurationOutput,
99        crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
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>Update Launch configuration by Source Server ID request.</p>
114    pub fn source_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.inner = self.inner.source_server_id(input.into());
116        self
117    }
118    /// <p>Update Launch configuration by Source Server ID request.</p>
119    pub fn set_source_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.inner = self.inner.set_source_server_id(input);
121        self
122    }
123    /// <p>Update Launch configuration by Source Server ID request.</p>
124    pub fn get_source_server_id(&self) -> &::std::option::Option<::std::string::String> {
125        self.inner.get_source_server_id()
126    }
127    /// <p>Update Launch configuration name request.</p>
128    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.name(input.into());
130        self
131    }
132    /// <p>Update Launch configuration name request.</p>
133    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_name(input);
135        self
136    }
137    /// <p>Update Launch configuration name request.</p>
138    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
139        self.inner.get_name()
140    }
141    /// <p>Update Launch configuration launch disposition request.</p>
142    pub fn launch_disposition(mut self, input: crate::types::LaunchDisposition) -> Self {
143        self.inner = self.inner.launch_disposition(input);
144        self
145    }
146    /// <p>Update Launch configuration launch disposition request.</p>
147    pub fn set_launch_disposition(mut self, input: ::std::option::Option<crate::types::LaunchDisposition>) -> Self {
148        self.inner = self.inner.set_launch_disposition(input);
149        self
150    }
151    /// <p>Update Launch configuration launch disposition request.</p>
152    pub fn get_launch_disposition(&self) -> &::std::option::Option<crate::types::LaunchDisposition> {
153        self.inner.get_launch_disposition()
154    }
155    /// <p>Update Launch configuration Target instance right sizing request.</p>
156    pub fn target_instance_type_right_sizing_method(mut self, input: crate::types::TargetInstanceTypeRightSizingMethod) -> Self {
157        self.inner = self.inner.target_instance_type_right_sizing_method(input);
158        self
159    }
160    /// <p>Update Launch configuration Target instance right sizing request.</p>
161    pub fn set_target_instance_type_right_sizing_method(
162        mut self,
163        input: ::std::option::Option<crate::types::TargetInstanceTypeRightSizingMethod>,
164    ) -> Self {
165        self.inner = self.inner.set_target_instance_type_right_sizing_method(input);
166        self
167    }
168    /// <p>Update Launch configuration Target instance right sizing request.</p>
169    pub fn get_target_instance_type_right_sizing_method(&self) -> &::std::option::Option<crate::types::TargetInstanceTypeRightSizingMethod> {
170        self.inner.get_target_instance_type_right_sizing_method()
171    }
172    /// <p>Update Launch configuration copy Private IP request.</p>
173    pub fn copy_private_ip(mut self, input: bool) -> Self {
174        self.inner = self.inner.copy_private_ip(input);
175        self
176    }
177    /// <p>Update Launch configuration copy Private IP request.</p>
178    pub fn set_copy_private_ip(mut self, input: ::std::option::Option<bool>) -> Self {
179        self.inner = self.inner.set_copy_private_ip(input);
180        self
181    }
182    /// <p>Update Launch configuration copy Private IP request.</p>
183    pub fn get_copy_private_ip(&self) -> &::std::option::Option<bool> {
184        self.inner.get_copy_private_ip()
185    }
186    /// <p>Update Launch configuration copy Tags request.</p>
187    pub fn copy_tags(mut self, input: bool) -> Self {
188        self.inner = self.inner.copy_tags(input);
189        self
190    }
191    /// <p>Update Launch configuration copy Tags request.</p>
192    pub fn set_copy_tags(mut self, input: ::std::option::Option<bool>) -> Self {
193        self.inner = self.inner.set_copy_tags(input);
194        self
195    }
196    /// <p>Update Launch configuration copy Tags request.</p>
197    pub fn get_copy_tags(&self) -> &::std::option::Option<bool> {
198        self.inner.get_copy_tags()
199    }
200    /// <p>Update Launch configuration licensing request.</p>
201    pub fn licensing(mut self, input: crate::types::Licensing) -> Self {
202        self.inner = self.inner.licensing(input);
203        self
204    }
205    /// <p>Update Launch configuration licensing request.</p>
206    pub fn set_licensing(mut self, input: ::std::option::Option<crate::types::Licensing>) -> Self {
207        self.inner = self.inner.set_licensing(input);
208        self
209    }
210    /// <p>Update Launch configuration licensing request.</p>
211    pub fn get_licensing(&self) -> &::std::option::Option<crate::types::Licensing> {
212        self.inner.get_licensing()
213    }
214    /// <p>Update Launch configuration boot mode request.</p>
215    pub fn boot_mode(mut self, input: crate::types::BootMode) -> Self {
216        self.inner = self.inner.boot_mode(input);
217        self
218    }
219    /// <p>Update Launch configuration boot mode request.</p>
220    pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootMode>) -> Self {
221        self.inner = self.inner.set_boot_mode(input);
222        self
223    }
224    /// <p>Update Launch configuration boot mode request.</p>
225    pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootMode> {
226        self.inner.get_boot_mode()
227    }
228    /// <p>Post Launch Actions to executed on the Test or Cutover instance.</p>
229    pub fn post_launch_actions(mut self, input: crate::types::PostLaunchActions) -> Self {
230        self.inner = self.inner.post_launch_actions(input);
231        self
232    }
233    /// <p>Post Launch Actions to executed on the Test or Cutover instance.</p>
234    pub fn set_post_launch_actions(mut self, input: ::std::option::Option<crate::types::PostLaunchActions>) -> Self {
235        self.inner = self.inner.set_post_launch_actions(input);
236        self
237    }
238    /// <p>Post Launch Actions to executed on the Test or Cutover instance.</p>
239    pub fn get_post_launch_actions(&self) -> &::std::option::Option<crate::types::PostLaunchActions> {
240        self.inner.get_post_launch_actions()
241    }
242    /// <p>Enable map auto tagging.</p>
243    pub fn enable_map_auto_tagging(mut self, input: bool) -> Self {
244        self.inner = self.inner.enable_map_auto_tagging(input);
245        self
246    }
247    /// <p>Enable map auto tagging.</p>
248    pub fn set_enable_map_auto_tagging(mut self, input: ::std::option::Option<bool>) -> Self {
249        self.inner = self.inner.set_enable_map_auto_tagging(input);
250        self
251    }
252    /// <p>Enable map auto tagging.</p>
253    pub fn get_enable_map_auto_tagging(&self) -> &::std::option::Option<bool> {
254        self.inner.get_enable_map_auto_tagging()
255    }
256    /// <p>Launch configuration map auto tagging MPE ID.</p>
257    pub fn map_auto_tagging_mpe_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
258        self.inner = self.inner.map_auto_tagging_mpe_id(input.into());
259        self
260    }
261    /// <p>Launch configuration map auto tagging MPE ID.</p>
262    pub fn set_map_auto_tagging_mpe_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
263        self.inner = self.inner.set_map_auto_tagging_mpe_id(input);
264        self
265    }
266    /// <p>Launch configuration map auto tagging MPE ID.</p>
267    pub fn get_map_auto_tagging_mpe_id(&self) -> &::std::option::Option<::std::string::String> {
268        self.inner.get_map_auto_tagging_mpe_id()
269    }
270    /// <p>Update Launch configuration Account ID.</p>
271    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
272        self.inner = self.inner.account_id(input.into());
273        self
274    }
275    /// <p>Update Launch configuration Account ID.</p>
276    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
277        self.inner = self.inner.set_account_id(input);
278        self
279    }
280    /// <p>Update Launch configuration Account ID.</p>
281    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
282        self.inner.get_account_id()
283    }
284}