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