AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Cluster.h
1
6#pragma once
7#include <aws/ecs/ECS_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/ecs/model/ClusterConfiguration.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ecs/model/ClusterServiceConnectDefaults.h>
12#include <aws/ecs/model/KeyValuePair.h>
13#include <aws/ecs/model/Tag.h>
14#include <aws/ecs/model/ClusterSetting.h>
15#include <aws/ecs/model/CapacityProviderStrategyItem.h>
16#include <aws/ecs/model/Attachment.h>
17#include <utility>
18
19namespace Aws
20{
21namespace Utils
22{
23namespace Json
24{
25 class JsonValue;
26 class JsonView;
27} // namespace Json
28} // namespace Utils
29namespace ECS
30{
31namespace Model
32{
33
42 class Cluster
43 {
44 public:
45 AWS_ECS_API Cluster() = default;
46 AWS_ECS_API Cluster(Aws::Utils::Json::JsonView jsonValue);
49
50
52
58 inline const Aws::String& GetClusterArn() const { return m_clusterArn; }
59 inline bool ClusterArnHasBeenSet() const { return m_clusterArnHasBeenSet; }
60 template<typename ClusterArnT = Aws::String>
61 void SetClusterArn(ClusterArnT&& value) { m_clusterArnHasBeenSet = true; m_clusterArn = std::forward<ClusterArnT>(value); }
62 template<typename ClusterArnT = Aws::String>
63 Cluster& WithClusterArn(ClusterArnT&& value) { SetClusterArn(std::forward<ClusterArnT>(value)); return *this;}
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) { m_clusterNameHasBeenSet = true; m_clusterName = std::forward<ClusterNameT>(value); }
74 template<typename ClusterNameT = Aws::String>
75 Cluster& WithClusterName(ClusterNameT&& value) { SetClusterName(std::forward<ClusterNameT>(value)); return *this;}
77
79
82 inline const ClusterConfiguration& GetConfiguration() const { return m_configuration; }
83 inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; }
84 template<typename ConfigurationT = ClusterConfiguration>
85 void SetConfiguration(ConfigurationT&& value) { m_configurationHasBeenSet = true; m_configuration = std::forward<ConfigurationT>(value); }
86 template<typename ConfigurationT = ClusterConfiguration>
87 Cluster& WithConfiguration(ConfigurationT&& value) { SetConfiguration(std::forward<ConfigurationT>(value)); return *this;}
89
91
107 inline const Aws::String& GetStatus() const { return m_status; }
108 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
109 template<typename StatusT = Aws::String>
110 void SetStatus(StatusT&& value) { m_statusHasBeenSet = true; m_status = std::forward<StatusT>(value); }
111 template<typename StatusT = Aws::String>
112 Cluster& WithStatus(StatusT&& value) { SetStatus(std::forward<StatusT>(value)); return *this;}
114
116
121 inline int GetRegisteredContainerInstancesCount() const { return m_registeredContainerInstancesCount; }
122 inline bool RegisteredContainerInstancesCountHasBeenSet() const { return m_registeredContainerInstancesCountHasBeenSet; }
123 inline void SetRegisteredContainerInstancesCount(int value) { m_registeredContainerInstancesCountHasBeenSet = true; m_registeredContainerInstancesCount = value; }
126
128
132 inline int GetRunningTasksCount() const { return m_runningTasksCount; }
133 inline bool RunningTasksCountHasBeenSet() const { return m_runningTasksCountHasBeenSet; }
134 inline void SetRunningTasksCount(int value) { m_runningTasksCountHasBeenSet = true; m_runningTasksCount = value; }
135 inline Cluster& WithRunningTasksCount(int value) { SetRunningTasksCount(value); return *this;}
137
139
143 inline int GetPendingTasksCount() const { return m_pendingTasksCount; }
144 inline bool PendingTasksCountHasBeenSet() const { return m_pendingTasksCountHasBeenSet; }
145 inline void SetPendingTasksCount(int value) { m_pendingTasksCountHasBeenSet = true; m_pendingTasksCount = value; }
146 inline Cluster& WithPendingTasksCount(int value) { SetPendingTasksCount(value); return *this;}
148
150
155 inline int GetActiveServicesCount() const { return m_activeServicesCount; }
156 inline bool ActiveServicesCountHasBeenSet() const { return m_activeServicesCountHasBeenSet; }
157 inline void SetActiveServicesCount(int value) { m_activeServicesCountHasBeenSet = true; m_activeServicesCount = value; }
158 inline Cluster& WithActiveServicesCount(int value) { SetActiveServicesCount(value); return *this;}
160
162
171 inline const Aws::Vector<KeyValuePair>& GetStatistics() const { return m_statistics; }
172 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
173 template<typename StatisticsT = Aws::Vector<KeyValuePair>>
174 void SetStatistics(StatisticsT&& value) { m_statisticsHasBeenSet = true; m_statistics = std::forward<StatisticsT>(value); }
175 template<typename StatisticsT = Aws::Vector<KeyValuePair>>
176 Cluster& WithStatistics(StatisticsT&& value) { SetStatistics(std::forward<StatisticsT>(value)); return *this;}
177 template<typename StatisticsT = KeyValuePair>
178 Cluster& AddStatistics(StatisticsT&& value) { m_statisticsHasBeenSet = true; m_statistics.emplace_back(std::forward<StatisticsT>(value)); return *this; }
180
182
200 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
201 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
202 template<typename TagsT = Aws::Vector<Tag>>
203 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
204 template<typename TagsT = Aws::Vector<Tag>>
205 Cluster& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
206 template<typename TagsT = Tag>
207 Cluster& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
209
211
215 inline const Aws::Vector<ClusterSetting>& GetSettings() const { return m_settings; }
216 inline bool SettingsHasBeenSet() const { return m_settingsHasBeenSet; }
217 template<typename SettingsT = Aws::Vector<ClusterSetting>>
218 void SetSettings(SettingsT&& value) { m_settingsHasBeenSet = true; m_settings = std::forward<SettingsT>(value); }
219 template<typename SettingsT = Aws::Vector<ClusterSetting>>
220 Cluster& WithSettings(SettingsT&& value) { SetSettings(std::forward<SettingsT>(value)); return *this;}
221 template<typename SettingsT = ClusterSetting>
222 Cluster& AddSettings(SettingsT&& value) { m_settingsHasBeenSet = true; m_settings.emplace_back(std::forward<SettingsT>(value)); return *this; }
224
226
229 inline const Aws::Vector<Aws::String>& GetCapacityProviders() const { return m_capacityProviders; }
230 inline bool CapacityProvidersHasBeenSet() const { return m_capacityProvidersHasBeenSet; }
231 template<typename CapacityProvidersT = Aws::Vector<Aws::String>>
232 void SetCapacityProviders(CapacityProvidersT&& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders = std::forward<CapacityProvidersT>(value); }
233 template<typename CapacityProvidersT = Aws::Vector<Aws::String>>
234 Cluster& WithCapacityProviders(CapacityProvidersT&& value) { SetCapacityProviders(std::forward<CapacityProvidersT>(value)); return *this;}
235 template<typename CapacityProvidersT = Aws::String>
236 Cluster& AddCapacityProviders(CapacityProvidersT&& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders.emplace_back(std::forward<CapacityProvidersT>(value)); return *this; }
238
240
245 inline const Aws::Vector<CapacityProviderStrategyItem>& GetDefaultCapacityProviderStrategy() const { return m_defaultCapacityProviderStrategy; }
246 inline bool DefaultCapacityProviderStrategyHasBeenSet() const { return m_defaultCapacityProviderStrategyHasBeenSet; }
247 template<typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
248 void SetDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy = std::forward<DefaultCapacityProviderStrategyT>(value); }
249 template<typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
250 Cluster& WithDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) { SetDefaultCapacityProviderStrategy(std::forward<DefaultCapacityProviderStrategyT>(value)); return *this;}
251 template<typename DefaultCapacityProviderStrategyT = CapacityProviderStrategyItem>
252 Cluster& AddDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy.emplace_back(std::forward<DefaultCapacityProviderStrategyT>(value)); return *this; }
254
256
261 inline const Aws::Vector<Attachment>& GetAttachments() const { return m_attachments; }
262 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
263 template<typename AttachmentsT = Aws::Vector<Attachment>>
264 void SetAttachments(AttachmentsT&& value) { m_attachmentsHasBeenSet = true; m_attachments = std::forward<AttachmentsT>(value); }
265 template<typename AttachmentsT = Aws::Vector<Attachment>>
266 Cluster& WithAttachments(AttachmentsT&& value) { SetAttachments(std::forward<AttachmentsT>(value)); return *this;}
267 template<typename AttachmentsT = Attachment>
268 Cluster& AddAttachments(AttachmentsT&& value) { m_attachmentsHasBeenSet = true; m_attachments.emplace_back(std::forward<AttachmentsT>(value)); return *this; }
270
272
280 inline const Aws::String& GetAttachmentsStatus() const { return m_attachmentsStatus; }
281 inline bool AttachmentsStatusHasBeenSet() const { return m_attachmentsStatusHasBeenSet; }
282 template<typename AttachmentsStatusT = Aws::String>
283 void SetAttachmentsStatus(AttachmentsStatusT&& value) { m_attachmentsStatusHasBeenSet = true; m_attachmentsStatus = std::forward<AttachmentsStatusT>(value); }
284 template<typename AttachmentsStatusT = Aws::String>
285 Cluster& WithAttachmentsStatus(AttachmentsStatusT&& value) { SetAttachmentsStatus(std::forward<AttachmentsStatusT>(value)); return *this;}
287
289
306 inline const ClusterServiceConnectDefaults& GetServiceConnectDefaults() const { return m_serviceConnectDefaults; }
307 inline bool ServiceConnectDefaultsHasBeenSet() const { return m_serviceConnectDefaultsHasBeenSet; }
308 template<typename ServiceConnectDefaultsT = ClusterServiceConnectDefaults>
309 void SetServiceConnectDefaults(ServiceConnectDefaultsT&& value) { m_serviceConnectDefaultsHasBeenSet = true; m_serviceConnectDefaults = std::forward<ServiceConnectDefaultsT>(value); }
310 template<typename ServiceConnectDefaultsT = ClusterServiceConnectDefaults>
311 Cluster& WithServiceConnectDefaults(ServiceConnectDefaultsT&& value) { SetServiceConnectDefaults(std::forward<ServiceConnectDefaultsT>(value)); return *this;}
313 private:
314
315 Aws::String m_clusterArn;
316 bool m_clusterArnHasBeenSet = false;
317
318 Aws::String m_clusterName;
319 bool m_clusterNameHasBeenSet = false;
320
321 ClusterConfiguration m_configuration;
322 bool m_configurationHasBeenSet = false;
323
324 Aws::String m_status;
325 bool m_statusHasBeenSet = false;
326
327 int m_registeredContainerInstancesCount{0};
328 bool m_registeredContainerInstancesCountHasBeenSet = false;
329
330 int m_runningTasksCount{0};
331 bool m_runningTasksCountHasBeenSet = false;
332
333 int m_pendingTasksCount{0};
334 bool m_pendingTasksCountHasBeenSet = false;
335
336 int m_activeServicesCount{0};
337 bool m_activeServicesCountHasBeenSet = false;
338
339 Aws::Vector<KeyValuePair> m_statistics;
340 bool m_statisticsHasBeenSet = false;
341
342 Aws::Vector<Tag> m_tags;
343 bool m_tagsHasBeenSet = false;
344
346 bool m_settingsHasBeenSet = false;
347
348 Aws::Vector<Aws::String> m_capacityProviders;
349 bool m_capacityProvidersHasBeenSet = false;
350
351 Aws::Vector<CapacityProviderStrategyItem> m_defaultCapacityProviderStrategy;
352 bool m_defaultCapacityProviderStrategyHasBeenSet = false;
353
354 Aws::Vector<Attachment> m_attachments;
355 bool m_attachmentsHasBeenSet = false;
356
357 Aws::String m_attachmentsStatus;
358 bool m_attachmentsStatusHasBeenSet = false;
359
360 ClusterServiceConnectDefaults m_serviceConnectDefaults;
361 bool m_serviceConnectDefaultsHasBeenSet = false;
362 };
363
364} // namespace Model
365} // namespace ECS
366} // namespace Aws
void SetAttachments(AttachmentsT &&value)
Definition Cluster.h:264
bool RunningTasksCountHasBeenSet() const
Definition Cluster.h:133
void SetRegisteredContainerInstancesCount(int value)
Definition Cluster.h:123
const ClusterConfiguration & GetConfiguration() const
Definition Cluster.h:82
bool ActiveServicesCountHasBeenSet() const
Definition Cluster.h:156
const Aws::Vector< Tag > & GetTags() const
Definition Cluster.h:200
const Aws::Vector< ClusterSetting > & GetSettings() const
Definition Cluster.h:215
int GetActiveServicesCount() const
Definition Cluster.h:155
const Aws::String & GetClusterName() const
Definition Cluster.h:70
const Aws::Vector< Attachment > & GetAttachments() const
Definition Cluster.h:261
Cluster & WithStatistics(StatisticsT &&value)
Definition Cluster.h:176
bool AttachmentsStatusHasBeenSet() const
Definition Cluster.h:281
Cluster & AddDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
Definition Cluster.h:252
const Aws::String & GetClusterArn() const
Definition Cluster.h:58
bool DefaultCapacityProviderStrategyHasBeenSet() const
Definition Cluster.h:246
Cluster & AddStatistics(StatisticsT &&value)
Definition Cluster.h:178
Cluster & WithSettings(SettingsT &&value)
Definition Cluster.h:220
void SetClusterArn(ClusterArnT &&value)
Definition Cluster.h:61
void SetCapacityProviders(CapacityProvidersT &&value)
Definition Cluster.h:232
bool TagsHasBeenSet() const
Definition Cluster.h:201
AWS_ECS_API Cluster()=default
int GetPendingTasksCount() const
Definition Cluster.h:143
Cluster & WithCapacityProviders(CapacityProvidersT &&value)
Definition Cluster.h:234
void SetTags(TagsT &&value)
Definition Cluster.h:203
void SetStatus(StatusT &&value)
Definition Cluster.h:110
Cluster & WithStatus(StatusT &&value)
Definition Cluster.h:112
bool StatusHasBeenSet() const
Definition Cluster.h:108
bool ServiceConnectDefaultsHasBeenSet() const
Definition Cluster.h:307
bool CapacityProvidersHasBeenSet() const
Definition Cluster.h:230
Cluster & WithPendingTasksCount(int value)
Definition Cluster.h:146
Cluster & WithConfiguration(ConfigurationT &&value)
Definition Cluster.h:87
const ClusterServiceConnectDefaults & GetServiceConnectDefaults() const
Definition Cluster.h:306
Cluster & WithDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
Definition Cluster.h:250
Cluster & WithActiveServicesCount(int value)
Definition Cluster.h:158
Cluster & AddSettings(SettingsT &&value)
Definition Cluster.h:222
bool AttachmentsHasBeenSet() const
Definition Cluster.h:262
void SetStatistics(StatisticsT &&value)
Definition Cluster.h:174
bool ClusterArnHasBeenSet() const
Definition Cluster.h:59
int GetRunningTasksCount() const
Definition Cluster.h:132
bool PendingTasksCountHasBeenSet() const
Definition Cluster.h:144
bool ConfigurationHasBeenSet() const
Definition Cluster.h:83
Cluster & WithAttachmentsStatus(AttachmentsStatusT &&value)
Definition Cluster.h:285
Cluster & WithServiceConnectDefaults(ServiceConnectDefaultsT &&value)
Definition Cluster.h:311
Cluster & WithRunningTasksCount(int value)
Definition Cluster.h:135
int GetRegisteredContainerInstancesCount() const
Definition Cluster.h:121
void SetRunningTasksCount(int value)
Definition Cluster.h:134
bool SettingsHasBeenSet() const
Definition Cluster.h:216
void SetClusterName(ClusterNameT &&value)
Definition Cluster.h:73
void SetSettings(SettingsT &&value)
Definition Cluster.h:218
bool RegisteredContainerInstancesCountHasBeenSet() const
Definition Cluster.h:122
void SetDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
Definition Cluster.h:248
void SetActiveServicesCount(int value)
Definition Cluster.h:157
Cluster & AddCapacityProviders(CapacityProvidersT &&value)
Definition Cluster.h:236
AWS_ECS_API Cluster & operator=(Aws::Utils::Json::JsonView jsonValue)
Cluster & AddAttachments(AttachmentsT &&value)
Definition Cluster.h:268
Cluster & AddTags(TagsT &&value)
Definition Cluster.h:207
bool StatisticsHasBeenSet() const
Definition Cluster.h:172
void SetAttachmentsStatus(AttachmentsStatusT &&value)
Definition Cluster.h:283
Cluster & WithClusterName(ClusterNameT &&value)
Definition Cluster.h:75
Cluster & WithTags(TagsT &&value)
Definition Cluster.h:205
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< Aws::String > & GetCapacityProviders() const
Definition Cluster.h:229
Cluster & WithAttachments(AttachmentsT &&value)
Definition Cluster.h:266
bool ClusterNameHasBeenSet() const
Definition Cluster.h:71
const Aws::Vector< CapacityProviderStrategyItem > & GetDefaultCapacityProviderStrategy() const
Definition Cluster.h:245
void SetServiceConnectDefaults(ServiceConnectDefaultsT &&value)
Definition Cluster.h:309
const Aws::String & GetAttachmentsStatus() const
Definition Cluster.h:280
Cluster & WithRegisteredContainerInstancesCount(int value)
Definition Cluster.h:124
const Aws::String & GetStatus() const
Definition Cluster.h:107
void SetConfiguration(ConfigurationT &&value)
Definition Cluster.h:85
Cluster & WithClusterArn(ClusterArnT &&value)
Definition Cluster.h:63
AWS_ECS_API Cluster(Aws::Utils::Json::JsonView jsonValue)
void SetPendingTasksCount(int value)
Definition Cluster.h:145
const Aws::Vector< KeyValuePair > & GetStatistics() const
Definition Cluster.h:171
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue