aws_sdk_elasticbeanstalk/operation/update_environment/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_environment::_update_environment_output::UpdateEnvironmentOutputBuilder;
3
4pub use crate::operation::update_environment::_update_environment_input::UpdateEnvironmentInputBuilder;
5
6impl crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder {
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_environment::UpdateEnvironmentOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_environment::UpdateEnvironmentError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_environment();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateEnvironment`.
24///
25/// <p>Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment.</p>
26/// <p>Attempting to update both the release and configuration is not allowed and AWS Elastic Beanstalk returns an <code>InvalidParameterCombination</code> error.</p>
27/// <p>When updating the configuration settings to a new template or individual settings, a draft configuration is created and <code>DescribeConfigurationSettings</code> for this environment returns two setting descriptions with different <code>DeploymentStatus</code> values.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct UpdateEnvironmentFluentBuilder {
30 handle: ::std::sync::Arc<crate::client::Handle>,
31 inner: crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder,
32 config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35 crate::client::customize::internal::CustomizableSend<
36 crate::operation::update_environment::UpdateEnvironmentOutput,
37 crate::operation::update_environment::UpdateEnvironmentError,
38 > for UpdateEnvironmentFluentBuilder
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_environment::UpdateEnvironmentOutput,
46 crate::operation::update_environment::UpdateEnvironmentError,
47 >,
48 > {
49 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50 }
51}
52impl UpdateEnvironmentFluentBuilder {
53 /// Creates a new `UpdateEnvironmentFluentBuilder`.
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 UpdateEnvironment as a reference.
62 pub fn as_input(&self) -> &crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder {
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_environment::UpdateEnvironmentOutput,
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::update_environment::UpdateEnvironmentError,
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_environment::UpdateEnvironment::operation_runtime_plugins(
87 self.handle.runtime_plugins.clone(),
88 &self.handle.conf,
89 self.config_override,
90 );
91 crate::operation::update_environment::UpdateEnvironment::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_environment::UpdateEnvironmentOutput,
99 crate::operation::update_environment::UpdateEnvironmentError,
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>The name of the application with which the environment is associated.</p>
114 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.inner = self.inner.application_name(input.into());
116 self
117 }
118 /// <p>The name of the application with which the environment is associated.</p>
119 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.inner = self.inner.set_application_name(input);
121 self
122 }
123 /// <p>The name of the application with which the environment is associated.</p>
124 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
125 self.inner.get_application_name()
126 }
127 /// <p>The ID of the environment to update.</p>
128 /// <p>If no environment with this ID exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
129 /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
130 pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.inner = self.inner.environment_id(input.into());
132 self
133 }
134 /// <p>The ID of the environment to update.</p>
135 /// <p>If no environment with this ID exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
136 /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
137 pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138 self.inner = self.inner.set_environment_id(input);
139 self
140 }
141 /// <p>The ID of the environment to update.</p>
142 /// <p>If no environment with this ID exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
143 /// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
144 pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
145 self.inner.get_environment_id()
146 }
147 /// <p>The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
148 /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
149 pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.inner = self.inner.environment_name(input.into());
151 self
152 }
153 /// <p>The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
154 /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
155 pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.inner = self.inner.set_environment_name(input);
157 self
158 }
159 /// <p>The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
160 /// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
161 pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
162 self.inner.get_environment_name()
163 }
164 /// <p>The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name or environment ID parameters. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
165 pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166 self.inner = self.inner.group_name(input.into());
167 self
168 }
169 /// <p>The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name or environment ID parameters. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
170 pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171 self.inner = self.inner.set_group_name(input);
172 self
173 }
174 /// <p>The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name or environment ID parameters. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
175 pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
176 self.inner.get_group_name()
177 }
178 /// <p>If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.</p>
179 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180 self.inner = self.inner.description(input.into());
181 self
182 }
183 /// <p>If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.</p>
184 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185 self.inner = self.inner.set_description(input);
186 self
187 }
188 /// <p>If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.</p>
189 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
190 self.inner.get_description()
191 }
192 /// <p>This specifies the tier to use to update the environment.</p>
193 /// <p>Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns <code>InvalidParameterValue</code> error.</p>
194 pub fn tier(mut self, input: crate::types::EnvironmentTier) -> Self {
195 self.inner = self.inner.tier(input);
196 self
197 }
198 /// <p>This specifies the tier to use to update the environment.</p>
199 /// <p>Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns <code>InvalidParameterValue</code> error.</p>
200 pub fn set_tier(mut self, input: ::std::option::Option<crate::types::EnvironmentTier>) -> Self {
201 self.inner = self.inner.set_tier(input);
202 self
203 }
204 /// <p>This specifies the tier to use to update the environment.</p>
205 /// <p>Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns <code>InvalidParameterValue</code> error.</p>
206 pub fn get_tier(&self) -> &::std::option::Option<crate::types::EnvironmentTier> {
207 self.inner.get_tier()
208 }
209 /// <p>If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an <code>InvalidParameterValue</code> error.</p>
210 pub fn version_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211 self.inner = self.inner.version_label(input.into());
212 self
213 }
214 /// <p>If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an <code>InvalidParameterValue</code> error.</p>
215 pub fn set_version_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216 self.inner = self.inner.set_version_label(input);
217 self
218 }
219 /// <p>If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an <code>InvalidParameterValue</code> error.</p>
220 pub fn get_version_label(&self) -> &::std::option::Option<::std::string::String> {
221 self.inner.get_version_label()
222 }
223 /// <p>If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
224 pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.inner = self.inner.template_name(input.into());
226 self
227 }
228 /// <p>If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
229 pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.inner = self.inner.set_template_name(input);
231 self
232 }
233 /// <p>If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
234 pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
235 self.inner.get_template_name()
236 }
237 /// <p>This specifies the platform version that the environment will run after the environment is updated.</p>
238 pub fn solution_stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239 self.inner = self.inner.solution_stack_name(input.into());
240 self
241 }
242 /// <p>This specifies the platform version that the environment will run after the environment is updated.</p>
243 pub fn set_solution_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.inner = self.inner.set_solution_stack_name(input);
245 self
246 }
247 /// <p>This specifies the platform version that the environment will run after the environment is updated.</p>
248 pub fn get_solution_stack_name(&self) -> &::std::option::Option<::std::string::String> {
249 self.inner.get_solution_stack_name()
250 }
251 /// <p>The ARN of the platform, if used.</p>
252 pub fn platform_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253 self.inner = self.inner.platform_arn(input.into());
254 self
255 }
256 /// <p>The ARN of the platform, if used.</p>
257 pub fn set_platform_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258 self.inner = self.inner.set_platform_arn(input);
259 self
260 }
261 /// <p>The ARN of the platform, if used.</p>
262 pub fn get_platform_arn(&self) -> &::std::option::Option<::std::string::String> {
263 self.inner.get_platform_arn()
264 }
265 ///
266 /// Appends an item to `OptionSettings`.
267 ///
268 /// To override the contents of this collection use [`set_option_settings`](Self::set_option_settings).
269 ///
270 /// <p>If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.</p>
271 pub fn option_settings(mut self, input: crate::types::ConfigurationOptionSetting) -> Self {
272 self.inner = self.inner.option_settings(input);
273 self
274 }
275 /// <p>If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.</p>
276 pub fn set_option_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>) -> Self {
277 self.inner = self.inner.set_option_settings(input);
278 self
279 }
280 /// <p>If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.</p>
281 pub fn get_option_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>> {
282 self.inner.get_option_settings()
283 }
284 ///
285 /// Appends an item to `OptionsToRemove`.
286 ///
287 /// To override the contents of this collection use [`set_options_to_remove`](Self::set_options_to_remove).
288 ///
289 /// <p>A list of custom user-defined configuration options to remove from the configuration set for this environment.</p>
290 pub fn options_to_remove(mut self, input: crate::types::OptionSpecification) -> Self {
291 self.inner = self.inner.options_to_remove(input);
292 self
293 }
294 /// <p>A list of custom user-defined configuration options to remove from the configuration set for this environment.</p>
295 pub fn set_options_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>>) -> Self {
296 self.inner = self.inner.set_options_to_remove(input);
297 self
298 }
299 /// <p>A list of custom user-defined configuration options to remove from the configuration set for this environment.</p>
300 pub fn get_options_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>> {
301 self.inner.get_options_to_remove()
302 }
303}