aws_sdk_cloudformation/types/_stack.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The Stack data type.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Stack {
7 /// <p>Unique identifier of the stack.</p>
8 pub stack_id: ::std::option::Option<::std::string::String>,
9 /// <p>The name associated with the stack.</p>
10 pub stack_name: ::std::option::Option<::std::string::String>,
11 /// <p>The unique ID of the change set.</p>
12 pub change_set_id: ::std::option::Option<::std::string::String>,
13 /// <p>A user-defined description associated with the stack.</p>
14 pub description: ::std::option::Option<::std::string::String>,
15 /// <p>A list of <code>Parameter</code> structures.</p>
16 pub parameters: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>,
17 /// <p>The time at which the stack was created.</p>
18 pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
19 /// <p>The time the stack was deleted.</p>
20 pub deletion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21 /// <p>The time the stack was last updated. This field will only be returned if the stack has been updated at least once.</p>
22 pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
23 /// <p>The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.</p>
24 pub rollback_configuration: ::std::option::Option<crate::types::RollbackConfiguration>,
25 /// <p>Current status of the stack.</p>
26 pub stack_status: ::std::option::Option<crate::types::StackStatus>,
27 /// <p>Success/failure message associated with the stack status.</p>
28 pub stack_status_reason: ::std::option::Option<::std::string::String>,
29 /// <p>Boolean to enable or disable rollback on stack creation failures:</p>
30 /// <ul>
31 /// <li>
32 /// <p><code>true</code>: disable rollback.</p></li>
33 /// <li>
34 /// <p><code>false</code>: enable rollback.</p></li>
35 /// </ul>
36 pub disable_rollback: ::std::option::Option<bool>,
37 /// <p>Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.</p>
38 pub notification_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
39 /// <p>The amount of time within which stack creation should complete.</p>
40 pub timeout_in_minutes: ::std::option::Option<i32>,
41 /// <p>The capabilities allowed in the stack.</p>
42 pub capabilities: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>,
43 /// <p>A list of output structures.</p>
44 pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::Output>>,
45 /// <p>The Amazon Resource Name (ARN) of an IAM role that's associated with the stack. During a stack operation, CloudFormation uses this role's credentials to make calls on your behalf.</p>
46 pub role_arn: ::std::option::Option<::std::string::String>,
47 /// <p>A list of <code>Tag</code>s that specify information about the stack.</p>
48 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
49 /// <p>Whether termination protection is enabled for the stack.</p>
50 /// <p>For <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">nested stacks</a>, termination protection is set on the root stack and can't be changed directly on the nested stack. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html">Protect a CloudFormation stack from being deleted</a> in the <i>CloudFormation User Guide</i>.</p>
51 pub enable_termination_protection: ::std::option::Option<bool>,
52 /// <p>For nested stacks, the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.</p>
53 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
54 pub parent_id: ::std::option::Option<::std::string::String>,
55 /// <p>For nested stacks, the stack ID of the top-level stack to which the nested stack ultimately belongs.</p>
56 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
57 pub root_id: ::std::option::Option<::std::string::String>,
58 /// <p>Information about whether a stack's actual configuration differs, or has <i>drifted</i>, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detect unmanaged configuration changes to stacks and resources with drift detection</a>.</p>
59 pub drift_information: ::std::option::Option<crate::types::StackDriftInformation>,
60 /// <p>When set to <code>true</code>, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy of <code>Retain</code>.</p>
61 /// <p>Default: <code>false</code></p>
62 pub retain_except_on_create: ::std::option::Option<bool>,
63 /// <p>Specifies the deletion mode for the stack. Possible values are:</p>
64 /// <ul>
65 /// <li>
66 /// <p><code>STANDARD</code> - Use the standard behavior. Specifying this value is the same as not specifying this parameter.</p></li>
67 /// <li>
68 /// <p><code>FORCE_DELETE_STACK</code> - Delete the stack if it's stuck in a <code>DELETE_FAILED</code> state due to resource deletion failure.</p></li>
69 /// </ul>
70 pub deletion_mode: ::std::option::Option<crate::types::DeletionMode>,
71 /// <p>The detailed status of the resource or stack. If <code>CONFIGURATION_COMPLETE</code> is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack sets <code>CONFIGURATION_COMPLETE</code> when all of the resources in the stack have reached that event. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html">Understand CloudFormation stack creation events</a> in the <i>CloudFormation User Guide</i>.</p>
72 pub detailed_status: ::std::option::Option<crate::types::DetailedStatus>,
73}
74impl Stack {
75 /// <p>Unique identifier of the stack.</p>
76 pub fn stack_id(&self) -> ::std::option::Option<&str> {
77 self.stack_id.as_deref()
78 }
79 /// <p>The name associated with the stack.</p>
80 pub fn stack_name(&self) -> ::std::option::Option<&str> {
81 self.stack_name.as_deref()
82 }
83 /// <p>The unique ID of the change set.</p>
84 pub fn change_set_id(&self) -> ::std::option::Option<&str> {
85 self.change_set_id.as_deref()
86 }
87 /// <p>A user-defined description associated with the stack.</p>
88 pub fn description(&self) -> ::std::option::Option<&str> {
89 self.description.as_deref()
90 }
91 /// <p>A list of <code>Parameter</code> structures.</p>
92 ///
93 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameters.is_none()`.
94 pub fn parameters(&self) -> &[crate::types::Parameter] {
95 self.parameters.as_deref().unwrap_or_default()
96 }
97 /// <p>The time at which the stack was created.</p>
98 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
99 self.creation_time.as_ref()
100 }
101 /// <p>The time the stack was deleted.</p>
102 pub fn deletion_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
103 self.deletion_time.as_ref()
104 }
105 /// <p>The time the stack was last updated. This field will only be returned if the stack has been updated at least once.</p>
106 pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
107 self.last_updated_time.as_ref()
108 }
109 /// <p>The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.</p>
110 pub fn rollback_configuration(&self) -> ::std::option::Option<&crate::types::RollbackConfiguration> {
111 self.rollback_configuration.as_ref()
112 }
113 /// <p>Current status of the stack.</p>
114 pub fn stack_status(&self) -> ::std::option::Option<&crate::types::StackStatus> {
115 self.stack_status.as_ref()
116 }
117 /// <p>Success/failure message associated with the stack status.</p>
118 pub fn stack_status_reason(&self) -> ::std::option::Option<&str> {
119 self.stack_status_reason.as_deref()
120 }
121 /// <p>Boolean to enable or disable rollback on stack creation failures:</p>
122 /// <ul>
123 /// <li>
124 /// <p><code>true</code>: disable rollback.</p></li>
125 /// <li>
126 /// <p><code>false</code>: enable rollback.</p></li>
127 /// </ul>
128 pub fn disable_rollback(&self) -> ::std::option::Option<bool> {
129 self.disable_rollback
130 }
131 /// <p>Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.</p>
132 ///
133 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.notification_arns.is_none()`.
134 pub fn notification_arns(&self) -> &[::std::string::String] {
135 self.notification_arns.as_deref().unwrap_or_default()
136 }
137 /// <p>The amount of time within which stack creation should complete.</p>
138 pub fn timeout_in_minutes(&self) -> ::std::option::Option<i32> {
139 self.timeout_in_minutes
140 }
141 /// <p>The capabilities allowed in the stack.</p>
142 ///
143 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capabilities.is_none()`.
144 pub fn capabilities(&self) -> &[crate::types::Capability] {
145 self.capabilities.as_deref().unwrap_or_default()
146 }
147 /// <p>A list of output structures.</p>
148 ///
149 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.outputs.is_none()`.
150 pub fn outputs(&self) -> &[crate::types::Output] {
151 self.outputs.as_deref().unwrap_or_default()
152 }
153 /// <p>The Amazon Resource Name (ARN) of an IAM role that's associated with the stack. During a stack operation, CloudFormation uses this role's credentials to make calls on your behalf.</p>
154 pub fn role_arn(&self) -> ::std::option::Option<&str> {
155 self.role_arn.as_deref()
156 }
157 /// <p>A list of <code>Tag</code>s that specify information about the stack.</p>
158 ///
159 /// 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()`.
160 pub fn tags(&self) -> &[crate::types::Tag] {
161 self.tags.as_deref().unwrap_or_default()
162 }
163 /// <p>Whether termination protection is enabled for the stack.</p>
164 /// <p>For <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">nested stacks</a>, termination protection is set on the root stack and can't be changed directly on the nested stack. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html">Protect a CloudFormation stack from being deleted</a> in the <i>CloudFormation User Guide</i>.</p>
165 pub fn enable_termination_protection(&self) -> ::std::option::Option<bool> {
166 self.enable_termination_protection
167 }
168 /// <p>For nested stacks, the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.</p>
169 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
170 pub fn parent_id(&self) -> ::std::option::Option<&str> {
171 self.parent_id.as_deref()
172 }
173 /// <p>For nested stacks, the stack ID of the top-level stack to which the nested stack ultimately belongs.</p>
174 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
175 pub fn root_id(&self) -> ::std::option::Option<&str> {
176 self.root_id.as_deref()
177 }
178 /// <p>Information about whether a stack's actual configuration differs, or has <i>drifted</i>, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detect unmanaged configuration changes to stacks and resources with drift detection</a>.</p>
179 pub fn drift_information(&self) -> ::std::option::Option<&crate::types::StackDriftInformation> {
180 self.drift_information.as_ref()
181 }
182 /// <p>When set to <code>true</code>, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy of <code>Retain</code>.</p>
183 /// <p>Default: <code>false</code></p>
184 pub fn retain_except_on_create(&self) -> ::std::option::Option<bool> {
185 self.retain_except_on_create
186 }
187 /// <p>Specifies the deletion mode for the stack. Possible values are:</p>
188 /// <ul>
189 /// <li>
190 /// <p><code>STANDARD</code> - Use the standard behavior. Specifying this value is the same as not specifying this parameter.</p></li>
191 /// <li>
192 /// <p><code>FORCE_DELETE_STACK</code> - Delete the stack if it's stuck in a <code>DELETE_FAILED</code> state due to resource deletion failure.</p></li>
193 /// </ul>
194 pub fn deletion_mode(&self) -> ::std::option::Option<&crate::types::DeletionMode> {
195 self.deletion_mode.as_ref()
196 }
197 /// <p>The detailed status of the resource or stack. If <code>CONFIGURATION_COMPLETE</code> is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack sets <code>CONFIGURATION_COMPLETE</code> when all of the resources in the stack have reached that event. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html">Understand CloudFormation stack creation events</a> in the <i>CloudFormation User Guide</i>.</p>
198 pub fn detailed_status(&self) -> ::std::option::Option<&crate::types::DetailedStatus> {
199 self.detailed_status.as_ref()
200 }
201}
202impl Stack {
203 /// Creates a new builder-style object to manufacture [`Stack`](crate::types::Stack).
204 pub fn builder() -> crate::types::builders::StackBuilder {
205 crate::types::builders::StackBuilder::default()
206 }
207}
208
209/// A builder for [`Stack`](crate::types::Stack).
210#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
211#[non_exhaustive]
212pub struct StackBuilder {
213 pub(crate) stack_id: ::std::option::Option<::std::string::String>,
214 pub(crate) stack_name: ::std::option::Option<::std::string::String>,
215 pub(crate) change_set_id: ::std::option::Option<::std::string::String>,
216 pub(crate) description: ::std::option::Option<::std::string::String>,
217 pub(crate) parameters: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>,
218 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
219 pub(crate) deletion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
220 pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
221 pub(crate) rollback_configuration: ::std::option::Option<crate::types::RollbackConfiguration>,
222 pub(crate) stack_status: ::std::option::Option<crate::types::StackStatus>,
223 pub(crate) stack_status_reason: ::std::option::Option<::std::string::String>,
224 pub(crate) disable_rollback: ::std::option::Option<bool>,
225 pub(crate) notification_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
226 pub(crate) timeout_in_minutes: ::std::option::Option<i32>,
227 pub(crate) capabilities: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>,
228 pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::Output>>,
229 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
230 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
231 pub(crate) enable_termination_protection: ::std::option::Option<bool>,
232 pub(crate) parent_id: ::std::option::Option<::std::string::String>,
233 pub(crate) root_id: ::std::option::Option<::std::string::String>,
234 pub(crate) drift_information: ::std::option::Option<crate::types::StackDriftInformation>,
235 pub(crate) retain_except_on_create: ::std::option::Option<bool>,
236 pub(crate) deletion_mode: ::std::option::Option<crate::types::DeletionMode>,
237 pub(crate) detailed_status: ::std::option::Option<crate::types::DetailedStatus>,
238}
239impl StackBuilder {
240 /// <p>Unique identifier of the stack.</p>
241 pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242 self.stack_id = ::std::option::Option::Some(input.into());
243 self
244 }
245 /// <p>Unique identifier of the stack.</p>
246 pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
247 self.stack_id = input;
248 self
249 }
250 /// <p>Unique identifier of the stack.</p>
251 pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
252 &self.stack_id
253 }
254 /// <p>The name associated with the stack.</p>
255 /// This field is required.
256 pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
257 self.stack_name = ::std::option::Option::Some(input.into());
258 self
259 }
260 /// <p>The name associated with the stack.</p>
261 pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
262 self.stack_name = input;
263 self
264 }
265 /// <p>The name associated with the stack.</p>
266 pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
267 &self.stack_name
268 }
269 /// <p>The unique ID of the change set.</p>
270 pub fn change_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271 self.change_set_id = ::std::option::Option::Some(input.into());
272 self
273 }
274 /// <p>The unique ID of the change set.</p>
275 pub fn set_change_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
276 self.change_set_id = input;
277 self
278 }
279 /// <p>The unique ID of the change set.</p>
280 pub fn get_change_set_id(&self) -> &::std::option::Option<::std::string::String> {
281 &self.change_set_id
282 }
283 /// <p>A user-defined description associated with the stack.</p>
284 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
285 self.description = ::std::option::Option::Some(input.into());
286 self
287 }
288 /// <p>A user-defined description associated with the stack.</p>
289 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
290 self.description = input;
291 self
292 }
293 /// <p>A user-defined description associated with the stack.</p>
294 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
295 &self.description
296 }
297 /// Appends an item to `parameters`.
298 ///
299 /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
300 ///
301 /// <p>A list of <code>Parameter</code> structures.</p>
302 pub fn parameters(mut self, input: crate::types::Parameter) -> Self {
303 let mut v = self.parameters.unwrap_or_default();
304 v.push(input);
305 self.parameters = ::std::option::Option::Some(v);
306 self
307 }
308 /// <p>A list of <code>Parameter</code> structures.</p>
309 pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>) -> Self {
310 self.parameters = input;
311 self
312 }
313 /// <p>A list of <code>Parameter</code> structures.</p>
314 pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Parameter>> {
315 &self.parameters
316 }
317 /// <p>The time at which the stack was created.</p>
318 /// This field is required.
319 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
320 self.creation_time = ::std::option::Option::Some(input);
321 self
322 }
323 /// <p>The time at which the stack was created.</p>
324 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
325 self.creation_time = input;
326 self
327 }
328 /// <p>The time at which the stack was created.</p>
329 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
330 &self.creation_time
331 }
332 /// <p>The time the stack was deleted.</p>
333 pub fn deletion_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
334 self.deletion_time = ::std::option::Option::Some(input);
335 self
336 }
337 /// <p>The time the stack was deleted.</p>
338 pub fn set_deletion_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
339 self.deletion_time = input;
340 self
341 }
342 /// <p>The time the stack was deleted.</p>
343 pub fn get_deletion_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
344 &self.deletion_time
345 }
346 /// <p>The time the stack was last updated. This field will only be returned if the stack has been updated at least once.</p>
347 pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
348 self.last_updated_time = ::std::option::Option::Some(input);
349 self
350 }
351 /// <p>The time the stack was last updated. This field will only be returned if the stack has been updated at least once.</p>
352 pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
353 self.last_updated_time = input;
354 self
355 }
356 /// <p>The time the stack was last updated. This field will only be returned if the stack has been updated at least once.</p>
357 pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
358 &self.last_updated_time
359 }
360 /// <p>The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.</p>
361 pub fn rollback_configuration(mut self, input: crate::types::RollbackConfiguration) -> Self {
362 self.rollback_configuration = ::std::option::Option::Some(input);
363 self
364 }
365 /// <p>The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.</p>
366 pub fn set_rollback_configuration(mut self, input: ::std::option::Option<crate::types::RollbackConfiguration>) -> Self {
367 self.rollback_configuration = input;
368 self
369 }
370 /// <p>The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.</p>
371 pub fn get_rollback_configuration(&self) -> &::std::option::Option<crate::types::RollbackConfiguration> {
372 &self.rollback_configuration
373 }
374 /// <p>Current status of the stack.</p>
375 /// This field is required.
376 pub fn stack_status(mut self, input: crate::types::StackStatus) -> Self {
377 self.stack_status = ::std::option::Option::Some(input);
378 self
379 }
380 /// <p>Current status of the stack.</p>
381 pub fn set_stack_status(mut self, input: ::std::option::Option<crate::types::StackStatus>) -> Self {
382 self.stack_status = input;
383 self
384 }
385 /// <p>Current status of the stack.</p>
386 pub fn get_stack_status(&self) -> &::std::option::Option<crate::types::StackStatus> {
387 &self.stack_status
388 }
389 /// <p>Success/failure message associated with the stack status.</p>
390 pub fn stack_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
391 self.stack_status_reason = ::std::option::Option::Some(input.into());
392 self
393 }
394 /// <p>Success/failure message associated with the stack status.</p>
395 pub fn set_stack_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
396 self.stack_status_reason = input;
397 self
398 }
399 /// <p>Success/failure message associated with the stack status.</p>
400 pub fn get_stack_status_reason(&self) -> &::std::option::Option<::std::string::String> {
401 &self.stack_status_reason
402 }
403 /// <p>Boolean to enable or disable rollback on stack creation failures:</p>
404 /// <ul>
405 /// <li>
406 /// <p><code>true</code>: disable rollback.</p></li>
407 /// <li>
408 /// <p><code>false</code>: enable rollback.</p></li>
409 /// </ul>
410 pub fn disable_rollback(mut self, input: bool) -> Self {
411 self.disable_rollback = ::std::option::Option::Some(input);
412 self
413 }
414 /// <p>Boolean to enable or disable rollback on stack creation failures:</p>
415 /// <ul>
416 /// <li>
417 /// <p><code>true</code>: disable rollback.</p></li>
418 /// <li>
419 /// <p><code>false</code>: enable rollback.</p></li>
420 /// </ul>
421 pub fn set_disable_rollback(mut self, input: ::std::option::Option<bool>) -> Self {
422 self.disable_rollback = input;
423 self
424 }
425 /// <p>Boolean to enable or disable rollback on stack creation failures:</p>
426 /// <ul>
427 /// <li>
428 /// <p><code>true</code>: disable rollback.</p></li>
429 /// <li>
430 /// <p><code>false</code>: enable rollback.</p></li>
431 /// </ul>
432 pub fn get_disable_rollback(&self) -> &::std::option::Option<bool> {
433 &self.disable_rollback
434 }
435 /// Appends an item to `notification_arns`.
436 ///
437 /// To override the contents of this collection use [`set_notification_arns`](Self::set_notification_arns).
438 ///
439 /// <p>Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.</p>
440 pub fn notification_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
441 let mut v = self.notification_arns.unwrap_or_default();
442 v.push(input.into());
443 self.notification_arns = ::std::option::Option::Some(v);
444 self
445 }
446 /// <p>Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.</p>
447 pub fn set_notification_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
448 self.notification_arns = input;
449 self
450 }
451 /// <p>Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.</p>
452 pub fn get_notification_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
453 &self.notification_arns
454 }
455 /// <p>The amount of time within which stack creation should complete.</p>
456 pub fn timeout_in_minutes(mut self, input: i32) -> Self {
457 self.timeout_in_minutes = ::std::option::Option::Some(input);
458 self
459 }
460 /// <p>The amount of time within which stack creation should complete.</p>
461 pub fn set_timeout_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
462 self.timeout_in_minutes = input;
463 self
464 }
465 /// <p>The amount of time within which stack creation should complete.</p>
466 pub fn get_timeout_in_minutes(&self) -> &::std::option::Option<i32> {
467 &self.timeout_in_minutes
468 }
469 /// Appends an item to `capabilities`.
470 ///
471 /// To override the contents of this collection use [`set_capabilities`](Self::set_capabilities).
472 ///
473 /// <p>The capabilities allowed in the stack.</p>
474 pub fn capabilities(mut self, input: crate::types::Capability) -> Self {
475 let mut v = self.capabilities.unwrap_or_default();
476 v.push(input);
477 self.capabilities = ::std::option::Option::Some(v);
478 self
479 }
480 /// <p>The capabilities allowed in the stack.</p>
481 pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>) -> Self {
482 self.capabilities = input;
483 self
484 }
485 /// <p>The capabilities allowed in the stack.</p>
486 pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Capability>> {
487 &self.capabilities
488 }
489 /// Appends an item to `outputs`.
490 ///
491 /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
492 ///
493 /// <p>A list of output structures.</p>
494 pub fn outputs(mut self, input: crate::types::Output) -> Self {
495 let mut v = self.outputs.unwrap_or_default();
496 v.push(input);
497 self.outputs = ::std::option::Option::Some(v);
498 self
499 }
500 /// <p>A list of output structures.</p>
501 pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Output>>) -> Self {
502 self.outputs = input;
503 self
504 }
505 /// <p>A list of output structures.</p>
506 pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Output>> {
507 &self.outputs
508 }
509 /// <p>The Amazon Resource Name (ARN) of an IAM role that's associated with the stack. During a stack operation, CloudFormation uses this role's credentials to make calls on your behalf.</p>
510 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
511 self.role_arn = ::std::option::Option::Some(input.into());
512 self
513 }
514 /// <p>The Amazon Resource Name (ARN) of an IAM role that's associated with the stack. During a stack operation, CloudFormation uses this role's credentials to make calls on your behalf.</p>
515 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
516 self.role_arn = input;
517 self
518 }
519 /// <p>The Amazon Resource Name (ARN) of an IAM role that's associated with the stack. During a stack operation, CloudFormation uses this role's credentials to make calls on your behalf.</p>
520 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
521 &self.role_arn
522 }
523 /// Appends an item to `tags`.
524 ///
525 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
526 ///
527 /// <p>A list of <code>Tag</code>s that specify information about the stack.</p>
528 pub fn tags(mut self, input: crate::types::Tag) -> Self {
529 let mut v = self.tags.unwrap_or_default();
530 v.push(input);
531 self.tags = ::std::option::Option::Some(v);
532 self
533 }
534 /// <p>A list of <code>Tag</code>s that specify information about the stack.</p>
535 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
536 self.tags = input;
537 self
538 }
539 /// <p>A list of <code>Tag</code>s that specify information about the stack.</p>
540 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
541 &self.tags
542 }
543 /// <p>Whether termination protection is enabled for the stack.</p>
544 /// <p>For <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">nested stacks</a>, termination protection is set on the root stack and can't be changed directly on the nested stack. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html">Protect a CloudFormation stack from being deleted</a> in the <i>CloudFormation User Guide</i>.</p>
545 pub fn enable_termination_protection(mut self, input: bool) -> Self {
546 self.enable_termination_protection = ::std::option::Option::Some(input);
547 self
548 }
549 /// <p>Whether termination protection is enabled for the stack.</p>
550 /// <p>For <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">nested stacks</a>, termination protection is set on the root stack and can't be changed directly on the nested stack. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html">Protect a CloudFormation stack from being deleted</a> in the <i>CloudFormation User Guide</i>.</p>
551 pub fn set_enable_termination_protection(mut self, input: ::std::option::Option<bool>) -> Self {
552 self.enable_termination_protection = input;
553 self
554 }
555 /// <p>Whether termination protection is enabled for the stack.</p>
556 /// <p>For <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">nested stacks</a>, termination protection is set on the root stack and can't be changed directly on the nested stack. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html">Protect a CloudFormation stack from being deleted</a> in the <i>CloudFormation User Guide</i>.</p>
557 pub fn get_enable_termination_protection(&self) -> &::std::option::Option<bool> {
558 &self.enable_termination_protection
559 }
560 /// <p>For nested stacks, the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.</p>
561 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
562 pub fn parent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
563 self.parent_id = ::std::option::Option::Some(input.into());
564 self
565 }
566 /// <p>For nested stacks, the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.</p>
567 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
568 pub fn set_parent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
569 self.parent_id = input;
570 self
571 }
572 /// <p>For nested stacks, the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.</p>
573 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
574 pub fn get_parent_id(&self) -> &::std::option::Option<::std::string::String> {
575 &self.parent_id
576 }
577 /// <p>For nested stacks, the stack ID of the top-level stack to which the nested stack ultimately belongs.</p>
578 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
579 pub fn root_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
580 self.root_id = ::std::option::Option::Some(input.into());
581 self
582 }
583 /// <p>For nested stacks, the stack ID of the top-level stack to which the nested stack ultimately belongs.</p>
584 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
585 pub fn set_root_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
586 self.root_id = input;
587 self
588 }
589 /// <p>For nested stacks, the stack ID of the top-level stack to which the nested stack ultimately belongs.</p>
590 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested stacks</a> in the <i>CloudFormation User Guide</i>.</p>
591 pub fn get_root_id(&self) -> &::std::option::Option<::std::string::String> {
592 &self.root_id
593 }
594 /// <p>Information about whether a stack's actual configuration differs, or has <i>drifted</i>, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detect unmanaged configuration changes to stacks and resources with drift detection</a>.</p>
595 pub fn drift_information(mut self, input: crate::types::StackDriftInformation) -> Self {
596 self.drift_information = ::std::option::Option::Some(input);
597 self
598 }
599 /// <p>Information about whether a stack's actual configuration differs, or has <i>drifted</i>, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detect unmanaged configuration changes to stacks and resources with drift detection</a>.</p>
600 pub fn set_drift_information(mut self, input: ::std::option::Option<crate::types::StackDriftInformation>) -> Self {
601 self.drift_information = input;
602 self
603 }
604 /// <p>Information about whether a stack's actual configuration differs, or has <i>drifted</i>, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detect unmanaged configuration changes to stacks and resources with drift detection</a>.</p>
605 pub fn get_drift_information(&self) -> &::std::option::Option<crate::types::StackDriftInformation> {
606 &self.drift_information
607 }
608 /// <p>When set to <code>true</code>, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy of <code>Retain</code>.</p>
609 /// <p>Default: <code>false</code></p>
610 pub fn retain_except_on_create(mut self, input: bool) -> Self {
611 self.retain_except_on_create = ::std::option::Option::Some(input);
612 self
613 }
614 /// <p>When set to <code>true</code>, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy of <code>Retain</code>.</p>
615 /// <p>Default: <code>false</code></p>
616 pub fn set_retain_except_on_create(mut self, input: ::std::option::Option<bool>) -> Self {
617 self.retain_except_on_create = input;
618 self
619 }
620 /// <p>When set to <code>true</code>, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy of <code>Retain</code>.</p>
621 /// <p>Default: <code>false</code></p>
622 pub fn get_retain_except_on_create(&self) -> &::std::option::Option<bool> {
623 &self.retain_except_on_create
624 }
625 /// <p>Specifies the deletion mode for the stack. Possible values are:</p>
626 /// <ul>
627 /// <li>
628 /// <p><code>STANDARD</code> - Use the standard behavior. Specifying this value is the same as not specifying this parameter.</p></li>
629 /// <li>
630 /// <p><code>FORCE_DELETE_STACK</code> - Delete the stack if it's stuck in a <code>DELETE_FAILED</code> state due to resource deletion failure.</p></li>
631 /// </ul>
632 pub fn deletion_mode(mut self, input: crate::types::DeletionMode) -> Self {
633 self.deletion_mode = ::std::option::Option::Some(input);
634 self
635 }
636 /// <p>Specifies the deletion mode for the stack. Possible values are:</p>
637 /// <ul>
638 /// <li>
639 /// <p><code>STANDARD</code> - Use the standard behavior. Specifying this value is the same as not specifying this parameter.</p></li>
640 /// <li>
641 /// <p><code>FORCE_DELETE_STACK</code> - Delete the stack if it's stuck in a <code>DELETE_FAILED</code> state due to resource deletion failure.</p></li>
642 /// </ul>
643 pub fn set_deletion_mode(mut self, input: ::std::option::Option<crate::types::DeletionMode>) -> Self {
644 self.deletion_mode = input;
645 self
646 }
647 /// <p>Specifies the deletion mode for the stack. Possible values are:</p>
648 /// <ul>
649 /// <li>
650 /// <p><code>STANDARD</code> - Use the standard behavior. Specifying this value is the same as not specifying this parameter.</p></li>
651 /// <li>
652 /// <p><code>FORCE_DELETE_STACK</code> - Delete the stack if it's stuck in a <code>DELETE_FAILED</code> state due to resource deletion failure.</p></li>
653 /// </ul>
654 pub fn get_deletion_mode(&self) -> &::std::option::Option<crate::types::DeletionMode> {
655 &self.deletion_mode
656 }
657 /// <p>The detailed status of the resource or stack. If <code>CONFIGURATION_COMPLETE</code> is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack sets <code>CONFIGURATION_COMPLETE</code> when all of the resources in the stack have reached that event. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html">Understand CloudFormation stack creation events</a> in the <i>CloudFormation User Guide</i>.</p>
658 pub fn detailed_status(mut self, input: crate::types::DetailedStatus) -> Self {
659 self.detailed_status = ::std::option::Option::Some(input);
660 self
661 }
662 /// <p>The detailed status of the resource or stack. If <code>CONFIGURATION_COMPLETE</code> is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack sets <code>CONFIGURATION_COMPLETE</code> when all of the resources in the stack have reached that event. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html">Understand CloudFormation stack creation events</a> in the <i>CloudFormation User Guide</i>.</p>
663 pub fn set_detailed_status(mut self, input: ::std::option::Option<crate::types::DetailedStatus>) -> Self {
664 self.detailed_status = input;
665 self
666 }
667 /// <p>The detailed status of the resource or stack. If <code>CONFIGURATION_COMPLETE</code> is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack sets <code>CONFIGURATION_COMPLETE</code> when all of the resources in the stack have reached that event. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html">Understand CloudFormation stack creation events</a> in the <i>CloudFormation User Guide</i>.</p>
668 pub fn get_detailed_status(&self) -> &::std::option::Option<crate::types::DetailedStatus> {
669 &self.detailed_status
670 }
671 /// Consumes the builder and constructs a [`Stack`](crate::types::Stack).
672 pub fn build(self) -> crate::types::Stack {
673 crate::types::Stack {
674 stack_id: self.stack_id,
675 stack_name: self.stack_name,
676 change_set_id: self.change_set_id,
677 description: self.description,
678 parameters: self.parameters,
679 creation_time: self.creation_time,
680 deletion_time: self.deletion_time,
681 last_updated_time: self.last_updated_time,
682 rollback_configuration: self.rollback_configuration,
683 stack_status: self.stack_status,
684 stack_status_reason: self.stack_status_reason,
685 disable_rollback: self.disable_rollback,
686 notification_arns: self.notification_arns,
687 timeout_in_minutes: self.timeout_in_minutes,
688 capabilities: self.capabilities,
689 outputs: self.outputs,
690 role_arn: self.role_arn,
691 tags: self.tags,
692 enable_termination_protection: self.enable_termination_protection,
693 parent_id: self.parent_id,
694 root_id: self.root_id,
695 drift_information: self.drift_information,
696 retain_except_on_create: self.retain_except_on_create,
697 deletion_mode: self.deletion_mode,
698 detailed_status: self.detailed_status,
699 }
700 }
701}