aws_sdk_elasticbeanstalk/operation/create_configuration_template/
_create_configuration_template_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request to create a configuration template.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateConfigurationTemplateInput {
7    /// <p>The name of the Elastic Beanstalk application to associate with this configuration template.</p>
8    pub application_name: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the configuration template.</p>
10    /// <p>Constraint: This name must be unique per application.</p>
11    pub template_name: ::std::option::Option<::std::string::String>,
12    /// <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>
13    /// <p>You must specify <code>SolutionStackName</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SourceConfiguration</code>.</p>
14    /// <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>
15    pub solution_stack_name: ::std::option::Option<::std::string::String>,
16    /// <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>
17    /// <p>If you specify <code>PlatformArn</code>, then don't specify <code>SolutionStackName</code>.</p>
18    /// </note>
19    pub platform_arn: ::std::option::Option<::std::string::String>,
20    /// <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>
21    /// <p>Values specified in <code>OptionSettings</code> override any values obtained from the <code>SourceConfiguration</code>.</p>
22    /// <p>You must specify <code>SourceConfiguration</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SolutionStackName</code>.</p>
23    /// <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>
24    pub source_configuration: ::std::option::Option<crate::types::SourceConfiguration>,
25    /// <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>
26    pub environment_id: ::std::option::Option<::std::string::String>,
27    /// <p>An optional description for this configuration.</p>
28    pub description: ::std::option::Option<::std::string::String>,
29    /// <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>
30    pub option_settings: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>,
31    /// <p>Specifies the tags applied to the configuration template.</p>
32    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
33}
34impl CreateConfigurationTemplateInput {
35    /// <p>The name of the Elastic Beanstalk application to associate with this configuration template.</p>
36    pub fn application_name(&self) -> ::std::option::Option<&str> {
37        self.application_name.as_deref()
38    }
39    /// <p>The name of the configuration template.</p>
40    /// <p>Constraint: This name must be unique per application.</p>
41    pub fn template_name(&self) -> ::std::option::Option<&str> {
42        self.template_name.as_deref()
43    }
44    /// <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>
45    /// <p>You must specify <code>SolutionStackName</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SourceConfiguration</code>.</p>
46    /// <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>
47    pub fn solution_stack_name(&self) -> ::std::option::Option<&str> {
48        self.solution_stack_name.as_deref()
49    }
50    /// <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>
51    /// <p>If you specify <code>PlatformArn</code>, then don't specify <code>SolutionStackName</code>.</p>
52    /// </note>
53    pub fn platform_arn(&self) -> ::std::option::Option<&str> {
54        self.platform_arn.as_deref()
55    }
56    /// <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>
57    /// <p>Values specified in <code>OptionSettings</code> override any values obtained from the <code>SourceConfiguration</code>.</p>
58    /// <p>You must specify <code>SourceConfiguration</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SolutionStackName</code>.</p>
59    /// <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>
60    pub fn source_configuration(&self) -> ::std::option::Option<&crate::types::SourceConfiguration> {
61        self.source_configuration.as_ref()
62    }
63    /// <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>
64    pub fn environment_id(&self) -> ::std::option::Option<&str> {
65        self.environment_id.as_deref()
66    }
67    /// <p>An optional description for this configuration.</p>
68    pub fn description(&self) -> ::std::option::Option<&str> {
69        self.description.as_deref()
70    }
71    /// <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>
72    ///
73    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.option_settings.is_none()`.
74    pub fn option_settings(&self) -> &[crate::types::ConfigurationOptionSetting] {
75        self.option_settings.as_deref().unwrap_or_default()
76    }
77    /// <p>Specifies the tags applied to the configuration template.</p>
78    ///
79    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
80    pub fn tags(&self) -> &[crate::types::Tag] {
81        self.tags.as_deref().unwrap_or_default()
82    }
83}
84impl CreateConfigurationTemplateInput {
85    /// Creates a new builder-style object to manufacture [`CreateConfigurationTemplateInput`](crate::operation::create_configuration_template::CreateConfigurationTemplateInput).
86    pub fn builder() -> crate::operation::create_configuration_template::builders::CreateConfigurationTemplateInputBuilder {
87        crate::operation::create_configuration_template::builders::CreateConfigurationTemplateInputBuilder::default()
88    }
89}
90
91/// A builder for [`CreateConfigurationTemplateInput`](crate::operation::create_configuration_template::CreateConfigurationTemplateInput).
92#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
93#[non_exhaustive]
94pub struct CreateConfigurationTemplateInputBuilder {
95    pub(crate) application_name: ::std::option::Option<::std::string::String>,
96    pub(crate) template_name: ::std::option::Option<::std::string::String>,
97    pub(crate) solution_stack_name: ::std::option::Option<::std::string::String>,
98    pub(crate) platform_arn: ::std::option::Option<::std::string::String>,
99    pub(crate) source_configuration: ::std::option::Option<crate::types::SourceConfiguration>,
100    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
101    pub(crate) description: ::std::option::Option<::std::string::String>,
102    pub(crate) option_settings: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>,
103    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
104}
105impl CreateConfigurationTemplateInputBuilder {
106    /// <p>The name of the Elastic Beanstalk application to associate with this configuration template.</p>
107    /// This field is required.
108    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.application_name = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The name of the Elastic Beanstalk application to associate with this configuration template.</p>
113    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.application_name = input;
115        self
116    }
117    /// <p>The name of the Elastic Beanstalk application to associate with this configuration template.</p>
118    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
119        &self.application_name
120    }
121    /// <p>The name of the configuration template.</p>
122    /// <p>Constraint: This name must be unique per application.</p>
123    /// This field is required.
124    pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.template_name = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The name of the configuration template.</p>
129    /// <p>Constraint: This name must be unique per application.</p>
130    pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.template_name = input;
132        self
133    }
134    /// <p>The name of the configuration template.</p>
135    /// <p>Constraint: This name must be unique per application.</p>
136    pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
137        &self.template_name
138    }
139    /// <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>
140    /// <p>You must specify <code>SolutionStackName</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SourceConfiguration</code>.</p>
141    /// <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>
142    pub fn solution_stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.solution_stack_name = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <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>
147    /// <p>You must specify <code>SolutionStackName</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SourceConfiguration</code>.</p>
148    /// <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>
149    pub fn set_solution_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.solution_stack_name = input;
151        self
152    }
153    /// <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>
154    /// <p>You must specify <code>SolutionStackName</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SourceConfiguration</code>.</p>
155    /// <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>
156    pub fn get_solution_stack_name(&self) -> &::std::option::Option<::std::string::String> {
157        &self.solution_stack_name
158    }
159    /// <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>
160    /// <p>If you specify <code>PlatformArn</code>, then don't specify <code>SolutionStackName</code>.</p>
161    /// </note>
162    pub fn platform_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.platform_arn = ::std::option::Option::Some(input.into());
164        self
165    }
166    /// <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>
167    /// <p>If you specify <code>PlatformArn</code>, then don't specify <code>SolutionStackName</code>.</p>
168    /// </note>
169    pub fn set_platform_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.platform_arn = input;
171        self
172    }
173    /// <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>
174    /// <p>If you specify <code>PlatformArn</code>, then don't specify <code>SolutionStackName</code>.</p>
175    /// </note>
176    pub fn get_platform_arn(&self) -> &::std::option::Option<::std::string::String> {
177        &self.platform_arn
178    }
179    /// <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>
180    /// <p>Values specified in <code>OptionSettings</code> override any values obtained from the <code>SourceConfiguration</code>.</p>
181    /// <p>You must specify <code>SourceConfiguration</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SolutionStackName</code>.</p>
182    /// <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>
183    pub fn source_configuration(mut self, input: crate::types::SourceConfiguration) -> Self {
184        self.source_configuration = ::std::option::Option::Some(input);
185        self
186    }
187    /// <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>
188    /// <p>Values specified in <code>OptionSettings</code> override any values obtained from the <code>SourceConfiguration</code>.</p>
189    /// <p>You must specify <code>SourceConfiguration</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SolutionStackName</code>.</p>
190    /// <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>
191    pub fn set_source_configuration(mut self, input: ::std::option::Option<crate::types::SourceConfiguration>) -> Self {
192        self.source_configuration = input;
193        self
194    }
195    /// <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>
196    /// <p>Values specified in <code>OptionSettings</code> override any values obtained from the <code>SourceConfiguration</code>.</p>
197    /// <p>You must specify <code>SourceConfiguration</code> if you don't specify <code>PlatformArn</code>, <code>EnvironmentId</code>, or <code>SolutionStackName</code>.</p>
198    /// <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>
199    pub fn get_source_configuration(&self) -> &::std::option::Option<crate::types::SourceConfiguration> {
200        &self.source_configuration
201    }
202    /// <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>
203    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204        self.environment_id = ::std::option::Option::Some(input.into());
205        self
206    }
207    /// <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>
208    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209        self.environment_id = input;
210        self
211    }
212    /// <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>
213    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
214        &self.environment_id
215    }
216    /// <p>An optional description for this configuration.</p>
217    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218        self.description = ::std::option::Option::Some(input.into());
219        self
220    }
221    /// <p>An optional description for this configuration.</p>
222    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223        self.description = input;
224        self
225    }
226    /// <p>An optional description for this configuration.</p>
227    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
228        &self.description
229    }
230    /// Appends an item to `option_settings`.
231    ///
232    /// To override the contents of this collection use [`set_option_settings`](Self::set_option_settings).
233    ///
234    /// <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>
235    pub fn option_settings(mut self, input: crate::types::ConfigurationOptionSetting) -> Self {
236        let mut v = self.option_settings.unwrap_or_default();
237        v.push(input);
238        self.option_settings = ::std::option::Option::Some(v);
239        self
240    }
241    /// <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>
242    pub fn set_option_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>>) -> Self {
243        self.option_settings = input;
244        self
245    }
246    /// <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>
247    pub fn get_option_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConfigurationOptionSetting>> {
248        &self.option_settings
249    }
250    /// Appends an item to `tags`.
251    ///
252    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
253    ///
254    /// <p>Specifies the tags applied to the configuration template.</p>
255    pub fn tags(mut self, input: crate::types::Tag) -> Self {
256        let mut v = self.tags.unwrap_or_default();
257        v.push(input);
258        self.tags = ::std::option::Option::Some(v);
259        self
260    }
261    /// <p>Specifies the tags applied to the configuration template.</p>
262    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
263        self.tags = input;
264        self
265    }
266    /// <p>Specifies the tags applied to the configuration template.</p>
267    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
268        &self.tags
269    }
270    /// Consumes the builder and constructs a [`CreateConfigurationTemplateInput`](crate::operation::create_configuration_template::CreateConfigurationTemplateInput).
271    pub fn build(
272        self,
273    ) -> ::std::result::Result<
274        crate::operation::create_configuration_template::CreateConfigurationTemplateInput,
275        ::aws_smithy_types::error::operation::BuildError,
276    > {
277        ::std::result::Result::Ok(crate::operation::create_configuration_template::CreateConfigurationTemplateInput {
278            application_name: self.application_name,
279            template_name: self.template_name,
280            solution_stack_name: self.solution_stack_name,
281            platform_arn: self.platform_arn,
282            source_configuration: self.source_configuration,
283            environment_id: self.environment_id,
284            description: self.description,
285            option_settings: self.option_settings,
286            tags: self.tags,
287        })
288    }
289}