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/lightsail/Lightsail_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace Lightsail
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Describes the health check configuration of an Amazon Lightsail container
28    * service.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ContainerServiceHealthCheckConfig">AWS
30    * API Reference</a></p>
31    */
32   class AWS_LIGHTSAIL_API ContainerServiceHealthCheckConfig
33   {
34   public:
35     ContainerServiceHealthCheckConfig();
36     ContainerServiceHealthCheckConfig(Aws::Utils::Json::JsonView jsonValue);
37     ContainerServiceHealthCheckConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41     /**
42      * <p>The number of consecutive health checks successes required before moving the
43      * container to the <code>Healthy</code> state. The default value is
44      * <code>2</code>.</p>
45      */
GetHealthyThreshold()46     inline int GetHealthyThreshold() const{ return m_healthyThreshold; }
47 
48     /**
49      * <p>The number of consecutive health checks successes required before moving the
50      * container to the <code>Healthy</code> state. The default value is
51      * <code>2</code>.</p>
52      */
HealthyThresholdHasBeenSet()53     inline bool HealthyThresholdHasBeenSet() const { return m_healthyThresholdHasBeenSet; }
54 
55     /**
56      * <p>The number of consecutive health checks successes required before moving the
57      * container to the <code>Healthy</code> state. The default value is
58      * <code>2</code>.</p>
59      */
SetHealthyThreshold(int value)60     inline void SetHealthyThreshold(int value) { m_healthyThresholdHasBeenSet = true; m_healthyThreshold = value; }
61 
62     /**
63      * <p>The number of consecutive health checks successes required before moving the
64      * container to the <code>Healthy</code> state. The default value is
65      * <code>2</code>.</p>
66      */
WithHealthyThreshold(int value)67     inline ContainerServiceHealthCheckConfig& WithHealthyThreshold(int value) { SetHealthyThreshold(value); return *this;}
68 
69 
70     /**
71      * <p>The number of consecutive health check failures required before moving the
72      * container to the <code>Unhealthy</code> state. The default value is
73      * <code>2</code>.</p>
74      */
GetUnhealthyThreshold()75     inline int GetUnhealthyThreshold() const{ return m_unhealthyThreshold; }
76 
77     /**
78      * <p>The number of consecutive health check failures required before moving the
79      * container to the <code>Unhealthy</code> state. The default value is
80      * <code>2</code>.</p>
81      */
UnhealthyThresholdHasBeenSet()82     inline bool UnhealthyThresholdHasBeenSet() const { return m_unhealthyThresholdHasBeenSet; }
83 
84     /**
85      * <p>The number of consecutive health check failures required before moving the
86      * container to the <code>Unhealthy</code> state. The default value is
87      * <code>2</code>.</p>
88      */
SetUnhealthyThreshold(int value)89     inline void SetUnhealthyThreshold(int value) { m_unhealthyThresholdHasBeenSet = true; m_unhealthyThreshold = value; }
90 
91     /**
92      * <p>The number of consecutive health check failures required before moving the
93      * container to the <code>Unhealthy</code> state. The default value is
94      * <code>2</code>.</p>
95      */
WithUnhealthyThreshold(int value)96     inline ContainerServiceHealthCheckConfig& WithUnhealthyThreshold(int value) { SetUnhealthyThreshold(value); return *this;}
97 
98 
99     /**
100      * <p>The amount of time, in seconds, during which no response means a failed
101      * health check. You can specify between 2 and 60 seconds. The default value is
102      * <code>2</code>.</p>
103      */
GetTimeoutSeconds()104     inline int GetTimeoutSeconds() const{ return m_timeoutSeconds; }
105 
106     /**
107      * <p>The amount of time, in seconds, during which no response means a failed
108      * health check. You can specify between 2 and 60 seconds. The default value is
109      * <code>2</code>.</p>
110      */
TimeoutSecondsHasBeenSet()111     inline bool TimeoutSecondsHasBeenSet() const { return m_timeoutSecondsHasBeenSet; }
112 
113     /**
114      * <p>The amount of time, in seconds, during which no response means a failed
115      * health check. You can specify between 2 and 60 seconds. The default value is
116      * <code>2</code>.</p>
117      */
SetTimeoutSeconds(int value)118     inline void SetTimeoutSeconds(int value) { m_timeoutSecondsHasBeenSet = true; m_timeoutSeconds = value; }
119 
120     /**
121      * <p>The amount of time, in seconds, during which no response means a failed
122      * health check. You can specify between 2 and 60 seconds. The default value is
123      * <code>2</code>.</p>
124      */
WithTimeoutSeconds(int value)125     inline ContainerServiceHealthCheckConfig& WithTimeoutSeconds(int value) { SetTimeoutSeconds(value); return *this;}
126 
127 
128     /**
129      * <p>The approximate interval, in seconds, between health checks of an individual
130      * container. You can specify between 5 and 300 seconds. The default value is
131      * <code>5</code>.</p>
132      */
GetIntervalSeconds()133     inline int GetIntervalSeconds() const{ return m_intervalSeconds; }
134 
135     /**
136      * <p>The approximate interval, in seconds, between health checks of an individual
137      * container. You can specify between 5 and 300 seconds. The default value is
138      * <code>5</code>.</p>
139      */
IntervalSecondsHasBeenSet()140     inline bool IntervalSecondsHasBeenSet() const { return m_intervalSecondsHasBeenSet; }
141 
142     /**
143      * <p>The approximate interval, in seconds, between health checks of an individual
144      * container. You can specify between 5 and 300 seconds. The default value is
145      * <code>5</code>.</p>
146      */
SetIntervalSeconds(int value)147     inline void SetIntervalSeconds(int value) { m_intervalSecondsHasBeenSet = true; m_intervalSeconds = value; }
148 
149     /**
150      * <p>The approximate interval, in seconds, between health checks of an individual
151      * container. You can specify between 5 and 300 seconds. The default value is
152      * <code>5</code>.</p>
153      */
WithIntervalSeconds(int value)154     inline ContainerServiceHealthCheckConfig& WithIntervalSeconds(int value) { SetIntervalSeconds(value); return *this;}
155 
156 
157     /**
158      * <p>The path on the container on which to perform the health check. The default
159      * value is <code>/</code>.</p>
160      */
GetPath()161     inline const Aws::String& GetPath() const{ return m_path; }
162 
163     /**
164      * <p>The path on the container on which to perform the health check. The default
165      * value is <code>/</code>.</p>
166      */
PathHasBeenSet()167     inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
168 
169     /**
170      * <p>The path on the container on which to perform the health check. The default
171      * value is <code>/</code>.</p>
172      */
SetPath(const Aws::String & value)173     inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
174 
175     /**
176      * <p>The path on the container on which to perform the health check. The default
177      * value is <code>/</code>.</p>
178      */
SetPath(Aws::String && value)179     inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
180 
181     /**
182      * <p>The path on the container on which to perform the health check. The default
183      * value is <code>/</code>.</p>
184      */
SetPath(const char * value)185     inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
186 
187     /**
188      * <p>The path on the container on which to perform the health check. The default
189      * value is <code>/</code>.</p>
190      */
WithPath(const Aws::String & value)191     inline ContainerServiceHealthCheckConfig& WithPath(const Aws::String& value) { SetPath(value); return *this;}
192 
193     /**
194      * <p>The path on the container on which to perform the health check. The default
195      * value is <code>/</code>.</p>
196      */
WithPath(Aws::String && value)197     inline ContainerServiceHealthCheckConfig& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
198 
199     /**
200      * <p>The path on the container on which to perform the health check. The default
201      * value is <code>/</code>.</p>
202      */
WithPath(const char * value)203     inline ContainerServiceHealthCheckConfig& WithPath(const char* value) { SetPath(value); return *this;}
204 
205 
206     /**
207      * <p>The HTTP codes to use when checking for a successful response from a
208      * container. You can specify values between <code>200</code> and <code>499</code>.
209      * You can specify multiple values (for example, <code>200,202</code>) or a range
210      * of values (for example, <code>200-299</code>).</p>
211      */
GetSuccessCodes()212     inline const Aws::String& GetSuccessCodes() const{ return m_successCodes; }
213 
214     /**
215      * <p>The HTTP codes to use when checking for a successful response from a
216      * container. You can specify values between <code>200</code> and <code>499</code>.
217      * You can specify multiple values (for example, <code>200,202</code>) or a range
218      * of values (for example, <code>200-299</code>).</p>
219      */
SuccessCodesHasBeenSet()220     inline bool SuccessCodesHasBeenSet() const { return m_successCodesHasBeenSet; }
221 
222     /**
223      * <p>The HTTP codes to use when checking for a successful response from a
224      * container. You can specify values between <code>200</code> and <code>499</code>.
225      * You can specify multiple values (for example, <code>200,202</code>) or a range
226      * of values (for example, <code>200-299</code>).</p>
227      */
SetSuccessCodes(const Aws::String & value)228     inline void SetSuccessCodes(const Aws::String& value) { m_successCodesHasBeenSet = true; m_successCodes = value; }
229 
230     /**
231      * <p>The HTTP codes to use when checking for a successful response from a
232      * container. You can specify values between <code>200</code> and <code>499</code>.
233      * You can specify multiple values (for example, <code>200,202</code>) or a range
234      * of values (for example, <code>200-299</code>).</p>
235      */
SetSuccessCodes(Aws::String && value)236     inline void SetSuccessCodes(Aws::String&& value) { m_successCodesHasBeenSet = true; m_successCodes = std::move(value); }
237 
238     /**
239      * <p>The HTTP codes to use when checking for a successful response from a
240      * container. You can specify values between <code>200</code> and <code>499</code>.
241      * You can specify multiple values (for example, <code>200,202</code>) or a range
242      * of values (for example, <code>200-299</code>).</p>
243      */
SetSuccessCodes(const char * value)244     inline void SetSuccessCodes(const char* value) { m_successCodesHasBeenSet = true; m_successCodes.assign(value); }
245 
246     /**
247      * <p>The HTTP codes to use when checking for a successful response from a
248      * container. You can specify values between <code>200</code> and <code>499</code>.
249      * You can specify multiple values (for example, <code>200,202</code>) or a range
250      * of values (for example, <code>200-299</code>).</p>
251      */
WithSuccessCodes(const Aws::String & value)252     inline ContainerServiceHealthCheckConfig& WithSuccessCodes(const Aws::String& value) { SetSuccessCodes(value); return *this;}
253 
254     /**
255      * <p>The HTTP codes to use when checking for a successful response from a
256      * container. You can specify values between <code>200</code> and <code>499</code>.
257      * You can specify multiple values (for example, <code>200,202</code>) or a range
258      * of values (for example, <code>200-299</code>).</p>
259      */
WithSuccessCodes(Aws::String && value)260     inline ContainerServiceHealthCheckConfig& WithSuccessCodes(Aws::String&& value) { SetSuccessCodes(std::move(value)); return *this;}
261 
262     /**
263      * <p>The HTTP codes to use when checking for a successful response from a
264      * container. You can specify values between <code>200</code> and <code>499</code>.
265      * You can specify multiple values (for example, <code>200,202</code>) or a range
266      * of values (for example, <code>200-299</code>).</p>
267      */
WithSuccessCodes(const char * value)268     inline ContainerServiceHealthCheckConfig& WithSuccessCodes(const char* value) { SetSuccessCodes(value); return *this;}
269 
270   private:
271 
272     int m_healthyThreshold;
273     bool m_healthyThresholdHasBeenSet;
274 
275     int m_unhealthyThreshold;
276     bool m_unhealthyThresholdHasBeenSet;
277 
278     int m_timeoutSeconds;
279     bool m_timeoutSecondsHasBeenSet;
280 
281     int m_intervalSeconds;
282     bool m_intervalSecondsHasBeenSet;
283 
284     Aws::String m_path;
285     bool m_pathHasBeenSet;
286 
287     Aws::String m_successCodes;
288     bool m_successCodesHasBeenSet;
289   };
290 
291 } // namespace Model
292 } // namespace Lightsail
293 } // namespace Aws
294