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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Structure that contains the results of the account gate function which CloudFormation invokes, if present, before proceeding with a stack set operation in an account and Region.</p>
/// <p>For each account and Region, CloudFormation lets you specify a Lambda function that encapsulates any requirements that must be met before CloudFormation can proceed with a stack set operation in that account and Region. CloudFormation invokes the function each time a stack set operation is requested for that account and Region; if the function returns <code>FAILED</code>, CloudFormation cancels the operation in that account and Region, and sets the stack set operation result status for that account and Region to <code>FAILED</code>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-account-gating.html">Configuring a target account gate</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AccountGateResult {
    /// <p>The status of the account gate function.</p>
    /// <ul>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The account gate function has determined that the account and Region passes any requirements for a stack set operation to occur. CloudFormation proceeds with the stack operation in that account and Region.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The account gate function has determined that the account and Region doesn't meet the requirements for a stack set operation to occur. CloudFormation cancels the stack set operation in that account and Region, and sets the stack set operation result status for that account and Region to <code>FAILED</code>.</p></li>
    /// <li>
    /// <p><code>SKIPPED</code>: CloudFormation has skipped calling the account gate function for this account and Region, for one of the following reasons:</p>
    /// <ul>
    /// <li>
    /// <p>An account gate function hasn't been specified for the account and Region. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>The <code>AWSCloudFormationStackSetExecutionRole</code> of the stack set administration account lacks permissions to invoke the function. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>Either no action is necessary, or no action is possible, on the stack. CloudFormation skips the stack set operation in this account and Region.</p></li>
    /// </ul></li>
    /// </ul>
    pub status: ::std::option::Option<crate::types::AccountGateStatus>,
    /// <p>The reason for the account gate status assigned to this account and Region for the stack set operation.</p>
    pub status_reason: ::std::option::Option<::std::string::String>,
}
impl AccountGateResult {
    /// <p>The status of the account gate function.</p>
    /// <ul>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The account gate function has determined that the account and Region passes any requirements for a stack set operation to occur. CloudFormation proceeds with the stack operation in that account and Region.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The account gate function has determined that the account and Region doesn't meet the requirements for a stack set operation to occur. CloudFormation cancels the stack set operation in that account and Region, and sets the stack set operation result status for that account and Region to <code>FAILED</code>.</p></li>
    /// <li>
    /// <p><code>SKIPPED</code>: CloudFormation has skipped calling the account gate function for this account and Region, for one of the following reasons:</p>
    /// <ul>
    /// <li>
    /// <p>An account gate function hasn't been specified for the account and Region. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>The <code>AWSCloudFormationStackSetExecutionRole</code> of the stack set administration account lacks permissions to invoke the function. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>Either no action is necessary, or no action is possible, on the stack. CloudFormation skips the stack set operation in this account and Region.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&crate::types::AccountGateStatus> {
        self.status.as_ref()
    }
    /// <p>The reason for the account gate status assigned to this account and Region for the stack set operation.</p>
    pub fn status_reason(&self) -> ::std::option::Option<&str> {
        self.status_reason.as_deref()
    }
}
impl AccountGateResult {
    /// Creates a new builder-style object to manufacture [`AccountGateResult`](crate::types::AccountGateResult).
    pub fn builder() -> crate::types::builders::AccountGateResultBuilder {
        crate::types::builders::AccountGateResultBuilder::default()
    }
}

/// A builder for [`AccountGateResult`](crate::types::AccountGateResult).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AccountGateResultBuilder {
    pub(crate) status: ::std::option::Option<crate::types::AccountGateStatus>,
    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
}
impl AccountGateResultBuilder {
    /// <p>The status of the account gate function.</p>
    /// <ul>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The account gate function has determined that the account and Region passes any requirements for a stack set operation to occur. CloudFormation proceeds with the stack operation in that account and Region.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The account gate function has determined that the account and Region doesn't meet the requirements for a stack set operation to occur. CloudFormation cancels the stack set operation in that account and Region, and sets the stack set operation result status for that account and Region to <code>FAILED</code>.</p></li>
    /// <li>
    /// <p><code>SKIPPED</code>: CloudFormation has skipped calling the account gate function for this account and Region, for one of the following reasons:</p>
    /// <ul>
    /// <li>
    /// <p>An account gate function hasn't been specified for the account and Region. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>The <code>AWSCloudFormationStackSetExecutionRole</code> of the stack set administration account lacks permissions to invoke the function. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>Either no action is necessary, or no action is possible, on the stack. CloudFormation skips the stack set operation in this account and Region.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn status(mut self, input: crate::types::AccountGateStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the account gate function.</p>
    /// <ul>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The account gate function has determined that the account and Region passes any requirements for a stack set operation to occur. CloudFormation proceeds with the stack operation in that account and Region.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The account gate function has determined that the account and Region doesn't meet the requirements for a stack set operation to occur. CloudFormation cancels the stack set operation in that account and Region, and sets the stack set operation result status for that account and Region to <code>FAILED</code>.</p></li>
    /// <li>
    /// <p><code>SKIPPED</code>: CloudFormation has skipped calling the account gate function for this account and Region, for one of the following reasons:</p>
    /// <ul>
    /// <li>
    /// <p>An account gate function hasn't been specified for the account and Region. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>The <code>AWSCloudFormationStackSetExecutionRole</code> of the stack set administration account lacks permissions to invoke the function. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>Either no action is necessary, or no action is possible, on the stack. CloudFormation skips the stack set operation in this account and Region.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::AccountGateStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the account gate function.</p>
    /// <ul>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The account gate function has determined that the account and Region passes any requirements for a stack set operation to occur. CloudFormation proceeds with the stack operation in that account and Region.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The account gate function has determined that the account and Region doesn't meet the requirements for a stack set operation to occur. CloudFormation cancels the stack set operation in that account and Region, and sets the stack set operation result status for that account and Region to <code>FAILED</code>.</p></li>
    /// <li>
    /// <p><code>SKIPPED</code>: CloudFormation has skipped calling the account gate function for this account and Region, for one of the following reasons:</p>
    /// <ul>
    /// <li>
    /// <p>An account gate function hasn't been specified for the account and Region. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>The <code>AWSCloudFormationStackSetExecutionRole</code> of the stack set administration account lacks permissions to invoke the function. CloudFormation proceeds with the stack set operation in this account and Region.</p></li>
    /// <li>
    /// <p>Either no action is necessary, or no action is possible, on the stack. CloudFormation skips the stack set operation in this account and Region.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::AccountGateStatus> {
        &self.status
    }
    /// <p>The reason for the account gate status assigned to this account and Region for the stack set operation.</p>
    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason for the account gate status assigned to this account and Region for the stack set operation.</p>
    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_reason = input;
        self
    }
    /// <p>The reason for the account gate status assigned to this account and Region for the stack set operation.</p>
    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_reason
    }
    /// Consumes the builder and constructs a [`AccountGateResult`](crate::types::AccountGateResult).
    pub fn build(self) -> crate::types::AccountGateResult {
        crate::types::AccountGateResult {
            status: self.status,
            status_reason: self.status_reason,
        }
    }
}