aws_sdk_elasticbeanstalk/operation/create_configuration_template/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_configuration_template::_create_configuration_template_output::CreateConfigurationTemplateOutputBuilder;
3
4pub use crate::operation::create_configuration_template::_create_configuration_template_input::CreateConfigurationTemplateInputBuilder;
5
6impl crate::operation::create_configuration_template::builders::CreateConfigurationTemplateInputBuilder {
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_configuration_template::CreateConfigurationTemplateOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_configuration_template::CreateConfigurationTemplateError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_configuration_template();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateConfigurationTemplate`.
24///
25/// <p>Creates an AWS Elastic Beanstalk configuration template, associated with a specific Elastic Beanstalk application. You define application configuration settings in a configuration template. You can then use the configuration template to deploy different versions of the application with the same configuration settings.</p>
26/// <p>Templates aren't associated with any environment. The <code>EnvironmentName</code> response element is always <code>null</code>.</p>
27/// <p>Related Topics</p>
28/// <ul>
29/// <li>
30/// <p><code>DescribeConfigurationOptions</code></p></li>
31/// <li>
32/// <p><code>DescribeConfigurationSettings</code></p></li>
33/// <li>
34/// <p><code>ListAvailableSolutionStacks</code></p></li>
35/// </ul>
36#[derive(::std::clone::Clone, ::std::fmt::Debug)]
37pub struct CreateConfigurationTemplateFluentBuilder {
38 handle: ::std::sync::Arc<crate::client::Handle>,
39 inner: crate::operation::create_configuration_template::builders::CreateConfigurationTemplateInputBuilder,
40 config_override: ::std::option::Option<crate::config::Builder>,
41}
42impl
43 crate::client::customize::internal::CustomizableSend<
44 crate::operation::create_configuration_template::CreateConfigurationTemplateOutput,
45 crate::operation::create_configuration_template::CreateConfigurationTemplateError,
46 > for CreateConfigurationTemplateFluentBuilder
47{
48 fn send(
49 self,
50 config_override: crate::config::Builder,
51 ) -> crate::client::customize::internal::BoxFuture<
52 crate::client::customize::internal::SendResult<
53 crate::operation::create_configuration_template::CreateConfigurationTemplateOutput,
54 crate::operation::create_configuration_template::CreateConfigurationTemplateError,
55 >,
56 > {
57 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
58 }
59}
60impl CreateConfigurationTemplateFluentBuilder {
61 /// Creates a new `CreateConfigurationTemplateFluentBuilder`.
62 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
63 Self {
64 handle,
65 inner: ::std::default::Default::default(),
66 config_override: ::std::option::Option::None,
67 }
68 }
69 /// Access the CreateConfigurationTemplate as a reference.
70 pub fn as_input(&self) -> &crate::operation::create_configuration_template::builders::CreateConfigurationTemplateInputBuilder {
71 &self.inner
72 }
73 /// Sends the request and returns the response.
74 ///
75 /// If an error occurs, an `SdkError` will be returned with additional details that
76 /// can be matched against.
77 ///
78 /// By default, any retryable failures will be retried twice. Retry behavior
79 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
80 /// set when configuring the client.
81 pub async fn send(
82 self,
83 ) -> ::std::result::Result<
84 crate::operation::create_configuration_template::CreateConfigurationTemplateOutput,
85 ::aws_smithy_runtime_api::client::result::SdkError<
86 crate::operation::create_configuration_template::CreateConfigurationTemplateError,
87 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
88 >,
89 > {
90 let input = self
91 .inner
92 .build()
93 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
94 let runtime_plugins = crate::operation::create_configuration_template::CreateConfigurationTemplate::operation_runtime_plugins(
95 self.handle.runtime_plugins.clone(),
96 &self.handle.conf,
97 self.config_override,
98 );
99 crate::operation::create_configuration_template::CreateConfigurationTemplate::orchestrate(&runtime_plugins, input).await
100 }
101
102 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
103 pub fn customize(
104 self,
105 ) -> crate::client::customize::CustomizableOperation<
106 crate::operation::create_configuration_template::CreateConfigurationTemplateOutput,
107 crate::operation::create_configuration_template::CreateConfigurationTemplateError,
108 Self,
109 > {
110 crate::client::customize::CustomizableOperation::new(self)
111 }
112 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
113 self.set_config_override(::std::option::Option::Some(config_override.into()));
114 self
115 }
116
117 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
118 self.config_override = config_override;
119 self
120 }
121 /// <p>The name of the Elastic Beanstalk application to associate with this configuration template.</p>
122 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.inner = self.inner.application_name(input.into());
124 self
125 }
126 /// <p>The name of the Elastic Beanstalk application to associate with this configuration template.</p>
127 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.inner = self.inner.set_application_name(input);
129 self
130 }
131 /// <p>The name of the Elastic Beanstalk application to associate with this configuration template.</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.</p>
136 /// <p>Constraint: This name must be unique per application.</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.</p>
142 /// <p>Constraint: This name must be unique per application.</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.</p>
148 /// <p>Constraint: This name must be unique per application.</p>
149 pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
150 self.inner.get_template_name()
151 }
152 /// <p>The name of an Elastic Beanstalk solution stack (platform version) that this configuration uses. For example, <code>64bit Amazon Linux 2013.09 running Tomcat 7 Java 7</code>. A solution stack specifies the operating system, runtime, and application server for a configuration template. It also determines the set of configuration options as well as the possible and default values. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html">Supported Platforms</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
153 /// <p>You must specify <code>SolutionStackName</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SourceConfiguration</code>.</p>
154 /// <p>Use the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_ListAvailableSolutionStacks.html"> <code>ListAvailableSolutionStacks</code> </a> API to obtain a list of available solution stacks.</p>
155 pub fn solution_stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.solution_stack_name(input.into());
157 self
158 }
159 /// <p>The name of an Elastic Beanstalk solution stack (platform version) that this configuration uses. For example, <code>64bit Amazon Linux 2013.09 running Tomcat 7 Java 7</code>. A solution stack specifies the operating system, runtime, and application server for a configuration template. It also determines the set of configuration options as well as the possible and default values. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html">Supported Platforms</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
160 /// <p>You must specify <code>SolutionStackName</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SourceConfiguration</code>.</p>
161 /// <p>Use the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_ListAvailableSolutionStacks.html"> <code>ListAvailableSolutionStacks</code> </a> API to obtain a list of available solution stacks.</p>
162 pub fn set_solution_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.inner = self.inner.set_solution_stack_name(input);
164 self
165 }
166 /// <p>The name of an Elastic Beanstalk solution stack (platform version) that this configuration uses. For example, <code>64bit Amazon Linux 2013.09 running Tomcat 7 Java 7</code>. A solution stack specifies the operating system, runtime, and application server for a configuration template. It also determines the set of configuration options as well as the possible and default values. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html">Supported Platforms</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
167 /// <p>You must specify <code>SolutionStackName</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SourceConfiguration</code>.</p>
168 /// <p>Use the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_ListAvailableSolutionStacks.html"> <code>ListAvailableSolutionStacks</code> </a> API to obtain a list of available solution stacks.</p>
169 pub fn get_solution_stack_name(&self) -> &::std::option::Option<::std::string::String> {
170 self.inner.get_solution_stack_name()
171 }
172 /// <p>The Amazon Resource Name (ARN) of the custom platform. 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>
173 /// <p>If you specify <code>PlatformArn</code>, then don't specify <code>SolutionStackName</code>.</p>
174 /// </note>
175 pub fn platform_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.inner = self.inner.platform_arn(input.into());
177 self
178 }
179 /// <p>The Amazon Resource Name (ARN) of the custom platform. 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>
180 /// <p>If you specify <code>PlatformArn</code>, then don't specify <code>SolutionStackName</code>.</p>
181 /// </note>
182 pub fn set_platform_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183 self.inner = self.inner.set_platform_arn(input);
184 self
185 }
186 /// <p>The Amazon Resource Name (ARN) of the custom platform. 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>
187 /// <p>If you specify <code>PlatformArn</code>, then don't specify <code>SolutionStackName</code>.</p>
188 /// </note>
189 pub fn get_platform_arn(&self) -> &::std::option::Option<::std::string::String> {
190 self.inner.get_platform_arn()
191 }
192 /// <p>An Elastic Beanstalk configuration template to base this one on. If specified, Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.</p>
193 /// <p>Values specified in <code>OptionSettings</code> override any values obtained from the <code>SourceConfiguration</code>.</p>
194 /// <p>You must specify <code>SourceConfiguration</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SolutionStackName</code>.</p>
195 /// <p>Constraint: If both solution stack name and source configuration are specified, the solution stack of the source configuration template must match the specified solution stack name.</p>
196 pub fn source_configuration(mut self, input: crate::types::SourceConfiguration) -> Self {
197 self.inner = self.inner.source_configuration(input);
198 self
199 }
200 /// <p>An Elastic Beanstalk configuration template to base this one on. If specified, Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.</p>
201 /// <p>Values specified in <code>OptionSettings</code> override any values obtained from the <code>SourceConfiguration</code>.</p>
202 /// <p>You must specify <code>SourceConfiguration</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SolutionStackName</code>.</p>
203 /// <p>Constraint: If both solution stack name and source configuration are specified, the solution stack of the source configuration template must match the specified solution stack name.</p>
204 pub fn set_source_configuration(mut self, input: ::std::option::Option<crate::types::SourceConfiguration>) -> Self {
205 self.inner = self.inner.set_source_configuration(input);
206 self
207 }
208 /// <p>An Elastic Beanstalk configuration template to base this one on. If specified, Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.</p>
209 /// <p>Values specified in <code>OptionSettings</code> override any values obtained from the <code>SourceConfiguration</code>.</p>
210 /// <p>You must specify <code>SourceConfiguration</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SolutionStackName</code>.</p>
211 /// <p>Constraint: If both solution stack name and source configuration are specified, the solution stack of the source configuration template must match the specified solution stack name.</p>
212 pub fn get_source_configuration(&self) -> &::std::option::Option<crate::types::SourceConfiguration> {
213 self.inner.get_source_configuration()
214 }
215 /// <p>The ID of an environment whose settings you want to use to create the configuration template. You must specify <code>EnvironmentId</code> if you don't specify <code>PlatformArn</code>, <code>SolutionStackName</code>, or <code>SourceConfiguration</code>.</p>
216 pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217 self.inner = self.inner.environment_id(input.into());
218 self
219 }
220 /// <p>The ID of an environment whose settings you want to use to create the configuration template. You must specify <code>EnvironmentId</code> if you don't specify <code>PlatformArn</code>, <code>SolutionStackName</code>, or <code>SourceConfiguration</code>.</p>
221 pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222 self.inner = self.inner.set_environment_id(input);
223 self
224 }
225 /// <p>The ID of an environment whose settings you want to use to create the configuration template. You must specify <code>EnvironmentId</code> if you don't specify <code>PlatformArn</code>, <code>SolutionStackName</code>, or <code>SourceConfiguration</code>.</p>
226 pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
227 self.inner.get_environment_id()
228 }
229 /// <p>An optional description for this configuration.</p>
230 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.inner = self.inner.description(input.into());
232 self
233 }
234 /// <p>An optional description for this configuration.</p>
235 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236 self.inner = self.inner.set_description(input);
237 self
238 }
239 /// <p>An optional description for this configuration.</p>
240 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
241 self.inner.get_description()
242 }
243 ///
244 /// Appends an item to `OptionSettings`.
245 ///
246 /// To override the contents of this collection use [`set_option_settings`](Self::set_option_settings).
247 ///
248 /// <p>Option values for the Elastic Beanstalk configuration, such as the instance type. If specified, these values override the values obtained from the solution stack or the source configuration template. For a complete list of Elastic Beanstalk configuration options, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html">Option Values</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
249 pub fn option_settings(mut self, input: crate::types::ConfigurationOptionSetting) -> Self {
250 self.inner = self.inner.option_settings(input);
251 self
252 }
253 /// <p>Option values for the Elastic Beanstalk configuration, such as the instance type. If specified, these values override the values obtained from the solution stack or the source configuration template. For a complete list of Elastic Beanstalk configuration options, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html">Option Values</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
254 pub fn set_option_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>) -> Self {
255 self.inner = self.inner.set_option_settings(input);
256 self
257 }
258 /// <p>Option values for the Elastic Beanstalk configuration, such as the instance type. If specified, these values override the values obtained from the solution stack or the source configuration template. For a complete list of Elastic Beanstalk configuration options, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html">Option Values</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
259 pub fn get_option_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>> {
260 self.inner.get_option_settings()
261 }
262 ///
263 /// Appends an item to `Tags`.
264 ///
265 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
266 ///
267 /// <p>Specifies the tags applied to the configuration template.</p>
268 pub fn tags(mut self, input: crate::types::Tag) -> Self {
269 self.inner = self.inner.tags(input);
270 self
271 }
272 /// <p>Specifies the tags applied to the configuration template.</p>
273 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
274 self.inner = self.inner.set_tags(input);
275 self
276 }
277 /// <p>Specifies the tags applied to the configuration template.</p>
278 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
279 self.inner.get_tags()
280 }
281}