aws_sdk_elasticbeanstalk/operation/update_configuration_template/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_configuration_template::_update_configuration_template_output::UpdateConfigurationTemplateOutputBuilder;
3
4pub use crate::operation::update_configuration_template::_update_configuration_template_input::UpdateConfigurationTemplateInputBuilder;
5
6impl crate::operation::update_configuration_template::builders::UpdateConfigurationTemplateInputBuilder {
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_configuration_template::UpdateConfigurationTemplateOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_configuration_template::UpdateConfigurationTemplateError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_configuration_template();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateConfigurationTemplate`.
24///
25/// <p>Updates the specified configuration template to have the specified properties or configuration option values.</p><note>
26/// <p>If a property (for example, <code>ApplicationName</code>) is not provided, its value remains unchanged. To clear such properties, specify an empty string.</p>
27/// </note>
28/// <p>Related Topics</p>
29/// <ul>
30/// <li>
31/// <p><code>DescribeConfigurationOptions</code></p></li>
32/// </ul>
33#[derive(::std::clone::Clone, ::std::fmt::Debug)]
34pub struct UpdateConfigurationTemplateFluentBuilder {
35    handle: ::std::sync::Arc<crate::client::Handle>,
36    inner: crate::operation::update_configuration_template::builders::UpdateConfigurationTemplateInputBuilder,
37    config_override: ::std::option::Option<crate::config::Builder>,
38}
39impl
40    crate::client::customize::internal::CustomizableSend<
41        crate::operation::update_configuration_template::UpdateConfigurationTemplateOutput,
42        crate::operation::update_configuration_template::UpdateConfigurationTemplateError,
43    > for UpdateConfigurationTemplateFluentBuilder
44{
45    fn send(
46        self,
47        config_override: crate::config::Builder,
48    ) -> crate::client::customize::internal::BoxFuture<
49        crate::client::customize::internal::SendResult<
50            crate::operation::update_configuration_template::UpdateConfigurationTemplateOutput,
51            crate::operation::update_configuration_template::UpdateConfigurationTemplateError,
52        >,
53    > {
54        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55    }
56}
57impl UpdateConfigurationTemplateFluentBuilder {
58    /// Creates a new `UpdateConfigurationTemplateFluentBuilder`.
59    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60        Self {
61            handle,
62            inner: ::std::default::Default::default(),
63            config_override: ::std::option::Option::None,
64        }
65    }
66    /// Access the UpdateConfigurationTemplate as a reference.
67    pub fn as_input(&self) -> &crate::operation::update_configuration_template::builders::UpdateConfigurationTemplateInputBuilder {
68        &self.inner
69    }
70    /// Sends the request and returns the response.
71    ///
72    /// If an error occurs, an `SdkError` will be returned with additional details that
73    /// can be matched against.
74    ///
75    /// By default, any retryable failures will be retried twice. Retry behavior
76    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
77    /// set when configuring the client.
78    pub async fn send(
79        self,
80    ) -> ::std::result::Result<
81        crate::operation::update_configuration_template::UpdateConfigurationTemplateOutput,
82        ::aws_smithy_runtime_api::client::result::SdkError<
83            crate::operation::update_configuration_template::UpdateConfigurationTemplateError,
84            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
85        >,
86    > {
87        let input = self
88            .inner
89            .build()
90            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
91        let runtime_plugins = crate::operation::update_configuration_template::UpdateConfigurationTemplate::operation_runtime_plugins(
92            self.handle.runtime_plugins.clone(),
93            &self.handle.conf,
94            self.config_override,
95        );
96        crate::operation::update_configuration_template::UpdateConfigurationTemplate::orchestrate(&runtime_plugins, input).await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::update_configuration_template::UpdateConfigurationTemplateOutput,
104        crate::operation::update_configuration_template::UpdateConfigurationTemplateError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// <p>The name of the application associated with the configuration template to update.</p>
119    /// <p>If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
120    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.inner = self.inner.application_name(input.into());
122        self
123    }
124    /// <p>The name of the application associated with the configuration template to update.</p>
125    /// <p>If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
126    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.inner = self.inner.set_application_name(input);
128        self
129    }
130    /// <p>The name of the application associated with the configuration template to update.</p>
131    /// <p>If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
132    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
133        self.inner.get_application_name()
134    }
135    /// <p>The name of the configuration template to update.</p>
136    /// <p>If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
137    pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.inner = self.inner.template_name(input.into());
139        self
140    }
141    /// <p>The name of the configuration template to update.</p>
142    /// <p>If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
143    pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.inner = self.inner.set_template_name(input);
145        self
146    }
147    /// <p>The name of the configuration template to update.</p>
148    /// <p>If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.</p>
149    pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
150        self.inner.get_template_name()
151    }
152    /// <p>A new description for the configuration.</p>
153    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.inner = self.inner.description(input.into());
155        self
156    }
157    /// <p>A new description for the configuration.</p>
158    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.inner = self.inner.set_description(input);
160        self
161    }
162    /// <p>A new description for the configuration.</p>
163    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
164        self.inner.get_description()
165    }
166    ///
167    /// Appends an item to `OptionSettings`.
168    ///
169    /// To override the contents of this collection use [`set_option_settings`](Self::set_option_settings).
170    ///
171    /// <p>A list of configuration option settings to update with the new specified option value.</p>
172    pub fn option_settings(mut self, input: crate::types::ConfigurationOptionSetting) -> Self {
173        self.inner = self.inner.option_settings(input);
174        self
175    }
176    /// <p>A list of configuration option settings to update with the new specified option value.</p>
177    pub fn set_option_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>) -> Self {
178        self.inner = self.inner.set_option_settings(input);
179        self
180    }
181    /// <p>A list of configuration option settings to update with the new specified option value.</p>
182    pub fn get_option_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>> {
183        self.inner.get_option_settings()
184    }
185    ///
186    /// Appends an item to `OptionsToRemove`.
187    ///
188    /// To override the contents of this collection use [`set_options_to_remove`](Self::set_options_to_remove).
189    ///
190    /// <p>A list of configuration options to remove from the configuration set.</p>
191    /// <p>Constraint: You can remove only <code>UserDefined</code> configuration options.</p>
192    pub fn options_to_remove(mut self, input: crate::types::OptionSpecification) -> Self {
193        self.inner = self.inner.options_to_remove(input);
194        self
195    }
196    /// <p>A list of configuration options to remove from the configuration set.</p>
197    /// <p>Constraint: You can remove only <code>UserDefined</code> configuration options.</p>
198    pub fn set_options_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>>) -> Self {
199        self.inner = self.inner.set_options_to_remove(input);
200        self
201    }
202    /// <p>A list of configuration options to remove from the configuration set.</p>
203    /// <p>Constraint: You can remove only <code>UserDefined</code> configuration options.</p>
204    pub fn get_options_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>> {
205        self.inner.get_options_to_remove()
206    }
207}