1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/servicecatalog/ServiceCatalog_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/servicecatalog/model/StackInstanceStatus.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace ServiceCatalog
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>An AWS CloudFormation stack, in a specific account and region, that's part of
29    * a stack set operation. A stack instance is a reference to an attempted or actual
30    * stack in a given account within a given region. A stack instance can exist
31    * without a stack—for example, if the stack couldn't be created for some reason. A
32    * stack instance is associated with only one stack set. Each stack instance
33    * contains the ID of its associated stack set, as well as the ID of the actual
34    * stack and the stack status. </p><p><h3>See Also:</h3>   <a
35    * href="http://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/StackInstance">AWS
36    * API Reference</a></p>
37    */
38   class AWS_SERVICECATALOG_API StackInstance
39   {
40   public:
41     StackInstance();
42     StackInstance(Aws::Utils::Json::JsonView jsonValue);
43     StackInstance& operator=(Aws::Utils::Json::JsonView jsonValue);
44     Aws::Utils::Json::JsonValue Jsonize() const;
45 
46 
47     /**
48      * <p>The name of the AWS account that the stack instance is associated with.</p>
49      */
GetAccount()50     inline const Aws::String& GetAccount() const{ return m_account; }
51 
52     /**
53      * <p>The name of the AWS account that the stack instance is associated with.</p>
54      */
AccountHasBeenSet()55     inline bool AccountHasBeenSet() const { return m_accountHasBeenSet; }
56 
57     /**
58      * <p>The name of the AWS account that the stack instance is associated with.</p>
59      */
SetAccount(const Aws::String & value)60     inline void SetAccount(const Aws::String& value) { m_accountHasBeenSet = true; m_account = value; }
61 
62     /**
63      * <p>The name of the AWS account that the stack instance is associated with.</p>
64      */
SetAccount(Aws::String && value)65     inline void SetAccount(Aws::String&& value) { m_accountHasBeenSet = true; m_account = std::move(value); }
66 
67     /**
68      * <p>The name of the AWS account that the stack instance is associated with.</p>
69      */
SetAccount(const char * value)70     inline void SetAccount(const char* value) { m_accountHasBeenSet = true; m_account.assign(value); }
71 
72     /**
73      * <p>The name of the AWS account that the stack instance is associated with.</p>
74      */
WithAccount(const Aws::String & value)75     inline StackInstance& WithAccount(const Aws::String& value) { SetAccount(value); return *this;}
76 
77     /**
78      * <p>The name of the AWS account that the stack instance is associated with.</p>
79      */
WithAccount(Aws::String && value)80     inline StackInstance& WithAccount(Aws::String&& value) { SetAccount(std::move(value)); return *this;}
81 
82     /**
83      * <p>The name of the AWS account that the stack instance is associated with.</p>
84      */
WithAccount(const char * value)85     inline StackInstance& WithAccount(const char* value) { SetAccount(value); return *this;}
86 
87 
88     /**
89      * <p>The name of the AWS region that the stack instance is associated with.</p>
90      */
GetRegion()91     inline const Aws::String& GetRegion() const{ return m_region; }
92 
93     /**
94      * <p>The name of the AWS region that the stack instance is associated with.</p>
95      */
RegionHasBeenSet()96     inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
97 
98     /**
99      * <p>The name of the AWS region that the stack instance is associated with.</p>
100      */
SetRegion(const Aws::String & value)101     inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; }
102 
103     /**
104      * <p>The name of the AWS region that the stack instance is associated with.</p>
105      */
SetRegion(Aws::String && value)106     inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); }
107 
108     /**
109      * <p>The name of the AWS region that the stack instance is associated with.</p>
110      */
SetRegion(const char * value)111     inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); }
112 
113     /**
114      * <p>The name of the AWS region that the stack instance is associated with.</p>
115      */
WithRegion(const Aws::String & value)116     inline StackInstance& WithRegion(const Aws::String& value) { SetRegion(value); return *this;}
117 
118     /**
119      * <p>The name of the AWS region that the stack instance is associated with.</p>
120      */
WithRegion(Aws::String && value)121     inline StackInstance& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;}
122 
123     /**
124      * <p>The name of the AWS region that the stack instance is associated with.</p>
125      */
WithRegion(const char * value)126     inline StackInstance& WithRegion(const char* value) { SetRegion(value); return *this;}
127 
128 
129     /**
130      * <p>The status of the stack instance, in terms of its synchronization with its
131      * associated stack set. </p> <ul> <li> <p> <code>INOPERABLE</code>: A
132      * <code>DeleteStackInstances</code> operation has failed and left the stack in an
133      * unstable state. Stacks in this state are excluded from further
134      * <code>UpdateStackSet</code> operations. You might need to perform a
135      * <code>DeleteStackInstances</code> operation, with <code>RetainStacks</code> set
136      * to true, to delete the stack instance, and then delete the stack manually. </p>
137      * </li> <li> <p> <code>OUTDATED</code>: The stack isn't currently up to date with
138      * the stack set because either the associated stack failed during a
139      * <code>CreateStackSet</code> or <code>UpdateStackSet</code> operation, or the
140      * stack was part of a <code>CreateStackSet</code> or <code>UpdateStackSet</code>
141      * operation that failed or was stopped before the stack was created or
142      * updated.</p> </li> <li> <p> <code>CURRENT</code>: The stack is currently up to
143      * date with the stack set.</p> </li> </ul>
144      */
GetStackInstanceStatus()145     inline const StackInstanceStatus& GetStackInstanceStatus() const{ return m_stackInstanceStatus; }
146 
147     /**
148      * <p>The status of the stack instance, in terms of its synchronization with its
149      * associated stack set. </p> <ul> <li> <p> <code>INOPERABLE</code>: A
150      * <code>DeleteStackInstances</code> operation has failed and left the stack in an
151      * unstable state. Stacks in this state are excluded from further
152      * <code>UpdateStackSet</code> operations. You might need to perform a
153      * <code>DeleteStackInstances</code> operation, with <code>RetainStacks</code> set
154      * to true, to delete the stack instance, and then delete the stack manually. </p>
155      * </li> <li> <p> <code>OUTDATED</code>: The stack isn't currently up to date with
156      * the stack set because either the associated stack failed during a
157      * <code>CreateStackSet</code> or <code>UpdateStackSet</code> operation, or the
158      * stack was part of a <code>CreateStackSet</code> or <code>UpdateStackSet</code>
159      * operation that failed or was stopped before the stack was created or
160      * updated.</p> </li> <li> <p> <code>CURRENT</code>: The stack is currently up to
161      * date with the stack set.</p> </li> </ul>
162      */
StackInstanceStatusHasBeenSet()163     inline bool StackInstanceStatusHasBeenSet() const { return m_stackInstanceStatusHasBeenSet; }
164 
165     /**
166      * <p>The status of the stack instance, in terms of its synchronization with its
167      * associated stack set. </p> <ul> <li> <p> <code>INOPERABLE</code>: A
168      * <code>DeleteStackInstances</code> operation has failed and left the stack in an
169      * unstable state. Stacks in this state are excluded from further
170      * <code>UpdateStackSet</code> operations. You might need to perform a
171      * <code>DeleteStackInstances</code> operation, with <code>RetainStacks</code> set
172      * to true, to delete the stack instance, and then delete the stack manually. </p>
173      * </li> <li> <p> <code>OUTDATED</code>: The stack isn't currently up to date with
174      * the stack set because either the associated stack failed during a
175      * <code>CreateStackSet</code> or <code>UpdateStackSet</code> operation, or the
176      * stack was part of a <code>CreateStackSet</code> or <code>UpdateStackSet</code>
177      * operation that failed or was stopped before the stack was created or
178      * updated.</p> </li> <li> <p> <code>CURRENT</code>: The stack is currently up to
179      * date with the stack set.</p> </li> </ul>
180      */
SetStackInstanceStatus(const StackInstanceStatus & value)181     inline void SetStackInstanceStatus(const StackInstanceStatus& value) { m_stackInstanceStatusHasBeenSet = true; m_stackInstanceStatus = value; }
182 
183     /**
184      * <p>The status of the stack instance, in terms of its synchronization with its
185      * associated stack set. </p> <ul> <li> <p> <code>INOPERABLE</code>: A
186      * <code>DeleteStackInstances</code> operation has failed and left the stack in an
187      * unstable state. Stacks in this state are excluded from further
188      * <code>UpdateStackSet</code> operations. You might need to perform a
189      * <code>DeleteStackInstances</code> operation, with <code>RetainStacks</code> set
190      * to true, to delete the stack instance, and then delete the stack manually. </p>
191      * </li> <li> <p> <code>OUTDATED</code>: The stack isn't currently up to date with
192      * the stack set because either the associated stack failed during a
193      * <code>CreateStackSet</code> or <code>UpdateStackSet</code> operation, or the
194      * stack was part of a <code>CreateStackSet</code> or <code>UpdateStackSet</code>
195      * operation that failed or was stopped before the stack was created or
196      * updated.</p> </li> <li> <p> <code>CURRENT</code>: The stack is currently up to
197      * date with the stack set.</p> </li> </ul>
198      */
SetStackInstanceStatus(StackInstanceStatus && value)199     inline void SetStackInstanceStatus(StackInstanceStatus&& value) { m_stackInstanceStatusHasBeenSet = true; m_stackInstanceStatus = std::move(value); }
200 
201     /**
202      * <p>The status of the stack instance, in terms of its synchronization with its
203      * associated stack set. </p> <ul> <li> <p> <code>INOPERABLE</code>: A
204      * <code>DeleteStackInstances</code> operation has failed and left the stack in an
205      * unstable state. Stacks in this state are excluded from further
206      * <code>UpdateStackSet</code> operations. You might need to perform a
207      * <code>DeleteStackInstances</code> operation, with <code>RetainStacks</code> set
208      * to true, to delete the stack instance, and then delete the stack manually. </p>
209      * </li> <li> <p> <code>OUTDATED</code>: The stack isn't currently up to date with
210      * the stack set because either the associated stack failed during a
211      * <code>CreateStackSet</code> or <code>UpdateStackSet</code> operation, or the
212      * stack was part of a <code>CreateStackSet</code> or <code>UpdateStackSet</code>
213      * operation that failed or was stopped before the stack was created or
214      * updated.</p> </li> <li> <p> <code>CURRENT</code>: The stack is currently up to
215      * date with the stack set.</p> </li> </ul>
216      */
WithStackInstanceStatus(const StackInstanceStatus & value)217     inline StackInstance& WithStackInstanceStatus(const StackInstanceStatus& value) { SetStackInstanceStatus(value); return *this;}
218 
219     /**
220      * <p>The status of the stack instance, in terms of its synchronization with its
221      * associated stack set. </p> <ul> <li> <p> <code>INOPERABLE</code>: A
222      * <code>DeleteStackInstances</code> operation has failed and left the stack in an
223      * unstable state. Stacks in this state are excluded from further
224      * <code>UpdateStackSet</code> operations. You might need to perform a
225      * <code>DeleteStackInstances</code> operation, with <code>RetainStacks</code> set
226      * to true, to delete the stack instance, and then delete the stack manually. </p>
227      * </li> <li> <p> <code>OUTDATED</code>: The stack isn't currently up to date with
228      * the stack set because either the associated stack failed during a
229      * <code>CreateStackSet</code> or <code>UpdateStackSet</code> operation, or the
230      * stack was part of a <code>CreateStackSet</code> or <code>UpdateStackSet</code>
231      * operation that failed or was stopped before the stack was created or
232      * updated.</p> </li> <li> <p> <code>CURRENT</code>: The stack is currently up to
233      * date with the stack set.</p> </li> </ul>
234      */
WithStackInstanceStatus(StackInstanceStatus && value)235     inline StackInstance& WithStackInstanceStatus(StackInstanceStatus&& value) { SetStackInstanceStatus(std::move(value)); return *this;}
236 
237   private:
238 
239     Aws::String m_account;
240     bool m_accountHasBeenSet;
241 
242     Aws::String m_region;
243     bool m_regionHasBeenSet;
244 
245     StackInstanceStatus m_stackInstanceStatus;
246     bool m_stackInstanceStatusHasBeenSet;
247   };
248 
249 } // namespace Model
250 } // namespace ServiceCatalog
251 } // namespace Aws
252