aws_sdk_elasticbeanstalk/operation/create_environment/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_environment::_create_environment_output::CreateEnvironmentOutputBuilder;
3
4pub use crate::operation::create_environment::_create_environment_input::CreateEnvironmentInputBuilder;
5
6impl crate::operation::create_environment::builders::CreateEnvironmentInputBuilder {
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_environment::CreateEnvironmentOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_environment::CreateEnvironmentError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_environment();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateEnvironment`.
24///
25/// <p>Launches an AWS Elastic Beanstalk environment for the specified application using the specified configuration.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateEnvironmentFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_environment::builders::CreateEnvironmentInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_environment::CreateEnvironmentOutput,
35 crate::operation::create_environment::CreateEnvironmentError,
36 > for CreateEnvironmentFluentBuilder
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_environment::CreateEnvironmentOutput,
44 crate::operation::create_environment::CreateEnvironmentError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateEnvironmentFluentBuilder {
51 /// Creates a new `CreateEnvironmentFluentBuilder`.
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 CreateEnvironment as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_environment::builders::CreateEnvironmentInputBuilder {
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_environment::CreateEnvironmentOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_environment::CreateEnvironmentError,
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_environment::CreateEnvironment::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_environment::CreateEnvironment::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_environment::CreateEnvironmentOutput,
97 crate::operation::create_environment::CreateEnvironmentError,
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>The name of the application that is associated with this environment.</p>
112 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.application_name(input.into());
114 self
115 }
116 /// <p>The name of the application that is associated with this environment.</p>
117 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_application_name(input);
119 self
120 }
121 /// <p>The name of the application that is associated with this environment.</p>
122 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_application_name()
124 }
125 /// <p>A unique name for the environment.</p>
126 /// <p>Constraint: Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It can't start or end with a hyphen. This name must be unique within a region in your account. If the specified name already exists in the region, Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
127 /// <p>If you don't specify the <code>CNAMEPrefix</code> parameter, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.</p>
128 pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.inner = self.inner.environment_name(input.into());
130 self
131 }
132 /// <p>A unique name for the environment.</p>
133 /// <p>Constraint: Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It can't start or end with a hyphen. This name must be unique within a region in your account. If the specified name already exists in the region, Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
134 /// <p>If you don't specify the <code>CNAMEPrefix</code> parameter, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.</p>
135 pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.inner = self.inner.set_environment_name(input);
137 self
138 }
139 /// <p>A unique name for the environment.</p>
140 /// <p>Constraint: Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It can't start or end with a hyphen. This name must be unique within a region in your account. If the specified name already exists in the region, Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p>
141 /// <p>If you don't specify the <code>CNAMEPrefix</code> parameter, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.</p>
142 pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
143 self.inner.get_environment_name()
144 }
145 /// <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 parameter. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
146 pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.inner = self.inner.group_name(input.into());
148 self
149 }
150 /// <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 parameter. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
151 pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.inner = self.inner.set_group_name(input);
153 self
154 }
155 /// <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 parameter. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
156 pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
157 self.inner.get_group_name()
158 }
159 /// <p>Your description for this environment.</p>
160 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.inner = self.inner.description(input.into());
162 self
163 }
164 /// <p>Your description for this environment.</p>
165 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.inner = self.inner.set_description(input);
167 self
168 }
169 /// <p>Your description for this environment.</p>
170 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
171 self.inner.get_description()
172 }
173 /// <p>If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.</p>
174 pub fn cname_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175 self.inner = self.inner.cname_prefix(input.into());
176 self
177 }
178 /// <p>If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.</p>
179 pub fn set_cname_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180 self.inner = self.inner.set_cname_prefix(input);
181 self
182 }
183 /// <p>If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.</p>
184 pub fn get_cname_prefix(&self) -> &::std::option::Option<::std::string::String> {
185 self.inner.get_cname_prefix()
186 }
187 /// <p>Specifies the tier to use in creating this environment. The environment tier that you choose determines whether Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks.</p>
188 pub fn tier(mut self, input: crate::types::EnvironmentTier) -> Self {
189 self.inner = self.inner.tier(input);
190 self
191 }
192 /// <p>Specifies the tier to use in creating this environment. The environment tier that you choose determines whether Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks.</p>
193 pub fn set_tier(mut self, input: ::std::option::Option<crate::types::EnvironmentTier>) -> Self {
194 self.inner = self.inner.set_tier(input);
195 self
196 }
197 /// <p>Specifies the tier to use in creating this environment. The environment tier that you choose determines whether Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks.</p>
198 pub fn get_tier(&self) -> &::std::option::Option<crate::types::EnvironmentTier> {
199 self.inner.get_tier()
200 }
201 ///
202 /// Appends an item to `Tags`.
203 ///
204 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
205 ///
206 /// <p>Specifies the tags applied to resources in the environment.</p>
207 pub fn tags(mut self, input: crate::types::Tag) -> Self {
208 self.inner = self.inner.tags(input);
209 self
210 }
211 /// <p>Specifies the tags applied to resources in the environment.</p>
212 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
213 self.inner = self.inner.set_tags(input);
214 self
215 }
216 /// <p>Specifies the tags applied to resources in the environment.</p>
217 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
218 self.inner.get_tags()
219 }
220 /// <p>The name of the application version to deploy.</p>
221 /// <p>Default: If not specified, Elastic Beanstalk attempts to deploy the sample application.</p>
222 pub fn version_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.inner = self.inner.version_label(input.into());
224 self
225 }
226 /// <p>The name of the application version to deploy.</p>
227 /// <p>Default: If not specified, Elastic Beanstalk attempts to deploy the sample application.</p>
228 pub fn set_version_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229 self.inner = self.inner.set_version_label(input);
230 self
231 }
232 /// <p>The name of the application version to deploy.</p>
233 /// <p>Default: If not specified, Elastic Beanstalk attempts to deploy the sample application.</p>
234 pub fn get_version_label(&self) -> &::std::option::Option<::std::string::String> {
235 self.inner.get_version_label()
236 }
237 /// <p>The name of the Elastic Beanstalk configuration template to use with the environment.</p><note>
238 /// <p>If you specify <code>TemplateName</code>, then don't specify <code>SolutionStackName</code>.</p>
239 /// </note>
240 pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241 self.inner = self.inner.template_name(input.into());
242 self
243 }
244 /// <p>The name of the Elastic Beanstalk configuration template to use with the environment.</p><note>
245 /// <p>If you specify <code>TemplateName</code>, then don't specify <code>SolutionStackName</code>.</p>
246 /// </note>
247 pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
248 self.inner = self.inner.set_template_name(input);
249 self
250 }
251 /// <p>The name of the Elastic Beanstalk configuration template to use with the environment.</p><note>
252 /// <p>If you specify <code>TemplateName</code>, then don't specify <code>SolutionStackName</code>.</p>
253 /// </note>
254 pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
255 self.inner.get_template_name()
256 }
257 /// <p>The name of an Elastic Beanstalk solution stack (platform version) to use with the environment. If specified, Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack. For a list of current solution stacks, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html">Elastic Beanstalk Supported Platforms</a> in the <i>AWS Elastic Beanstalk Platforms</i> guide.</p><note>
258 /// <p>If you specify <code>SolutionStackName</code>, don't specify <code>PlatformArn</code> or <code>TemplateName</code>.</p>
259 /// </note>
260 pub fn solution_stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261 self.inner = self.inner.solution_stack_name(input.into());
262 self
263 }
264 /// <p>The name of an Elastic Beanstalk solution stack (platform version) to use with the environment. If specified, Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack. For a list of current solution stacks, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html">Elastic Beanstalk Supported Platforms</a> in the <i>AWS Elastic Beanstalk Platforms</i> guide.</p><note>
265 /// <p>If you specify <code>SolutionStackName</code>, don't specify <code>PlatformArn</code> or <code>TemplateName</code>.</p>
266 /// </note>
267 pub fn set_solution_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268 self.inner = self.inner.set_solution_stack_name(input);
269 self
270 }
271 /// <p>The name of an Elastic Beanstalk solution stack (platform version) to use with the environment. If specified, Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack. For a list of current solution stacks, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html">Elastic Beanstalk Supported Platforms</a> in the <i>AWS Elastic Beanstalk Platforms</i> guide.</p><note>
272 /// <p>If you specify <code>SolutionStackName</code>, don't specify <code>PlatformArn</code> or <code>TemplateName</code>.</p>
273 /// </note>
274 pub fn get_solution_stack_name(&self) -> &::std::option::Option<::std::string::String> {
275 self.inner.get_solution_stack_name()
276 }
277 /// <p>The Amazon Resource Name (ARN) of the custom platform to use with the environment. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html">Custom Platforms</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p><note>
278 /// <p>If you specify <code>PlatformArn</code>, don't specify <code>SolutionStackName</code>.</p>
279 /// </note>
280 pub fn platform_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281 self.inner = self.inner.platform_arn(input.into());
282 self
283 }
284 /// <p>The Amazon Resource Name (ARN) of the custom platform to use with the environment. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html">Custom Platforms</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p><note>
285 /// <p>If you specify <code>PlatformArn</code>, don't specify <code>SolutionStackName</code>.</p>
286 /// </note>
287 pub fn set_platform_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
288 self.inner = self.inner.set_platform_arn(input);
289 self
290 }
291 /// <p>The Amazon Resource Name (ARN) of the custom platform to use with the environment. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html">Custom Platforms</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p><note>
292 /// <p>If you specify <code>PlatformArn</code>, don't specify <code>SolutionStackName</code>.</p>
293 /// </note>
294 pub fn get_platform_arn(&self) -> &::std::option::Option<::std::string::String> {
295 self.inner.get_platform_arn()
296 }
297 ///
298 /// Appends an item to `OptionSettings`.
299 ///
300 /// To override the contents of this collection use [`set_option_settings`](Self::set_option_settings).
301 ///
302 /// <p>If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template.</p>
303 pub fn option_settings(mut self, input: crate::types::ConfigurationOptionSetting) -> Self {
304 self.inner = self.inner.option_settings(input);
305 self
306 }
307 /// <p>If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template.</p>
308 pub fn set_option_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>) -> Self {
309 self.inner = self.inner.set_option_settings(input);
310 self
311 }
312 /// <p>If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template.</p>
313 pub fn get_option_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>> {
314 self.inner.get_option_settings()
315 }
316 ///
317 /// Appends an item to `OptionsToRemove`.
318 ///
319 /// To override the contents of this collection use [`set_options_to_remove`](Self::set_options_to_remove).
320 ///
321 /// <p>A list of custom user-defined configuration options to remove from the configuration set for this new environment.</p>
322 pub fn options_to_remove(mut self, input: crate::types::OptionSpecification) -> Self {
323 self.inner = self.inner.options_to_remove(input);
324 self
325 }
326 /// <p>A list of custom user-defined configuration options to remove from the configuration set for this new environment.</p>
327 pub fn set_options_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>>) -> Self {
328 self.inner = self.inner.set_options_to_remove(input);
329 self
330 }
331 /// <p>A list of custom user-defined configuration options to remove from the configuration set for this new environment.</p>
332 pub fn get_options_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OptionSpecification>> {
333 self.inner.get_options_to_remove()
334 }
335 /// <p>The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role. If specified, Elastic Beanstalk uses the operations role for permissions to downstream services during this call and during subsequent calls acting on this environment. To specify an operations role, you must have the <code>iam:PassRole</code> permission for the role. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-operationsrole.html">Operations roles</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
336 pub fn operations_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
337 self.inner = self.inner.operations_role(input.into());
338 self
339 }
340 /// <p>The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role. If specified, Elastic Beanstalk uses the operations role for permissions to downstream services during this call and during subsequent calls acting on this environment. To specify an operations role, you must have the <code>iam:PassRole</code> permission for the role. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-operationsrole.html">Operations roles</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
341 pub fn set_operations_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
342 self.inner = self.inner.set_operations_role(input);
343 self
344 }
345 /// <p>The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role. If specified, Elastic Beanstalk uses the operations role for permissions to downstream services during this call and during subsequent calls acting on this environment. To specify an operations role, you must have the <code>iam:PassRole</code> permission for the role. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-operationsrole.html">Operations roles</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
346 pub fn get_operations_role(&self) -> &::std::option::Option<::std::string::String> {
347 self.inner.get_operations_role()
348 }
349}