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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RollbackStackInput {
/// <p>The name that's associated with the stack.</p>
pub stack_name: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to rollback the stack.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>A unique identifier for this <code>RollbackStack</code> request.</p>
pub client_request_token: ::std::option::Option<::std::string::String>,
/// <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>,
}
impl RollbackStackInput {
/// <p>The name that's associated with the stack.</p>
pub fn stack_name(&self) -> ::std::option::Option<&str> {
self.stack_name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to rollback the stack.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>A unique identifier for this <code>RollbackStack</code> request.</p>
pub fn client_request_token(&self) -> ::std::option::Option<&str> {
self.client_request_token.as_deref()
}
/// <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
}
}
impl RollbackStackInput {
/// Creates a new builder-style object to manufacture [`RollbackStackInput`](crate::operation::rollback_stack::RollbackStackInput).
pub fn builder() -> crate::operation::rollback_stack::builders::RollbackStackInputBuilder {
crate::operation::rollback_stack::builders::RollbackStackInputBuilder::default()
}
}
/// A builder for [`RollbackStackInput`](crate::operation::rollback_stack::RollbackStackInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RollbackStackInputBuilder {
pub(crate) stack_name: ::std::option::Option<::std::string::String>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
pub(crate) retain_except_on_create: ::std::option::Option<bool>,
}
impl RollbackStackInputBuilder {
/// <p>The name that's 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 that's 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 that's associated with the stack.</p>
pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
&self.stack_name
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to rollback the stack.</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 IAM role that CloudFormation assumes to rollback the stack.</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 IAM role that CloudFormation assumes to rollback the stack.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// <p>A unique identifier for this <code>RollbackStack</code> request.</p>
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_request_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A unique identifier for this <code>RollbackStack</code> request.</p>
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_request_token = input;
self
}
/// <p>A unique identifier for this <code>RollbackStack</code> request.</p>
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_request_token
}
/// <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
}
/// Consumes the builder and constructs a [`RollbackStackInput`](crate::operation::rollback_stack::RollbackStackInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::rollback_stack::RollbackStackInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::rollback_stack::RollbackStackInput {
stack_name: self.stack_name,
role_arn: self.role_arn,
client_request_token: self.client_request_token,
retain_except_on_create: self.retain_except_on_create,
})
}
}