aws_sdk_mgn/operation/create_launch_configuration_template/
builders.rs

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