AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ContainerInstance.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/VersionInfo.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ecs/model/AgentUpdateStatus.h>
12#include <aws/core/utils/DateTime.h>
13#include <aws/ecs/model/ContainerInstanceHealthStatus.h>
14#include <aws/ecs/model/Resource.h>
15#include <aws/ecs/model/Attribute.h>
16#include <aws/ecs/model/Attachment.h>
17#include <aws/ecs/model/Tag.h>
18#include <utility>
19
20namespace Aws
21{
22namespace Utils
23{
24namespace Json
25{
26 class JsonValue;
27 class JsonView;
28} // namespace Json
29} // namespace Utils
30namespace ECS
31{
32namespace Model
33{
34
42 {
43 public:
44 AWS_ECS_API ContainerInstance();
48
49
51
57 inline const Aws::String& GetContainerInstanceArn() const{ return m_containerInstanceArn; }
58 inline bool ContainerInstanceArnHasBeenSet() const { return m_containerInstanceArnHasBeenSet; }
59 inline void SetContainerInstanceArn(const Aws::String& value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn = value; }
60 inline void SetContainerInstanceArn(Aws::String&& value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn = std::move(value); }
61 inline void SetContainerInstanceArn(const char* value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn.assign(value); }
63 inline ContainerInstance& WithContainerInstanceArn(Aws::String&& value) { SetContainerInstanceArn(std::move(value)); return *this;}
64 inline ContainerInstance& WithContainerInstanceArn(const char* value) { SetContainerInstanceArn(value); return *this;}
66
68
73 inline const Aws::String& GetEc2InstanceId() const{ return m_ec2InstanceId; }
74 inline bool Ec2InstanceIdHasBeenSet() const { return m_ec2InstanceIdHasBeenSet; }
75 inline void SetEc2InstanceId(const Aws::String& value) { m_ec2InstanceIdHasBeenSet = true; m_ec2InstanceId = value; }
76 inline void SetEc2InstanceId(Aws::String&& value) { m_ec2InstanceIdHasBeenSet = true; m_ec2InstanceId = std::move(value); }
77 inline void SetEc2InstanceId(const char* value) { m_ec2InstanceIdHasBeenSet = true; m_ec2InstanceId.assign(value); }
78 inline ContainerInstance& WithEc2InstanceId(const Aws::String& value) { SetEc2InstanceId(value); return *this;}
79 inline ContainerInstance& WithEc2InstanceId(Aws::String&& value) { SetEc2InstanceId(std::move(value)); return *this;}
80 inline ContainerInstance& WithEc2InstanceId(const char* value) { SetEc2InstanceId(value); return *this;}
82
84
87 inline const Aws::String& GetCapacityProviderName() const{ return m_capacityProviderName; }
88 inline bool CapacityProviderNameHasBeenSet() const { return m_capacityProviderNameHasBeenSet; }
89 inline void SetCapacityProviderName(const Aws::String& value) { m_capacityProviderNameHasBeenSet = true; m_capacityProviderName = value; }
90 inline void SetCapacityProviderName(Aws::String&& value) { m_capacityProviderNameHasBeenSet = true; m_capacityProviderName = std::move(value); }
91 inline void SetCapacityProviderName(const char* value) { m_capacityProviderNameHasBeenSet = true; m_capacityProviderName.assign(value); }
93 inline ContainerInstance& WithCapacityProviderName(Aws::String&& value) { SetCapacityProviderName(std::move(value)); return *this;}
94 inline ContainerInstance& WithCapacityProviderName(const char* value) { SetCapacityProviderName(value); return *this;}
96
98
107 inline long long GetVersion() const{ return m_version; }
108 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
109 inline void SetVersion(long long value) { m_versionHasBeenSet = true; m_version = value; }
110 inline ContainerInstance& WithVersion(long long value) { SetVersion(value); return *this;}
112
114
118 inline const VersionInfo& GetVersionInfo() const{ return m_versionInfo; }
119 inline bool VersionInfoHasBeenSet() const { return m_versionInfoHasBeenSet; }
120 inline void SetVersionInfo(const VersionInfo& value) { m_versionInfoHasBeenSet = true; m_versionInfo = value; }
121 inline void SetVersionInfo(VersionInfo&& value) { m_versionInfoHasBeenSet = true; m_versionInfo = std::move(value); }
122 inline ContainerInstance& WithVersionInfo(const VersionInfo& value) { SetVersionInfo(value); return *this;}
123 inline ContainerInstance& WithVersionInfo(VersionInfo&& value) { SetVersionInfo(std::move(value)); return *this;}
125
127
136 inline const Aws::Vector<Resource>& GetRemainingResources() const{ return m_remainingResources; }
137 inline bool RemainingResourcesHasBeenSet() const { return m_remainingResourcesHasBeenSet; }
138 inline void SetRemainingResources(const Aws::Vector<Resource>& value) { m_remainingResourcesHasBeenSet = true; m_remainingResources = value; }
139 inline void SetRemainingResources(Aws::Vector<Resource>&& value) { m_remainingResourcesHasBeenSet = true; m_remainingResources = std::move(value); }
141 inline ContainerInstance& WithRemainingResources(Aws::Vector<Resource>&& value) { SetRemainingResources(std::move(value)); return *this;}
142 inline ContainerInstance& AddRemainingResources(const Resource& value) { m_remainingResourcesHasBeenSet = true; m_remainingResources.push_back(value); return *this; }
143 inline ContainerInstance& AddRemainingResources(Resource&& value) { m_remainingResourcesHasBeenSet = true; m_remainingResources.push_back(std::move(value)); return *this; }
145
147
156 inline const Aws::Vector<Resource>& GetRegisteredResources() const{ return m_registeredResources; }
157 inline bool RegisteredResourcesHasBeenSet() const { return m_registeredResourcesHasBeenSet; }
158 inline void SetRegisteredResources(const Aws::Vector<Resource>& value) { m_registeredResourcesHasBeenSet = true; m_registeredResources = value; }
159 inline void SetRegisteredResources(Aws::Vector<Resource>&& value) { m_registeredResourcesHasBeenSet = true; m_registeredResources = std::move(value); }
162 inline ContainerInstance& AddRegisteredResources(const Resource& value) { m_registeredResourcesHasBeenSet = true; m_registeredResources.push_back(value); return *this; }
163 inline ContainerInstance& AddRegisteredResources(Resource&& value) { m_registeredResourcesHasBeenSet = true; m_registeredResources.push_back(std::move(value)); return *this; }
165
167
189 inline const Aws::String& GetStatus() const{ return m_status; }
190 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
191 inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; }
192 inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
193 inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); }
194 inline ContainerInstance& WithStatus(const Aws::String& value) { SetStatus(value); return *this;}
195 inline ContainerInstance& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;}
196 inline ContainerInstance& WithStatus(const char* value) { SetStatus(value); return *this;}
198
200
203 inline const Aws::String& GetStatusReason() const{ return m_statusReason; }
204 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
205 inline void SetStatusReason(const Aws::String& value) { m_statusReasonHasBeenSet = true; m_statusReason = value; }
206 inline void SetStatusReason(Aws::String&& value) { m_statusReasonHasBeenSet = true; m_statusReason = std::move(value); }
207 inline void SetStatusReason(const char* value) { m_statusReasonHasBeenSet = true; m_statusReason.assign(value); }
208 inline ContainerInstance& WithStatusReason(const Aws::String& value) { SetStatusReason(value); return *this;}
209 inline ContainerInstance& WithStatusReason(Aws::String&& value) { SetStatusReason(std::move(value)); return *this;}
210 inline ContainerInstance& WithStatusReason(const char* value) { SetStatusReason(value); return *this;}
212
214
220 inline bool GetAgentConnected() const{ return m_agentConnected; }
221 inline bool AgentConnectedHasBeenSet() const { return m_agentConnectedHasBeenSet; }
222 inline void SetAgentConnected(bool value) { m_agentConnectedHasBeenSet = true; m_agentConnected = value; }
223 inline ContainerInstance& WithAgentConnected(bool value) { SetAgentConnected(value); return *this;}
225
227
231 inline int GetRunningTasksCount() const{ return m_runningTasksCount; }
232 inline bool RunningTasksCountHasBeenSet() const { return m_runningTasksCountHasBeenSet; }
233 inline void SetRunningTasksCount(int value) { m_runningTasksCountHasBeenSet = true; m_runningTasksCount = value; }
234 inline ContainerInstance& WithRunningTasksCount(int value) { SetRunningTasksCount(value); return *this;}
236
238
242 inline int GetPendingTasksCount() const{ return m_pendingTasksCount; }
243 inline bool PendingTasksCountHasBeenSet() const { return m_pendingTasksCountHasBeenSet; }
244 inline void SetPendingTasksCount(int value) { m_pendingTasksCountHasBeenSet = true; m_pendingTasksCount = value; }
245 inline ContainerInstance& WithPendingTasksCount(int value) { SetPendingTasksCount(value); return *this;}
247
249
253 inline const AgentUpdateStatus& GetAgentUpdateStatus() const{ return m_agentUpdateStatus; }
254 inline bool AgentUpdateStatusHasBeenSet() const { return m_agentUpdateStatusHasBeenSet; }
255 inline void SetAgentUpdateStatus(const AgentUpdateStatus& value) { m_agentUpdateStatusHasBeenSet = true; m_agentUpdateStatus = value; }
256 inline void SetAgentUpdateStatus(AgentUpdateStatus&& value) { m_agentUpdateStatusHasBeenSet = true; m_agentUpdateStatus = std::move(value); }
258 inline ContainerInstance& WithAgentUpdateStatus(AgentUpdateStatus&& value) { SetAgentUpdateStatus(std::move(value)); return *this;}
260
262
268 inline const Aws::Vector<Attribute>& GetAttributes() const{ return m_attributes; }
269 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
270 inline void SetAttributes(const Aws::Vector<Attribute>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
271 inline void SetAttributes(Aws::Vector<Attribute>&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); }
272 inline ContainerInstance& WithAttributes(const Aws::Vector<Attribute>& value) { SetAttributes(value); return *this;}
273 inline ContainerInstance& WithAttributes(Aws::Vector<Attribute>&& value) { SetAttributes(std::move(value)); return *this;}
274 inline ContainerInstance& AddAttributes(const Attribute& value) { m_attributesHasBeenSet = true; m_attributes.push_back(value); return *this; }
275 inline ContainerInstance& AddAttributes(Attribute&& value) { m_attributesHasBeenSet = true; m_attributes.push_back(std::move(value)); return *this; }
277
279
283 inline const Aws::Utils::DateTime& GetRegisteredAt() const{ return m_registeredAt; }
284 inline bool RegisteredAtHasBeenSet() const { return m_registeredAtHasBeenSet; }
285 inline void SetRegisteredAt(const Aws::Utils::DateTime& value) { m_registeredAtHasBeenSet = true; m_registeredAt = value; }
286 inline void SetRegisteredAt(Aws::Utils::DateTime&& value) { m_registeredAtHasBeenSet = true; m_registeredAt = std::move(value); }
287 inline ContainerInstance& WithRegisteredAt(const Aws::Utils::DateTime& value) { SetRegisteredAt(value); return *this;}
288 inline ContainerInstance& WithRegisteredAt(Aws::Utils::DateTime&& value) { SetRegisteredAt(std::move(value)); return *this;}
290
292
296 inline const Aws::Vector<Attachment>& GetAttachments() const{ return m_attachments; }
297 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
298 inline void SetAttachments(const Aws::Vector<Attachment>& value) { m_attachmentsHasBeenSet = true; m_attachments = value; }
299 inline void SetAttachments(Aws::Vector<Attachment>&& value) { m_attachmentsHasBeenSet = true; m_attachments = std::move(value); }
300 inline ContainerInstance& WithAttachments(const Aws::Vector<Attachment>& value) { SetAttachments(value); return *this;}
301 inline ContainerInstance& WithAttachments(Aws::Vector<Attachment>&& value) { SetAttachments(std::move(value)); return *this;}
302 inline ContainerInstance& AddAttachments(const Attachment& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(value); return *this; }
303 inline ContainerInstance& AddAttachments(Attachment&& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(std::move(value)); return *this; }
305
307
325 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
326 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
327 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
328 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
329 inline ContainerInstance& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
330 inline ContainerInstance& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
331 inline ContainerInstance& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
332 inline ContainerInstance& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
334
336
339 inline const ContainerInstanceHealthStatus& GetHealthStatus() const{ return m_healthStatus; }
340 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
341 inline void SetHealthStatus(const ContainerInstanceHealthStatus& value) { m_healthStatusHasBeenSet = true; m_healthStatus = value; }
342 inline void SetHealthStatus(ContainerInstanceHealthStatus&& value) { m_healthStatusHasBeenSet = true; m_healthStatus = std::move(value); }
344 inline ContainerInstance& WithHealthStatus(ContainerInstanceHealthStatus&& value) { SetHealthStatus(std::move(value)); return *this;}
346 private:
347
348 Aws::String m_containerInstanceArn;
349 bool m_containerInstanceArnHasBeenSet = false;
350
351 Aws::String m_ec2InstanceId;
352 bool m_ec2InstanceIdHasBeenSet = false;
353
354 Aws::String m_capacityProviderName;
355 bool m_capacityProviderNameHasBeenSet = false;
356
357 long long m_version;
358 bool m_versionHasBeenSet = false;
359
360 VersionInfo m_versionInfo;
361 bool m_versionInfoHasBeenSet = false;
362
363 Aws::Vector<Resource> m_remainingResources;
364 bool m_remainingResourcesHasBeenSet = false;
365
366 Aws::Vector<Resource> m_registeredResources;
367 bool m_registeredResourcesHasBeenSet = false;
368
369 Aws::String m_status;
370 bool m_statusHasBeenSet = false;
371
372 Aws::String m_statusReason;
373 bool m_statusReasonHasBeenSet = false;
374
375 bool m_agentConnected;
376 bool m_agentConnectedHasBeenSet = false;
377
378 int m_runningTasksCount;
379 bool m_runningTasksCountHasBeenSet = false;
380
381 int m_pendingTasksCount;
382 bool m_pendingTasksCountHasBeenSet = false;
383
384 AgentUpdateStatus m_agentUpdateStatus;
385 bool m_agentUpdateStatusHasBeenSet = false;
386
387 Aws::Vector<Attribute> m_attributes;
388 bool m_attributesHasBeenSet = false;
389
390 Aws::Utils::DateTime m_registeredAt;
391 bool m_registeredAtHasBeenSet = false;
392
393 Aws::Vector<Attachment> m_attachments;
394 bool m_attachmentsHasBeenSet = false;
395
396 Aws::Vector<Tag> m_tags;
397 bool m_tagsHasBeenSet = false;
398
399 ContainerInstanceHealthStatus m_healthStatus;
400 bool m_healthStatusHasBeenSet = false;
401 };
402
403} // namespace Model
404} // namespace ECS
405} // namespace Aws
const Aws::String & GetStatusReason() const
ContainerInstance & WithRegisteredAt(Aws::Utils::DateTime &&value)
const ContainerInstanceHealthStatus & GetHealthStatus() const
void SetAttributes(Aws::Vector< Attribute > &&value)
ContainerInstance & WithAgentUpdateStatus(AgentUpdateStatus &&value)
void SetRegisteredResources(Aws::Vector< Resource > &&value)
void SetStatus(const Aws::String &value)
ContainerInstance & AddAttributes(const Attribute &value)
ContainerInstance & WithEc2InstanceId(Aws::String &&value)
const Aws::Vector< Attachment > & GetAttachments() const
ContainerInstance & WithHealthStatus(ContainerInstanceHealthStatus &&value)
ContainerInstance & WithVersionInfo(VersionInfo &&value)
void SetCapacityProviderName(const Aws::String &value)
ContainerInstance & WithContainerInstanceArn(const Aws::String &value)
void SetContainerInstanceArn(const char *value)
ContainerInstance & WithRegisteredAt(const Aws::Utils::DateTime &value)
void SetStatusReason(Aws::String &&value)
void SetRemainingResources(Aws::Vector< Resource > &&value)
ContainerInstance & WithVersionInfo(const VersionInfo &value)
ContainerInstance & WithAttachments(const Aws::Vector< Attachment > &value)
ContainerInstance & AddRegisteredResources(Resource &&value)
void SetAttributes(const Aws::Vector< Attribute > &value)
void SetAgentUpdateStatus(AgentUpdateStatus &&value)
ContainerInstance & WithRegisteredResources(Aws::Vector< Resource > &&value)
const Aws::Vector< Resource > & GetRemainingResources() const
const Aws::String & GetEc2InstanceId() const
void SetEc2InstanceId(Aws::String &&value)
void SetContainerInstanceArn(Aws::String &&value)
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetAgentUpdateStatus(const AgentUpdateStatus &value)
ContainerInstance & WithPendingTasksCount(int value)
void SetContainerInstanceArn(const Aws::String &value)
const Aws::String & GetContainerInstanceArn() const
const VersionInfo & GetVersionInfo() const
void SetEc2InstanceId(const char *value)
void SetHealthStatus(ContainerInstanceHealthStatus &&value)
ContainerInstance & WithCapacityProviderName(const Aws::String &value)
ContainerInstance & WithContainerInstanceArn(const char *value)
void SetTags(Aws::Vector< Tag > &&value)
ContainerInstance & WithStatus(const Aws::String &value)
ContainerInstance & WithContainerInstanceArn(Aws::String &&value)
ContainerInstance & WithAttributes(Aws::Vector< Attribute > &&value)
ContainerInstance & AddAttachments(Attachment &&value)
ContainerInstance & WithEc2InstanceId(const Aws::String &value)
ContainerInstance & WithAttachments(Aws::Vector< Attachment > &&value)
void SetCapacityProviderName(Aws::String &&value)
ContainerInstance & WithRemainingResources(Aws::Vector< Resource > &&value)
void SetRegisteredAt(Aws::Utils::DateTime &&value)
ContainerInstance & AddTags(Tag &&value)
ContainerInstance & AddRemainingResources(Resource &&value)
void SetStatus(Aws::String &&value)
ContainerInstance & WithStatusReason(Aws::String &&value)
ContainerInstance & WithCapacityProviderName(Aws::String &&value)
ContainerInstance & WithStatus(Aws::String &&value)
ContainerInstance & WithStatusReason(const char *value)
void SetVersionInfo(const VersionInfo &value)
void SetStatusReason(const char *value)
ContainerInstance & WithAgentUpdateStatus(const AgentUpdateStatus &value)
void SetStatusReason(const Aws::String &value)
ContainerInstance & WithTags(Aws::Vector< Tag > &&value)
const AgentUpdateStatus & GetAgentUpdateStatus() const
ContainerInstance & WithCapacityProviderName(const char *value)
ContainerInstance & WithHealthStatus(const ContainerInstanceHealthStatus &value)
ContainerInstance & WithEc2InstanceId(const char *value)
ContainerInstance & AddRemainingResources(const Resource &value)
ContainerInstance & AddRegisteredResources(const Resource &value)
void SetRemainingResources(const Aws::Vector< Resource > &value)
const Aws::String & GetStatus() const
void SetTags(const Aws::Vector< Tag > &value)
ContainerInstance & WithRemainingResources(const Aws::Vector< Resource > &value)
void SetHealthStatus(const ContainerInstanceHealthStatus &value)
const Aws::String & GetCapacityProviderName() const
ContainerInstance & WithAttributes(const Aws::Vector< Attribute > &value)
ContainerInstance & WithStatus(const char *value)
ContainerInstance & WithVersion(long long value)
ContainerInstance & WithStatusReason(const Aws::String &value)
void SetEc2InstanceId(const Aws::String &value)
ContainerInstance & WithAgentConnected(bool value)
AWS_ECS_API ContainerInstance & operator=(Aws::Utils::Json::JsonView jsonValue)
ContainerInstance & AddAttachments(const Attachment &value)
void SetRegisteredResources(const Aws::Vector< Resource > &value)
const Aws::Vector< Resource > & GetRegisteredResources() const
ContainerInstance & WithTags(const Aws::Vector< Tag > &value)
AWS_ECS_API ContainerInstance(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Tag > & GetTags() const
const Aws::Vector< Attribute > & GetAttributes() const
void SetAttachments(const Aws::Vector< Attachment > &value)
void SetVersionInfo(VersionInfo &&value)
ContainerInstance & AddTags(const Tag &value)
ContainerInstance & WithRegisteredResources(const Aws::Vector< Resource > &value)
void SetCapacityProviderName(const char *value)
const Aws::Utils::DateTime & GetRegisteredAt() const
void SetAttachments(Aws::Vector< Attachment > &&value)
ContainerInstance & WithRunningTasksCount(int value)
void SetRegisteredAt(const Aws::Utils::DateTime &value)
ContainerInstance & AddAttributes(Attribute &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue