aws_sdk_opsworks/operation/update_stack/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_stack::_update_stack_output::UpdateStackOutputBuilder;
3
4pub use crate::operation::update_stack::_update_stack_input::UpdateStackInputBuilder;
5
6impl crate::operation::update_stack::builders::UpdateStackInputBuilder {
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_stack::UpdateStackOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_stack::UpdateStackError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_stack();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateStack`.
24///
25/// <p>Updates a specified stack.</p>
26/// <p><b>Required Permissions</b>: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html">Managing User Permissions</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateStackFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::update_stack::builders::UpdateStackInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::update_stack::UpdateStackOutput,
36        crate::operation::update_stack::UpdateStackError,
37    > for UpdateStackFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::update_stack::UpdateStackOutput,
45            crate::operation::update_stack::UpdateStackError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl UpdateStackFluentBuilder {
52    /// Creates a new `UpdateStackFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the UpdateStack as a reference.
61    pub fn as_input(&self) -> &crate::operation::update_stack::builders::UpdateStackInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::update_stack::UpdateStackOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::update_stack::UpdateStackError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::update_stack::UpdateStack::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::update_stack::UpdateStack::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::update_stack::UpdateStackOutput,
98        crate::operation::update_stack::UpdateStackError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The stack ID.</p>
113    pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.stack_id(input.into());
115        self
116    }
117    /// <p>The stack ID.</p>
118    pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_stack_id(input);
120        self
121    }
122    /// <p>The stack ID.</p>
123    pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_stack_id()
125    }
126    /// <p>The stack's new name. Stack names can be a maximum of 64 characters.</p>
127    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.name(input.into());
129        self
130    }
131    /// <p>The stack's new name. Stack names can be a maximum of 64 characters.</p>
132    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_name(input);
134        self
135    }
136    /// <p>The stack's new name. Stack names can be a maximum of 64 characters.</p>
137    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_name()
139    }
140    ///
141    /// Adds a key-value pair to `Attributes`.
142    ///
143    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
144    ///
145    /// <p>One or more user-defined key-value pairs to be added to the stack attributes.</p>
146    pub fn attributes(mut self, k: crate::types::StackAttributesKeys, v: impl ::std::convert::Into<::std::string::String>) -> Self {
147        self.inner = self.inner.attributes(k, v.into());
148        self
149    }
150    /// <p>One or more user-defined key-value pairs to be added to the stack attributes.</p>
151    pub fn set_attributes(
152        mut self,
153        input: ::std::option::Option<::std::collections::HashMap<crate::types::StackAttributesKeys, ::std::string::String>>,
154    ) -> Self {
155        self.inner = self.inner.set_attributes(input);
156        self
157    }
158    /// <p>One or more user-defined key-value pairs to be added to the stack attributes.</p>
159    pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<crate::types::StackAttributesKeys, ::std::string::String>> {
160        self.inner.get_attributes()
161    }
162    /// <p>Do not use this parameter. You cannot update a stack's service role.</p>
163    pub fn service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.inner = self.inner.service_role_arn(input.into());
165        self
166    }
167    /// <p>Do not use this parameter. You cannot update a stack's service role.</p>
168    pub fn set_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.inner = self.inner.set_service_role_arn(input);
170        self
171    }
172    /// <p>Do not use this parameter. You cannot update a stack's service role.</p>
173    pub fn get_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
174        self.inner.get_service_role_arn()
175    }
176    /// <p>The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.</p>
177    pub fn default_instance_profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.inner = self.inner.default_instance_profile_arn(input.into());
179        self
180    }
181    /// <p>The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.</p>
182    pub fn set_default_instance_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183        self.inner = self.inner.set_default_instance_profile_arn(input);
184        self
185    }
186    /// <p>The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.</p>
187    pub fn get_default_instance_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
188        self.inner.get_default_instance_profile_arn()
189    }
190    /// <p>The stack's operating system, which must be set to one of the following:</p>
191    /// <ul>
192    /// <li>
193    /// <p>A supported Linux operating system: An Amazon Linux version, such as <code>Amazon Linux 2</code>, <code>Amazon Linux 2018.03</code>, <code>Amazon Linux 2017.09</code>, <code>Amazon Linux 2017.03</code>, <code>Amazon Linux 2016.09</code>, <code>Amazon Linux 2016.03</code>, <code>Amazon Linux 2015.09</code>, or <code>Amazon Linux 2015.03</code>.</p></li>
194    /// <li>
195    /// <p>A supported Ubuntu operating system, such as <code>Ubuntu 18.04 LTS</code>, <code>Ubuntu 16.04 LTS</code>, <code>Ubuntu 14.04 LTS</code>, or <code>Ubuntu 12.04 LTS</code>.</p></li>
196    /// <li>
197    /// <p><code>CentOS Linux 7</code></p></li>
198    /// <li>
199    /// <p><code>Red Hat Enterprise Linux 7</code></p></li>
200    /// <li>
201    /// <p>A supported Windows operating system, such as <code>Microsoft Windows Server 2012 R2 Base</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Express</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Standard</code>, or <code>Microsoft Windows Server 2012 R2 with SQL Server Web</code>.</p></li>
202    /// <li>
203    /// <p>A custom AMI: <code>Custom</code>. You specify the custom AMI you want to use when you create instances. For more information about how to use custom AMIs with OpsWorks, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p></li>
204    /// </ul>
205    /// <p>The default option is the stack's current operating system. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html">OpsWorks Stacks Operating Systems</a>.</p>
206    pub fn default_os(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207        self.inner = self.inner.default_os(input.into());
208        self
209    }
210    /// <p>The stack's operating system, which must be set to one of the following:</p>
211    /// <ul>
212    /// <li>
213    /// <p>A supported Linux operating system: An Amazon Linux version, such as <code>Amazon Linux 2</code>, <code>Amazon Linux 2018.03</code>, <code>Amazon Linux 2017.09</code>, <code>Amazon Linux 2017.03</code>, <code>Amazon Linux 2016.09</code>, <code>Amazon Linux 2016.03</code>, <code>Amazon Linux 2015.09</code>, or <code>Amazon Linux 2015.03</code>.</p></li>
214    /// <li>
215    /// <p>A supported Ubuntu operating system, such as <code>Ubuntu 18.04 LTS</code>, <code>Ubuntu 16.04 LTS</code>, <code>Ubuntu 14.04 LTS</code>, or <code>Ubuntu 12.04 LTS</code>.</p></li>
216    /// <li>
217    /// <p><code>CentOS Linux 7</code></p></li>
218    /// <li>
219    /// <p><code>Red Hat Enterprise Linux 7</code></p></li>
220    /// <li>
221    /// <p>A supported Windows operating system, such as <code>Microsoft Windows Server 2012 R2 Base</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Express</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Standard</code>, or <code>Microsoft Windows Server 2012 R2 with SQL Server Web</code>.</p></li>
222    /// <li>
223    /// <p>A custom AMI: <code>Custom</code>. You specify the custom AMI you want to use when you create instances. For more information about how to use custom AMIs with OpsWorks, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p></li>
224    /// </ul>
225    /// <p>The default option is the stack's current operating system. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html">OpsWorks Stacks Operating Systems</a>.</p>
226    pub fn set_default_os(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.inner = self.inner.set_default_os(input);
228        self
229    }
230    /// <p>The stack's operating system, which must be set to one of the following:</p>
231    /// <ul>
232    /// <li>
233    /// <p>A supported Linux operating system: An Amazon Linux version, such as <code>Amazon Linux 2</code>, <code>Amazon Linux 2018.03</code>, <code>Amazon Linux 2017.09</code>, <code>Amazon Linux 2017.03</code>, <code>Amazon Linux 2016.09</code>, <code>Amazon Linux 2016.03</code>, <code>Amazon Linux 2015.09</code>, or <code>Amazon Linux 2015.03</code>.</p></li>
234    /// <li>
235    /// <p>A supported Ubuntu operating system, such as <code>Ubuntu 18.04 LTS</code>, <code>Ubuntu 16.04 LTS</code>, <code>Ubuntu 14.04 LTS</code>, or <code>Ubuntu 12.04 LTS</code>.</p></li>
236    /// <li>
237    /// <p><code>CentOS Linux 7</code></p></li>
238    /// <li>
239    /// <p><code>Red Hat Enterprise Linux 7</code></p></li>
240    /// <li>
241    /// <p>A supported Windows operating system, such as <code>Microsoft Windows Server 2012 R2 Base</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Express</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Standard</code>, or <code>Microsoft Windows Server 2012 R2 with SQL Server Web</code>.</p></li>
242    /// <li>
243    /// <p>A custom AMI: <code>Custom</code>. You specify the custom AMI you want to use when you create instances. For more information about how to use custom AMIs with OpsWorks, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p></li>
244    /// </ul>
245    /// <p>The default option is the stack's current operating system. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html">OpsWorks Stacks Operating Systems</a>.</p>
246    pub fn get_default_os(&self) -> &::std::option::Option<::std::string::String> {
247        self.inner.get_default_os()
248    }
249    /// <p>The stack's new host name theme, with spaces replaced by underscores. The theme is used to generate host names for the stack's instances. By default, <code>HostnameTheme</code> is set to <code>Layer_Dependent</code>, which creates host names by appending integers to the layer's short name. The other themes are:</p>
250    /// <ul>
251    /// <li>
252    /// <p><code>Baked_Goods</code></p></li>
253    /// <li>
254    /// <p><code>Clouds</code></p></li>
255    /// <li>
256    /// <p><code>Europe_Cities</code></p></li>
257    /// <li>
258    /// <p><code>Fruits</code></p></li>
259    /// <li>
260    /// <p><code>Greek_Deities_and_Titans</code></p></li>
261    /// <li>
262    /// <p><code>Legendary_creatures_from_Japan</code></p></li>
263    /// <li>
264    /// <p><code>Planets_and_Moons</code></p></li>
265    /// <li>
266    /// <p><code>Roman_Deities</code></p></li>
267    /// <li>
268    /// <p><code>Scottish_Islands</code></p></li>
269    /// <li>
270    /// <p><code>US_Cities</code></p></li>
271    /// <li>
272    /// <p><code>Wild_Cats</code></p></li>
273    /// </ul>
274    /// <p>To obtain a generated host name, call <code>GetHostNameSuggestion</code>, which returns a host name based on the current theme.</p>
275    pub fn hostname_theme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
276        self.inner = self.inner.hostname_theme(input.into());
277        self
278    }
279    /// <p>The stack's new host name theme, with spaces replaced by underscores. The theme is used to generate host names for the stack's instances. By default, <code>HostnameTheme</code> is set to <code>Layer_Dependent</code>, which creates host names by appending integers to the layer's short name. The other themes are:</p>
280    /// <ul>
281    /// <li>
282    /// <p><code>Baked_Goods</code></p></li>
283    /// <li>
284    /// <p><code>Clouds</code></p></li>
285    /// <li>
286    /// <p><code>Europe_Cities</code></p></li>
287    /// <li>
288    /// <p><code>Fruits</code></p></li>
289    /// <li>
290    /// <p><code>Greek_Deities_and_Titans</code></p></li>
291    /// <li>
292    /// <p><code>Legendary_creatures_from_Japan</code></p></li>
293    /// <li>
294    /// <p><code>Planets_and_Moons</code></p></li>
295    /// <li>
296    /// <p><code>Roman_Deities</code></p></li>
297    /// <li>
298    /// <p><code>Scottish_Islands</code></p></li>
299    /// <li>
300    /// <p><code>US_Cities</code></p></li>
301    /// <li>
302    /// <p><code>Wild_Cats</code></p></li>
303    /// </ul>
304    /// <p>To obtain a generated host name, call <code>GetHostNameSuggestion</code>, which returns a host name based on the current theme.</p>
305    pub fn set_hostname_theme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
306        self.inner = self.inner.set_hostname_theme(input);
307        self
308    }
309    /// <p>The stack's new host name theme, with spaces replaced by underscores. The theme is used to generate host names for the stack's instances. By default, <code>HostnameTheme</code> is set to <code>Layer_Dependent</code>, which creates host names by appending integers to the layer's short name. The other themes are:</p>
310    /// <ul>
311    /// <li>
312    /// <p><code>Baked_Goods</code></p></li>
313    /// <li>
314    /// <p><code>Clouds</code></p></li>
315    /// <li>
316    /// <p><code>Europe_Cities</code></p></li>
317    /// <li>
318    /// <p><code>Fruits</code></p></li>
319    /// <li>
320    /// <p><code>Greek_Deities_and_Titans</code></p></li>
321    /// <li>
322    /// <p><code>Legendary_creatures_from_Japan</code></p></li>
323    /// <li>
324    /// <p><code>Planets_and_Moons</code></p></li>
325    /// <li>
326    /// <p><code>Roman_Deities</code></p></li>
327    /// <li>
328    /// <p><code>Scottish_Islands</code></p></li>
329    /// <li>
330    /// <p><code>US_Cities</code></p></li>
331    /// <li>
332    /// <p><code>Wild_Cats</code></p></li>
333    /// </ul>
334    /// <p>To obtain a generated host name, call <code>GetHostNameSuggestion</code>, which returns a host name based on the current theme.</p>
335    pub fn get_hostname_theme(&self) -> &::std::option::Option<::std::string::String> {
336        self.inner.get_hostname_theme()
337    }
338    /// <p>The stack's default Availability Zone, which must be in the stack's region. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>. If you also specify a value for <code>DefaultSubnetId</code>, the subnet must be in the same zone. For more information, see <code>CreateStack</code>.</p>
339    pub fn default_availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
340        self.inner = self.inner.default_availability_zone(input.into());
341        self
342    }
343    /// <p>The stack's default Availability Zone, which must be in the stack's region. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>. If you also specify a value for <code>DefaultSubnetId</code>, the subnet must be in the same zone. For more information, see <code>CreateStack</code>.</p>
344    pub fn set_default_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
345        self.inner = self.inner.set_default_availability_zone(input);
346        self
347    }
348    /// <p>The stack's default Availability Zone, which must be in the stack's region. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>. If you also specify a value for <code>DefaultSubnetId</code>, the subnet must be in the same zone. For more information, see <code>CreateStack</code>.</p>
349    pub fn get_default_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
350        self.inner.get_default_availability_zone()
351    }
352    /// <p>The stack's default VPC subnet ID. This parameter is required if you specify a value for the <code>VpcId</code> parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for <code>DefaultAvailabilityZone</code>, the subnet must be in that zone. For information on default values and when this parameter is required, see the <code>VpcId</code> parameter description.</p>
353    pub fn default_subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
354        self.inner = self.inner.default_subnet_id(input.into());
355        self
356    }
357    /// <p>The stack's default VPC subnet ID. This parameter is required if you specify a value for the <code>VpcId</code> parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for <code>DefaultAvailabilityZone</code>, the subnet must be in that zone. For information on default values and when this parameter is required, see the <code>VpcId</code> parameter description.</p>
358    pub fn set_default_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
359        self.inner = self.inner.set_default_subnet_id(input);
360        self
361    }
362    /// <p>The stack's default VPC subnet ID. This parameter is required if you specify a value for the <code>VpcId</code> parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for <code>DefaultAvailabilityZone</code>, the subnet must be in that zone. For information on default values and when this parameter is required, see the <code>VpcId</code> parameter description.</p>
363    pub fn get_default_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
364        self.inner.get_default_subnet_id()
365    }
366    /// <p>A string that contains user-defined, custom JSON. It can be used to override the corresponding default stack configuration JSON values or to pass data to recipes. The string should be in the following format:</p>
367    /// <p><code>"{\"key1\": \"value1\", \"key2\": \"value2\",...}"</code></p>
368    /// <p>For more information about custom JSON, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html">Use Custom JSON to Modify the Stack Configuration Attributes</a>.</p>
369    pub fn custom_json(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
370        self.inner = self.inner.custom_json(input.into());
371        self
372    }
373    /// <p>A string that contains user-defined, custom JSON. It can be used to override the corresponding default stack configuration JSON values or to pass data to recipes. The string should be in the following format:</p>
374    /// <p><code>"{\"key1\": \"value1\", \"key2\": \"value2\",...}"</code></p>
375    /// <p>For more information about custom JSON, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html">Use Custom JSON to Modify the Stack Configuration Attributes</a>.</p>
376    pub fn set_custom_json(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
377        self.inner = self.inner.set_custom_json(input);
378        self
379    }
380    /// <p>A string that contains user-defined, custom JSON. It can be used to override the corresponding default stack configuration JSON values or to pass data to recipes. The string should be in the following format:</p>
381    /// <p><code>"{\"key1\": \"value1\", \"key2\": \"value2\",...}"</code></p>
382    /// <p>For more information about custom JSON, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html">Use Custom JSON to Modify the Stack Configuration Attributes</a>.</p>
383    pub fn get_custom_json(&self) -> &::std::option::Option<::std::string::String> {
384        self.inner.get_custom_json()
385    }
386    /// <p>The configuration manager. When you update a stack, we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.</p>
387    pub fn configuration_manager(mut self, input: crate::types::StackConfigurationManager) -> Self {
388        self.inner = self.inner.configuration_manager(input);
389        self
390    }
391    /// <p>The configuration manager. When you update a stack, we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.</p>
392    pub fn set_configuration_manager(mut self, input: ::std::option::Option<crate::types::StackConfigurationManager>) -> Self {
393        self.inner = self.inner.set_configuration_manager(input);
394        self
395    }
396    /// <p>The configuration manager. When you update a stack, we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.</p>
397    pub fn get_configuration_manager(&self) -> &::std::option::Option<crate::types::StackConfigurationManager> {
398        self.inner.get_configuration_manager()
399    }
400    /// <p>A <code>ChefConfiguration</code> object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html">Create a New Stack</a>.</p>
401    pub fn chef_configuration(mut self, input: crate::types::ChefConfiguration) -> Self {
402        self.inner = self.inner.chef_configuration(input);
403        self
404    }
405    /// <p>A <code>ChefConfiguration</code> object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html">Create a New Stack</a>.</p>
406    pub fn set_chef_configuration(mut self, input: ::std::option::Option<crate::types::ChefConfiguration>) -> Self {
407        self.inner = self.inner.set_chef_configuration(input);
408        self
409    }
410    /// <p>A <code>ChefConfiguration</code> object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html">Create a New Stack</a>.</p>
411    pub fn get_chef_configuration(&self) -> &::std::option::Option<crate::types::ChefConfiguration> {
412        self.inner.get_chef_configuration()
413    }
414    /// <p>Whether the stack uses custom cookbooks.</p>
415    pub fn use_custom_cookbooks(mut self, input: bool) -> Self {
416        self.inner = self.inner.use_custom_cookbooks(input);
417        self
418    }
419    /// <p>Whether the stack uses custom cookbooks.</p>
420    pub fn set_use_custom_cookbooks(mut self, input: ::std::option::Option<bool>) -> Self {
421        self.inner = self.inner.set_use_custom_cookbooks(input);
422        self
423    }
424    /// <p>Whether the stack uses custom cookbooks.</p>
425    pub fn get_use_custom_cookbooks(&self) -> &::std::option::Option<bool> {
426        self.inner.get_use_custom_cookbooks()
427    }
428    /// <p>Contains the information required to retrieve an app or cookbook from a repository. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html">Adding Apps</a> or <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html">Cookbooks and Recipes</a>.</p>
429    pub fn custom_cookbooks_source(mut self, input: crate::types::Source) -> Self {
430        self.inner = self.inner.custom_cookbooks_source(input);
431        self
432    }
433    /// <p>Contains the information required to retrieve an app or cookbook from a repository. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html">Adding Apps</a> or <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html">Cookbooks and Recipes</a>.</p>
434    pub fn set_custom_cookbooks_source(mut self, input: ::std::option::Option<crate::types::Source>) -> Self {
435        self.inner = self.inner.set_custom_cookbooks_source(input);
436        self
437    }
438    /// <p>Contains the information required to retrieve an app or cookbook from a repository. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html">Adding Apps</a> or <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html">Cookbooks and Recipes</a>.</p>
439    pub fn get_custom_cookbooks_source(&self) -> &::std::option::Option<crate::types::Source> {
440        self.inner.get_custom_cookbooks_source()
441    }
442    /// <p>A default Amazon EC2 key-pair name. The default value is <code>none</code>. If you specify a key-pair name, OpsWorks Stacks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html"> Using SSH to Communicate with an Instance</a> and <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html"> Managing SSH Access</a>. You can override this setting by specifying a different key pair, or no key pair, when you <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html"> create an instance</a>.</p>
443    pub fn default_ssh_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
444        self.inner = self.inner.default_ssh_key_name(input.into());
445        self
446    }
447    /// <p>A default Amazon EC2 key-pair name. The default value is <code>none</code>. If you specify a key-pair name, OpsWorks Stacks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html"> Using SSH to Communicate with an Instance</a> and <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html"> Managing SSH Access</a>. You can override this setting by specifying a different key pair, or no key pair, when you <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html"> create an instance</a>.</p>
448    pub fn set_default_ssh_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
449        self.inner = self.inner.set_default_ssh_key_name(input);
450        self
451    }
452    /// <p>A default Amazon EC2 key-pair name. The default value is <code>none</code>. If you specify a key-pair name, OpsWorks Stacks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html"> Using SSH to Communicate with an Instance</a> and <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html"> Managing SSH Access</a>. You can override this setting by specifying a different key pair, or no key pair, when you <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html"> create an instance</a>.</p>
453    pub fn get_default_ssh_key_name(&self) -> &::std::option::Option<::std::string::String> {
454        self.inner.get_default_ssh_key_name()
455    }
456    /// <p>The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
457    pub fn default_root_device_type(mut self, input: crate::types::RootDeviceType) -> Self {
458        self.inner = self.inner.default_root_device_type(input);
459        self
460    }
461    /// <p>The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
462    pub fn set_default_root_device_type(mut self, input: ::std::option::Option<crate::types::RootDeviceType>) -> Self {
463        self.inner = self.inner.set_default_root_device_type(input);
464        self
465    }
466    /// <p>The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
467    pub fn get_default_root_device_type(&self) -> &::std::option::Option<crate::types::RootDeviceType> {
468        self.inner.get_default_root_device_type()
469    }
470    /// <p>Whether to associate the OpsWorks Stacks built-in security groups with the stack's layers.</p>
471    /// <p>OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are associated with layers by default. <code>UseOpsworksSecurityGroups</code> allows you to provide your own custom security groups instead of using the built-in groups. <code>UseOpsworksSecurityGroups</code> has the following settings:</p>
472    /// <ul>
473    /// <li>
474    /// <p>True - OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it, but you cannot delete the built-in security group.</p></li>
475    /// <li>
476    /// <p>False - OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate EC2 security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on. Custom security groups are required only for those layers that need custom settings.</p></li>
477    /// </ul>
478    /// <p>For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html">Create a New Stack</a>.</p>
479    pub fn use_opsworks_security_groups(mut self, input: bool) -> Self {
480        self.inner = self.inner.use_opsworks_security_groups(input);
481        self
482    }
483    /// <p>Whether to associate the OpsWorks Stacks built-in security groups with the stack's layers.</p>
484    /// <p>OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are associated with layers by default. <code>UseOpsworksSecurityGroups</code> allows you to provide your own custom security groups instead of using the built-in groups. <code>UseOpsworksSecurityGroups</code> has the following settings:</p>
485    /// <ul>
486    /// <li>
487    /// <p>True - OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it, but you cannot delete the built-in security group.</p></li>
488    /// <li>
489    /// <p>False - OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate EC2 security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on. Custom security groups are required only for those layers that need custom settings.</p></li>
490    /// </ul>
491    /// <p>For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html">Create a New Stack</a>.</p>
492    pub fn set_use_opsworks_security_groups(mut self, input: ::std::option::Option<bool>) -> Self {
493        self.inner = self.inner.set_use_opsworks_security_groups(input);
494        self
495    }
496    /// <p>Whether to associate the OpsWorks Stacks built-in security groups with the stack's layers.</p>
497    /// <p>OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are associated with layers by default. <code>UseOpsworksSecurityGroups</code> allows you to provide your own custom security groups instead of using the built-in groups. <code>UseOpsworksSecurityGroups</code> has the following settings:</p>
498    /// <ul>
499    /// <li>
500    /// <p>True - OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it, but you cannot delete the built-in security group.</p></li>
501    /// <li>
502    /// <p>False - OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate EC2 security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on. Custom security groups are required only for those layers that need custom settings.</p></li>
503    /// </ul>
504    /// <p>For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html">Create a New Stack</a>.</p>
505    pub fn get_use_opsworks_security_groups(&self) -> &::std::option::Option<bool> {
506        self.inner.get_use_opsworks_security_groups()
507    }
508    /// <p>The default OpsWorks Stacks agent version. You have the following options:</p>
509    /// <ul>
510    /// <li>
511    /// <p>Auto-update - Set this parameter to <code>LATEST</code>. OpsWorks Stacks automatically installs new agent versions on the stack's instances as soon as they are available.</p></li>
512    /// <li>
513    /// <p>Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. OpsWorks Stacks installs that version on the stack's instances.</p></li>
514    /// </ul>
515    /// <p>The default setting is <code>LATEST</code>. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call <code>DescribeAgentVersions</code>. AgentVersion cannot be set to Chef 12.2.</p><note>
516    /// <p>You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.</p>
517    /// </note>
518    pub fn agent_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
519        self.inner = self.inner.agent_version(input.into());
520        self
521    }
522    /// <p>The default OpsWorks Stacks agent version. You have the following options:</p>
523    /// <ul>
524    /// <li>
525    /// <p>Auto-update - Set this parameter to <code>LATEST</code>. OpsWorks Stacks automatically installs new agent versions on the stack's instances as soon as they are available.</p></li>
526    /// <li>
527    /// <p>Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. OpsWorks Stacks installs that version on the stack's instances.</p></li>
528    /// </ul>
529    /// <p>The default setting is <code>LATEST</code>. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call <code>DescribeAgentVersions</code>. AgentVersion cannot be set to Chef 12.2.</p><note>
530    /// <p>You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.</p>
531    /// </note>
532    pub fn set_agent_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
533        self.inner = self.inner.set_agent_version(input);
534        self
535    }
536    /// <p>The default OpsWorks Stacks agent version. You have the following options:</p>
537    /// <ul>
538    /// <li>
539    /// <p>Auto-update - Set this parameter to <code>LATEST</code>. OpsWorks Stacks automatically installs new agent versions on the stack's instances as soon as they are available.</p></li>
540    /// <li>
541    /// <p>Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. OpsWorks Stacks installs that version on the stack's instances.</p></li>
542    /// </ul>
543    /// <p>The default setting is <code>LATEST</code>. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call <code>DescribeAgentVersions</code>. AgentVersion cannot be set to Chef 12.2.</p><note>
544    /// <p>You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.</p>
545    /// </note>
546    pub fn get_agent_version(&self) -> &::std::option::Option<::std::string::String> {
547        self.inner.get_agent_version()
548    }
549}