AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
Cluster.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ecs/ECS_EXPORTS.h>
10#include <aws/ecs/model/Attachment.h>
11#include <aws/ecs/model/CapacityProviderStrategyItem.h>
12#include <aws/ecs/model/ClusterConfiguration.h>
13#include <aws/ecs/model/ClusterServiceConnectDefaults.h>
14#include <aws/ecs/model/ClusterSetting.h>
15#include <aws/ecs/model/KeyValuePair.h>
16#include <aws/ecs/model/Tag.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Json {
23class JsonValue;
24class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace ECS {
28namespace Model {
29
38class Cluster {
39 public:
40 AWS_ECS_API Cluster() = default;
41 AWS_ECS_API Cluster(Aws::Utils::Json::JsonView jsonValue);
44
46
52 inline const Aws::String& GetClusterArn() const { return m_clusterArn; }
53 inline bool ClusterArnHasBeenSet() const { return m_clusterArnHasBeenSet; }
54 template <typename ClusterArnT = Aws::String>
55 void SetClusterArn(ClusterArnT&& value) {
56 m_clusterArnHasBeenSet = true;
57 m_clusterArn = std::forward<ClusterArnT>(value);
58 }
59 template <typename ClusterArnT = Aws::String>
60 Cluster& WithClusterArn(ClusterArnT&& value) {
61 SetClusterArn(std::forward<ClusterArnT>(value));
62 return *this;
63 }
65
67
70 inline const Aws::String& GetClusterName() const { return m_clusterName; }
71 inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; }
72 template <typename ClusterNameT = Aws::String>
73 void SetClusterName(ClusterNameT&& value) {
74 m_clusterNameHasBeenSet = true;
75 m_clusterName = std::forward<ClusterNameT>(value);
76 }
77 template <typename ClusterNameT = Aws::String>
78 Cluster& WithClusterName(ClusterNameT&& value) {
79 SetClusterName(std::forward<ClusterNameT>(value));
80 return *this;
81 }
83
85
88 inline const ClusterConfiguration& GetConfiguration() const { return m_configuration; }
89 inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; }
90 template <typename ConfigurationT = ClusterConfiguration>
91 void SetConfiguration(ConfigurationT&& value) {
92 m_configurationHasBeenSet = true;
93 m_configuration = std::forward<ConfigurationT>(value);
94 }
95 template <typename ConfigurationT = ClusterConfiguration>
96 Cluster& WithConfiguration(ConfigurationT&& value) {
97 SetConfiguration(std::forward<ConfigurationT>(value));
98 return *this;
99 }
101
103
119 inline const Aws::String& GetStatus() const { return m_status; }
120 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
121 template <typename StatusT = Aws::String>
122 void SetStatus(StatusT&& value) {
123 m_statusHasBeenSet = true;
124 m_status = std::forward<StatusT>(value);
125 }
126 template <typename StatusT = Aws::String>
127 Cluster& WithStatus(StatusT&& value) {
128 SetStatus(std::forward<StatusT>(value));
129 return *this;
130 }
132
134
139 inline int GetRegisteredContainerInstancesCount() const { return m_registeredContainerInstancesCount; }
140 inline bool RegisteredContainerInstancesCountHasBeenSet() const { return m_registeredContainerInstancesCountHasBeenSet; }
142 m_registeredContainerInstancesCountHasBeenSet = true;
143 m_registeredContainerInstancesCount = value;
144 }
147 return *this;
148 }
150
152
156 inline int GetRunningTasksCount() const { return m_runningTasksCount; }
157 inline bool RunningTasksCountHasBeenSet() const { return m_runningTasksCountHasBeenSet; }
158 inline void SetRunningTasksCount(int value) {
159 m_runningTasksCountHasBeenSet = true;
160 m_runningTasksCount = value;
161 }
162 inline Cluster& WithRunningTasksCount(int value) {
164 return *this;
165 }
167
169
173 inline int GetPendingTasksCount() const { return m_pendingTasksCount; }
174 inline bool PendingTasksCountHasBeenSet() const { return m_pendingTasksCountHasBeenSet; }
175 inline void SetPendingTasksCount(int value) {
176 m_pendingTasksCountHasBeenSet = true;
177 m_pendingTasksCount = value;
178 }
179 inline Cluster& WithPendingTasksCount(int value) {
181 return *this;
182 }
184
186
191 inline int GetActiveServicesCount() const { return m_activeServicesCount; }
192 inline bool ActiveServicesCountHasBeenSet() const { return m_activeServicesCountHasBeenSet; }
193 inline void SetActiveServicesCount(int value) {
194 m_activeServicesCountHasBeenSet = true;
195 m_activeServicesCount = value;
196 }
197 inline Cluster& WithActiveServicesCount(int value) {
199 return *this;
200 }
202
204
213 inline const Aws::Vector<KeyValuePair>& GetStatistics() const { return m_statistics; }
214 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
215 template <typename StatisticsT = Aws::Vector<KeyValuePair>>
216 void SetStatistics(StatisticsT&& value) {
217 m_statisticsHasBeenSet = true;
218 m_statistics = std::forward<StatisticsT>(value);
219 }
220 template <typename StatisticsT = Aws::Vector<KeyValuePair>>
221 Cluster& WithStatistics(StatisticsT&& value) {
222 SetStatistics(std::forward<StatisticsT>(value));
223 return *this;
224 }
225 template <typename StatisticsT = KeyValuePair>
226 Cluster& AddStatistics(StatisticsT&& value) {
227 m_statisticsHasBeenSet = true;
228 m_statistics.emplace_back(std::forward<StatisticsT>(value));
229 return *this;
230 }
232
234
252 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
253 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
254 template <typename TagsT = Aws::Vector<Tag>>
255 void SetTags(TagsT&& value) {
256 m_tagsHasBeenSet = true;
257 m_tags = std::forward<TagsT>(value);
258 }
259 template <typename TagsT = Aws::Vector<Tag>>
260 Cluster& WithTags(TagsT&& value) {
261 SetTags(std::forward<TagsT>(value));
262 return *this;
263 }
264 template <typename TagsT = Tag>
265 Cluster& AddTags(TagsT&& value) {
266 m_tagsHasBeenSet = true;
267 m_tags.emplace_back(std::forward<TagsT>(value));
268 return *this;
269 }
271
273
277 inline const Aws::Vector<ClusterSetting>& GetSettings() const { return m_settings; }
278 inline bool SettingsHasBeenSet() const { return m_settingsHasBeenSet; }
279 template <typename SettingsT = Aws::Vector<ClusterSetting>>
280 void SetSettings(SettingsT&& value) {
281 m_settingsHasBeenSet = true;
282 m_settings = std::forward<SettingsT>(value);
283 }
284 template <typename SettingsT = Aws::Vector<ClusterSetting>>
285 Cluster& WithSettings(SettingsT&& value) {
286 SetSettings(std::forward<SettingsT>(value));
287 return *this;
288 }
289 template <typename SettingsT = ClusterSetting>
290 Cluster& AddSettings(SettingsT&& value) {
291 m_settingsHasBeenSet = true;
292 m_settings.emplace_back(std::forward<SettingsT>(value));
293 return *this;
294 }
296
298
301 inline const Aws::Vector<Aws::String>& GetCapacityProviders() const { return m_capacityProviders; }
302 inline bool CapacityProvidersHasBeenSet() const { return m_capacityProvidersHasBeenSet; }
303 template <typename CapacityProvidersT = Aws::Vector<Aws::String>>
304 void SetCapacityProviders(CapacityProvidersT&& value) {
305 m_capacityProvidersHasBeenSet = true;
306 m_capacityProviders = std::forward<CapacityProvidersT>(value);
307 }
308 template <typename CapacityProvidersT = Aws::Vector<Aws::String>>
309 Cluster& WithCapacityProviders(CapacityProvidersT&& value) {
310 SetCapacityProviders(std::forward<CapacityProvidersT>(value));
311 return *this;
312 }
313 template <typename CapacityProvidersT = Aws::String>
314 Cluster& AddCapacityProviders(CapacityProvidersT&& value) {
315 m_capacityProvidersHasBeenSet = true;
316 m_capacityProviders.emplace_back(std::forward<CapacityProvidersT>(value));
317 return *this;
318 }
320
322
328 return m_defaultCapacityProviderStrategy;
329 }
330 inline bool DefaultCapacityProviderStrategyHasBeenSet() const { return m_defaultCapacityProviderStrategyHasBeenSet; }
331 template <typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
332 void SetDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
333 m_defaultCapacityProviderStrategyHasBeenSet = true;
334 m_defaultCapacityProviderStrategy = std::forward<DefaultCapacityProviderStrategyT>(value);
335 }
336 template <typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
337 Cluster& WithDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
338 SetDefaultCapacityProviderStrategy(std::forward<DefaultCapacityProviderStrategyT>(value));
339 return *this;
340 }
341 template <typename DefaultCapacityProviderStrategyT = CapacityProviderStrategyItem>
342 Cluster& AddDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
343 m_defaultCapacityProviderStrategyHasBeenSet = true;
344 m_defaultCapacityProviderStrategy.emplace_back(std::forward<DefaultCapacityProviderStrategyT>(value));
345 return *this;
346 }
348
350
355 inline const Aws::Vector<Attachment>& GetAttachments() const { return m_attachments; }
356 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
357 template <typename AttachmentsT = Aws::Vector<Attachment>>
358 void SetAttachments(AttachmentsT&& value) {
359 m_attachmentsHasBeenSet = true;
360 m_attachments = std::forward<AttachmentsT>(value);
361 }
362 template <typename AttachmentsT = Aws::Vector<Attachment>>
363 Cluster& WithAttachments(AttachmentsT&& value) {
364 SetAttachments(std::forward<AttachmentsT>(value));
365 return *this;
366 }
367 template <typename AttachmentsT = Attachment>
368 Cluster& AddAttachments(AttachmentsT&& value) {
369 m_attachmentsHasBeenSet = true;
370 m_attachments.emplace_back(std::forward<AttachmentsT>(value));
371 return *this;
372 }
374
376
384 inline const Aws::String& GetAttachmentsStatus() const { return m_attachmentsStatus; }
385 inline bool AttachmentsStatusHasBeenSet() const { return m_attachmentsStatusHasBeenSet; }
386 template <typename AttachmentsStatusT = Aws::String>
387 void SetAttachmentsStatus(AttachmentsStatusT&& value) {
388 m_attachmentsStatusHasBeenSet = true;
389 m_attachmentsStatus = std::forward<AttachmentsStatusT>(value);
390 }
391 template <typename AttachmentsStatusT = Aws::String>
392 Cluster& WithAttachmentsStatus(AttachmentsStatusT&& value) {
393 SetAttachmentsStatus(std::forward<AttachmentsStatusT>(value));
394 return *this;
395 }
397
399
416 inline const ClusterServiceConnectDefaults& GetServiceConnectDefaults() const { return m_serviceConnectDefaults; }
417 inline bool ServiceConnectDefaultsHasBeenSet() const { return m_serviceConnectDefaultsHasBeenSet; }
418 template <typename ServiceConnectDefaultsT = ClusterServiceConnectDefaults>
419 void SetServiceConnectDefaults(ServiceConnectDefaultsT&& value) {
420 m_serviceConnectDefaultsHasBeenSet = true;
421 m_serviceConnectDefaults = std::forward<ServiceConnectDefaultsT>(value);
422 }
423 template <typename ServiceConnectDefaultsT = ClusterServiceConnectDefaults>
424 Cluster& WithServiceConnectDefaults(ServiceConnectDefaultsT&& value) {
425 SetServiceConnectDefaults(std::forward<ServiceConnectDefaultsT>(value));
426 return *this;
427 }
429 private:
430 Aws::String m_clusterArn;
431
432 Aws::String m_clusterName;
433
434 ClusterConfiguration m_configuration;
435
436 Aws::String m_status;
437
438 int m_registeredContainerInstancesCount{0};
439
440 int m_runningTasksCount{0};
441
442 int m_pendingTasksCount{0};
443
444 int m_activeServicesCount{0};
445
446 Aws::Vector<KeyValuePair> m_statistics;
447
448 Aws::Vector<Tag> m_tags;
449
451
452 Aws::Vector<Aws::String> m_capacityProviders;
453
454 Aws::Vector<CapacityProviderStrategyItem> m_defaultCapacityProviderStrategy;
455
456 Aws::Vector<Attachment> m_attachments;
457
458 Aws::String m_attachmentsStatus;
459
460 ClusterServiceConnectDefaults m_serviceConnectDefaults;
461 bool m_clusterArnHasBeenSet = false;
462 bool m_clusterNameHasBeenSet = false;
463 bool m_configurationHasBeenSet = false;
464 bool m_statusHasBeenSet = false;
465 bool m_registeredContainerInstancesCountHasBeenSet = false;
466 bool m_runningTasksCountHasBeenSet = false;
467 bool m_pendingTasksCountHasBeenSet = false;
468 bool m_activeServicesCountHasBeenSet = false;
469 bool m_statisticsHasBeenSet = false;
470 bool m_tagsHasBeenSet = false;
471 bool m_settingsHasBeenSet = false;
472 bool m_capacityProvidersHasBeenSet = false;
473 bool m_defaultCapacityProviderStrategyHasBeenSet = false;
474 bool m_attachmentsHasBeenSet = false;
475 bool m_attachmentsStatusHasBeenSet = false;
476 bool m_serviceConnectDefaultsHasBeenSet = false;
477};
478
479} // namespace Model
480} // namespace ECS
481} // namespace Aws
void SetAttachments(AttachmentsT &&value)
Definition Cluster.h:358
bool RunningTasksCountHasBeenSet() const
Definition Cluster.h:157
void SetRegisteredContainerInstancesCount(int value)
Definition Cluster.h:141
const ClusterConfiguration & GetConfiguration() const
Definition Cluster.h:88
bool ActiveServicesCountHasBeenSet() const
Definition Cluster.h:192
const Aws::Vector< Tag > & GetTags() const
Definition Cluster.h:252
const Aws::Vector< ClusterSetting > & GetSettings() const
Definition Cluster.h:277
int GetActiveServicesCount() const
Definition Cluster.h:191
const Aws::String & GetClusterName() const
Definition Cluster.h:70
const Aws::Vector< Attachment > & GetAttachments() const
Definition Cluster.h:355
Cluster & WithStatistics(StatisticsT &&value)
Definition Cluster.h:221
bool AttachmentsStatusHasBeenSet() const
Definition Cluster.h:385
Cluster & AddDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
Definition Cluster.h:342
const Aws::String & GetClusterArn() const
Definition Cluster.h:52
bool DefaultCapacityProviderStrategyHasBeenSet() const
Definition Cluster.h:330
Cluster & AddStatistics(StatisticsT &&value)
Definition Cluster.h:226
Cluster & WithSettings(SettingsT &&value)
Definition Cluster.h:285
void SetClusterArn(ClusterArnT &&value)
Definition Cluster.h:55
void SetCapacityProviders(CapacityProvidersT &&value)
Definition Cluster.h:304
bool TagsHasBeenSet() const
Definition Cluster.h:253
AWS_ECS_API Cluster()=default
int GetPendingTasksCount() const
Definition Cluster.h:173
Cluster & WithCapacityProviders(CapacityProvidersT &&value)
Definition Cluster.h:309
void SetTags(TagsT &&value)
Definition Cluster.h:255
void SetStatus(StatusT &&value)
Definition Cluster.h:122
Cluster & WithStatus(StatusT &&value)
Definition Cluster.h:127
bool StatusHasBeenSet() const
Definition Cluster.h:120
bool ServiceConnectDefaultsHasBeenSet() const
Definition Cluster.h:417
bool CapacityProvidersHasBeenSet() const
Definition Cluster.h:302
Cluster & WithPendingTasksCount(int value)
Definition Cluster.h:179
Cluster & WithConfiguration(ConfigurationT &&value)
Definition Cluster.h:96
const ClusterServiceConnectDefaults & GetServiceConnectDefaults() const
Definition Cluster.h:416
Cluster & WithDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
Definition Cluster.h:337
Cluster & WithActiveServicesCount(int value)
Definition Cluster.h:197
Cluster & AddSettings(SettingsT &&value)
Definition Cluster.h:290
bool AttachmentsHasBeenSet() const
Definition Cluster.h:356
void SetStatistics(StatisticsT &&value)
Definition Cluster.h:216
bool ClusterArnHasBeenSet() const
Definition Cluster.h:53
int GetRunningTasksCount() const
Definition Cluster.h:156
bool PendingTasksCountHasBeenSet() const
Definition Cluster.h:174
bool ConfigurationHasBeenSet() const
Definition Cluster.h:89
Cluster & WithAttachmentsStatus(AttachmentsStatusT &&value)
Definition Cluster.h:392
Cluster & WithServiceConnectDefaults(ServiceConnectDefaultsT &&value)
Definition Cluster.h:424
Cluster & WithRunningTasksCount(int value)
Definition Cluster.h:162
int GetRegisteredContainerInstancesCount() const
Definition Cluster.h:139
void SetRunningTasksCount(int value)
Definition Cluster.h:158
bool SettingsHasBeenSet() const
Definition Cluster.h:278
void SetClusterName(ClusterNameT &&value)
Definition Cluster.h:73
void SetSettings(SettingsT &&value)
Definition Cluster.h:280
bool RegisteredContainerInstancesCountHasBeenSet() const
Definition Cluster.h:140
void SetDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
Definition Cluster.h:332
void SetActiveServicesCount(int value)
Definition Cluster.h:193
Cluster & AddCapacityProviders(CapacityProvidersT &&value)
Definition Cluster.h:314
AWS_ECS_API Cluster & operator=(Aws::Utils::Json::JsonView jsonValue)
Cluster & AddAttachments(AttachmentsT &&value)
Definition Cluster.h:368
Cluster & AddTags(TagsT &&value)
Definition Cluster.h:265
bool StatisticsHasBeenSet() const
Definition Cluster.h:214
void SetAttachmentsStatus(AttachmentsStatusT &&value)
Definition Cluster.h:387
Cluster & WithClusterName(ClusterNameT &&value)
Definition Cluster.h:78
Cluster & WithTags(TagsT &&value)
Definition Cluster.h:260
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< Aws::String > & GetCapacityProviders() const
Definition Cluster.h:301
Cluster & WithAttachments(AttachmentsT &&value)
Definition Cluster.h:363
bool ClusterNameHasBeenSet() const
Definition Cluster.h:71
const Aws::Vector< CapacityProviderStrategyItem > & GetDefaultCapacityProviderStrategy() const
Definition Cluster.h:327
void SetServiceConnectDefaults(ServiceConnectDefaultsT &&value)
Definition Cluster.h:419
const Aws::String & GetAttachmentsStatus() const
Definition Cluster.h:384
Cluster & WithRegisteredContainerInstancesCount(int value)
Definition Cluster.h:145
const Aws::String & GetStatus() const
Definition Cluster.h:119
void SetConfiguration(ConfigurationT &&value)
Definition Cluster.h:91
Cluster & WithClusterArn(ClusterArnT &&value)
Definition Cluster.h:60
AWS_ECS_API Cluster(Aws::Utils::Json::JsonView jsonValue)
void SetPendingTasksCount(int value)
Definition Cluster.h:175
const Aws::Vector< KeyValuePair > & GetStatistics() const
Definition Cluster.h:213
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue