AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Task.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ecs/ECS_EXPORTS.h>
11#include <aws/ecs/model/Attachment.h>
12#include <aws/ecs/model/Attribute.h>
13#include <aws/ecs/model/Connectivity.h>
14#include <aws/ecs/model/Container.h>
15#include <aws/ecs/model/EphemeralStorage.h>
16#include <aws/ecs/model/HealthStatus.h>
17#include <aws/ecs/model/InferenceAccelerator.h>
18#include <aws/ecs/model/LaunchType.h>
19#include <aws/ecs/model/Tag.h>
20#include <aws/ecs/model/TaskEphemeralStorage.h>
21#include <aws/ecs/model/TaskOverride.h>
22#include <aws/ecs/model/TaskStopCode.h>
23
24#include <utility>
25
26namespace Aws {
27namespace Utils {
28namespace Json {
29class JsonValue;
30class JsonView;
31} // namespace Json
32} // namespace Utils
33namespace ECS {
34namespace Model {
35
41class Task {
42 public:
43 AWS_ECS_API Task() = default;
44 AWS_ECS_API Task(Aws::Utils::Json::JsonView jsonValue);
45 AWS_ECS_API Task& operator=(Aws::Utils::Json::JsonView jsonValue);
47
49
53 inline const Aws::Vector<Attachment>& GetAttachments() const { return m_attachments; }
54 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
55 template <typename AttachmentsT = Aws::Vector<Attachment>>
56 void SetAttachments(AttachmentsT&& value) {
57 m_attachmentsHasBeenSet = true;
58 m_attachments = std::forward<AttachmentsT>(value);
59 }
60 template <typename AttachmentsT = Aws::Vector<Attachment>>
61 Task& WithAttachments(AttachmentsT&& value) {
62 SetAttachments(std::forward<AttachmentsT>(value));
63 return *this;
64 }
65 template <typename AttachmentsT = Attachment>
66 Task& AddAttachments(AttachmentsT&& value) {
67 m_attachmentsHasBeenSet = true;
68 m_attachments.emplace_back(std::forward<AttachmentsT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::Vector<Attribute>& GetAttributes() const { return m_attributes; }
78 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
79 template <typename AttributesT = Aws::Vector<Attribute>>
80 void SetAttributes(AttributesT&& value) {
81 m_attributesHasBeenSet = true;
82 m_attributes = std::forward<AttributesT>(value);
83 }
84 template <typename AttributesT = Aws::Vector<Attribute>>
85 Task& WithAttributes(AttributesT&& value) {
86 SetAttributes(std::forward<AttributesT>(value));
87 return *this;
88 }
89 template <typename AttributesT = Attribute>
90 Task& AddAttributes(AttributesT&& value) {
91 m_attributesHasBeenSet = true;
92 m_attributes.emplace_back(std::forward<AttributesT>(value));
93 return *this;
94 }
96
98
101 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
102 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
103 template <typename AvailabilityZoneT = Aws::String>
104 void SetAvailabilityZone(AvailabilityZoneT&& value) {
105 m_availabilityZoneHasBeenSet = true;
106 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
107 }
108 template <typename AvailabilityZoneT = Aws::String>
109 Task& WithAvailabilityZone(AvailabilityZoneT&& value) {
110 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
111 return *this;
112 }
114
116
119 inline const Aws::String& GetCapacityProviderName() const { return m_capacityProviderName; }
120 inline bool CapacityProviderNameHasBeenSet() const { return m_capacityProviderNameHasBeenSet; }
121 template <typename CapacityProviderNameT = Aws::String>
122 void SetCapacityProviderName(CapacityProviderNameT&& value) {
123 m_capacityProviderNameHasBeenSet = true;
124 m_capacityProviderName = std::forward<CapacityProviderNameT>(value);
125 }
126 template <typename CapacityProviderNameT = Aws::String>
127 Task& WithCapacityProviderName(CapacityProviderNameT&& value) {
128 SetCapacityProviderName(std::forward<CapacityProviderNameT>(value));
129 return *this;
130 }
132
134
137 inline const Aws::String& GetClusterArn() const { return m_clusterArn; }
138 inline bool ClusterArnHasBeenSet() const { return m_clusterArnHasBeenSet; }
139 template <typename ClusterArnT = Aws::String>
140 void SetClusterArn(ClusterArnT&& value) {
141 m_clusterArnHasBeenSet = true;
142 m_clusterArn = std::forward<ClusterArnT>(value);
143 }
144 template <typename ClusterArnT = Aws::String>
145 Task& WithClusterArn(ClusterArnT&& value) {
146 SetClusterArn(std::forward<ClusterArnT>(value));
147 return *this;
148 }
150
152
155 inline Connectivity GetConnectivity() const { return m_connectivity; }
156 inline bool ConnectivityHasBeenSet() const { return m_connectivityHasBeenSet; }
157 inline void SetConnectivity(Connectivity value) {
158 m_connectivityHasBeenSet = true;
159 m_connectivity = value;
160 }
162 SetConnectivity(value);
163 return *this;
164 }
166
168
172 inline const Aws::Utils::DateTime& GetConnectivityAt() const { return m_connectivityAt; }
173 inline bool ConnectivityAtHasBeenSet() const { return m_connectivityAtHasBeenSet; }
174 template <typename ConnectivityAtT = Aws::Utils::DateTime>
175 void SetConnectivityAt(ConnectivityAtT&& value) {
176 m_connectivityAtHasBeenSet = true;
177 m_connectivityAt = std::forward<ConnectivityAtT>(value);
178 }
179 template <typename ConnectivityAtT = Aws::Utils::DateTime>
180 Task& WithConnectivityAt(ConnectivityAtT&& value) {
181 SetConnectivityAt(std::forward<ConnectivityAtT>(value));
182 return *this;
183 }
185
187
190 inline const Aws::String& GetContainerInstanceArn() const { return m_containerInstanceArn; }
191 inline bool ContainerInstanceArnHasBeenSet() const { return m_containerInstanceArnHasBeenSet; }
192 template <typename ContainerInstanceArnT = Aws::String>
193 void SetContainerInstanceArn(ContainerInstanceArnT&& value) {
194 m_containerInstanceArnHasBeenSet = true;
195 m_containerInstanceArn = std::forward<ContainerInstanceArnT>(value);
196 }
197 template <typename ContainerInstanceArnT = Aws::String>
198 Task& WithContainerInstanceArn(ContainerInstanceArnT&& value) {
199 SetContainerInstanceArn(std::forward<ContainerInstanceArnT>(value));
200 return *this;
201 }
203
205
208 inline const Aws::Vector<Container>& GetContainers() const { return m_containers; }
209 inline bool ContainersHasBeenSet() const { return m_containersHasBeenSet; }
210 template <typename ContainersT = Aws::Vector<Container>>
211 void SetContainers(ContainersT&& value) {
212 m_containersHasBeenSet = true;
213 m_containers = std::forward<ContainersT>(value);
214 }
215 template <typename ContainersT = Aws::Vector<Container>>
216 Task& WithContainers(ContainersT&& value) {
217 SetContainers(std::forward<ContainersT>(value));
218 return *this;
219 }
220 template <typename ContainersT = Container>
221 Task& AddContainers(ContainersT&& value) {
222 m_containersHasBeenSet = true;
223 m_containers.emplace_back(std::forward<ContainersT>(value));
224 return *this;
225 }
227
229
244 inline const Aws::String& GetCpu() const { return m_cpu; }
245 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
246 template <typename CpuT = Aws::String>
247 void SetCpu(CpuT&& value) {
248 m_cpuHasBeenSet = true;
249 m_cpu = std::forward<CpuT>(value);
250 }
251 template <typename CpuT = Aws::String>
252 Task& WithCpu(CpuT&& value) {
253 SetCpu(std::forward<CpuT>(value));
254 return *this;
255 }
257
259
263 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
264 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
265 template <typename CreatedAtT = Aws::Utils::DateTime>
266 void SetCreatedAt(CreatedAtT&& value) {
267 m_createdAtHasBeenSet = true;
268 m_createdAt = std::forward<CreatedAtT>(value);
269 }
270 template <typename CreatedAtT = Aws::Utils::DateTime>
271 Task& WithCreatedAt(CreatedAtT&& value) {
272 SetCreatedAt(std::forward<CreatedAtT>(value));
273 return *this;
274 }
276
278
283 inline const Aws::String& GetDesiredStatus() const { return m_desiredStatus; }
284 inline bool DesiredStatusHasBeenSet() const { return m_desiredStatusHasBeenSet; }
285 template <typename DesiredStatusT = Aws::String>
286 void SetDesiredStatus(DesiredStatusT&& value) {
287 m_desiredStatusHasBeenSet = true;
288 m_desiredStatus = std::forward<DesiredStatusT>(value);
289 }
290 template <typename DesiredStatusT = Aws::String>
291 Task& WithDesiredStatus(DesiredStatusT&& value) {
292 SetDesiredStatus(std::forward<DesiredStatusT>(value));
293 return *this;
294 }
296
298
303 inline bool GetEnableExecuteCommand() const { return m_enableExecuteCommand; }
304 inline bool EnableExecuteCommandHasBeenSet() const { return m_enableExecuteCommandHasBeenSet; }
305 inline void SetEnableExecuteCommand(bool value) {
306 m_enableExecuteCommandHasBeenSet = true;
307 m_enableExecuteCommand = value;
308 }
309 inline Task& WithEnableExecuteCommand(bool value) {
311 return *this;
312 }
314
316
319 inline const Aws::Utils::DateTime& GetExecutionStoppedAt() const { return m_executionStoppedAt; }
320 inline bool ExecutionStoppedAtHasBeenSet() const { return m_executionStoppedAtHasBeenSet; }
321 template <typename ExecutionStoppedAtT = Aws::Utils::DateTime>
322 void SetExecutionStoppedAt(ExecutionStoppedAtT&& value) {
323 m_executionStoppedAtHasBeenSet = true;
324 m_executionStoppedAt = std::forward<ExecutionStoppedAtT>(value);
325 }
326 template <typename ExecutionStoppedAtT = Aws::Utils::DateTime>
327 Task& WithExecutionStoppedAt(ExecutionStoppedAtT&& value) {
328 SetExecutionStoppedAt(std::forward<ExecutionStoppedAtT>(value));
329 return *this;
330 }
332
334
337 inline const Aws::String& GetGroup() const { return m_group; }
338 inline bool GroupHasBeenSet() const { return m_groupHasBeenSet; }
339 template <typename GroupT = Aws::String>
340 void SetGroup(GroupT&& value) {
341 m_groupHasBeenSet = true;
342 m_group = std::forward<GroupT>(value);
343 }
344 template <typename GroupT = Aws::String>
345 Task& WithGroup(GroupT&& value) {
346 SetGroup(std::forward<GroupT>(value));
347 return *this;
348 }
350
352
366 inline HealthStatus GetHealthStatus() const { return m_healthStatus; }
367 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
368 inline void SetHealthStatus(HealthStatus value) {
369 m_healthStatusHasBeenSet = true;
370 m_healthStatus = value;
371 }
373 SetHealthStatus(value);
374 return *this;
375 }
377
379
382 inline const Aws::Vector<InferenceAccelerator>& GetInferenceAccelerators() const { return m_inferenceAccelerators; }
383 inline bool InferenceAcceleratorsHasBeenSet() const { return m_inferenceAcceleratorsHasBeenSet; }
384 template <typename InferenceAcceleratorsT = Aws::Vector<InferenceAccelerator>>
385 void SetInferenceAccelerators(InferenceAcceleratorsT&& value) {
386 m_inferenceAcceleratorsHasBeenSet = true;
387 m_inferenceAccelerators = std::forward<InferenceAcceleratorsT>(value);
388 }
389 template <typename InferenceAcceleratorsT = Aws::Vector<InferenceAccelerator>>
390 Task& WithInferenceAccelerators(InferenceAcceleratorsT&& value) {
391 SetInferenceAccelerators(std::forward<InferenceAcceleratorsT>(value));
392 return *this;
393 }
394 template <typename InferenceAcceleratorsT = InferenceAccelerator>
395 Task& AddInferenceAccelerators(InferenceAcceleratorsT&& value) {
396 m_inferenceAcceleratorsHasBeenSet = true;
397 m_inferenceAccelerators.emplace_back(std::forward<InferenceAcceleratorsT>(value));
398 return *this;
399 }
401
403
408 inline const Aws::String& GetLastStatus() const { return m_lastStatus; }
409 inline bool LastStatusHasBeenSet() const { return m_lastStatusHasBeenSet; }
410 template <typename LastStatusT = Aws::String>
411 void SetLastStatus(LastStatusT&& value) {
412 m_lastStatusHasBeenSet = true;
413 m_lastStatus = std::forward<LastStatusT>(value);
414 }
415 template <typename LastStatusT = Aws::String>
416 Task& WithLastStatus(LastStatusT&& value) {
417 SetLastStatus(std::forward<LastStatusT>(value));
418 return *this;
419 }
421
423
429 inline LaunchType GetLaunchType() const { return m_launchType; }
430 inline bool LaunchTypeHasBeenSet() const { return m_launchTypeHasBeenSet; }
431 inline void SetLaunchType(LaunchType value) {
432 m_launchTypeHasBeenSet = true;
433 m_launchType = value;
434 }
436 SetLaunchType(value);
437 return *this;
438 }
440
442
466 inline const Aws::String& GetMemory() const { return m_memory; }
467 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
468 template <typename MemoryT = Aws::String>
469 void SetMemory(MemoryT&& value) {
470 m_memoryHasBeenSet = true;
471 m_memory = std::forward<MemoryT>(value);
472 }
473 template <typename MemoryT = Aws::String>
474 Task& WithMemory(MemoryT&& value) {
475 SetMemory(std::forward<MemoryT>(value));
476 return *this;
477 }
479
481
484 inline const TaskOverride& GetOverrides() const { return m_overrides; }
485 inline bool OverridesHasBeenSet() const { return m_overridesHasBeenSet; }
486 template <typename OverridesT = TaskOverride>
487 void SetOverrides(OverridesT&& value) {
488 m_overridesHasBeenSet = true;
489 m_overrides = std::forward<OverridesT>(value);
490 }
491 template <typename OverridesT = TaskOverride>
492 Task& WithOverrides(OverridesT&& value) {
493 SetOverrides(std::forward<OverridesT>(value));
494 return *this;
495 }
497
499
507 inline const Aws::String& GetPlatformVersion() const { return m_platformVersion; }
508 inline bool PlatformVersionHasBeenSet() const { return m_platformVersionHasBeenSet; }
509 template <typename PlatformVersionT = Aws::String>
510 void SetPlatformVersion(PlatformVersionT&& value) {
511 m_platformVersionHasBeenSet = true;
512 m_platformVersion = std::forward<PlatformVersionT>(value);
513 }
514 template <typename PlatformVersionT = Aws::String>
515 Task& WithPlatformVersion(PlatformVersionT&& value) {
516 SetPlatformVersion(std::forward<PlatformVersionT>(value));
517 return *this;
518 }
520
522
528 inline const Aws::String& GetPlatformFamily() const { return m_platformFamily; }
529 inline bool PlatformFamilyHasBeenSet() const { return m_platformFamilyHasBeenSet; }
530 template <typename PlatformFamilyT = Aws::String>
531 void SetPlatformFamily(PlatformFamilyT&& value) {
532 m_platformFamilyHasBeenSet = true;
533 m_platformFamily = std::forward<PlatformFamilyT>(value);
534 }
535 template <typename PlatformFamilyT = Aws::String>
536 Task& WithPlatformFamily(PlatformFamilyT&& value) {
537 SetPlatformFamily(std::forward<PlatformFamilyT>(value));
538 return *this;
539 }
541
543
546 inline const Aws::Utils::DateTime& GetPullStartedAt() const { return m_pullStartedAt; }
547 inline bool PullStartedAtHasBeenSet() const { return m_pullStartedAtHasBeenSet; }
548 template <typename PullStartedAtT = Aws::Utils::DateTime>
549 void SetPullStartedAt(PullStartedAtT&& value) {
550 m_pullStartedAtHasBeenSet = true;
551 m_pullStartedAt = std::forward<PullStartedAtT>(value);
552 }
553 template <typename PullStartedAtT = Aws::Utils::DateTime>
554 Task& WithPullStartedAt(PullStartedAtT&& value) {
555 SetPullStartedAt(std::forward<PullStartedAtT>(value));
556 return *this;
557 }
559
561
564 inline const Aws::Utils::DateTime& GetPullStoppedAt() const { return m_pullStoppedAt; }
565 inline bool PullStoppedAtHasBeenSet() const { return m_pullStoppedAtHasBeenSet; }
566 template <typename PullStoppedAtT = Aws::Utils::DateTime>
567 void SetPullStoppedAt(PullStoppedAtT&& value) {
568 m_pullStoppedAtHasBeenSet = true;
569 m_pullStoppedAt = std::forward<PullStoppedAtT>(value);
570 }
571 template <typename PullStoppedAtT = Aws::Utils::DateTime>
572 Task& WithPullStoppedAt(PullStoppedAtT&& value) {
573 SetPullStoppedAt(std::forward<PullStoppedAtT>(value));
574 return *this;
575 }
577
579
584 inline const Aws::Utils::DateTime& GetStartedAt() const { return m_startedAt; }
585 inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; }
586 template <typename StartedAtT = Aws::Utils::DateTime>
587 void SetStartedAt(StartedAtT&& value) {
588 m_startedAtHasBeenSet = true;
589 m_startedAt = std::forward<StartedAtT>(value);
590 }
591 template <typename StartedAtT = Aws::Utils::DateTime>
592 Task& WithStartedAt(StartedAtT&& value) {
593 SetStartedAt(std::forward<StartedAtT>(value));
594 return *this;
595 }
597
599
604 inline const Aws::String& GetStartedBy() const { return m_startedBy; }
605 inline bool StartedByHasBeenSet() const { return m_startedByHasBeenSet; }
606 template <typename StartedByT = Aws::String>
607 void SetStartedBy(StartedByT&& value) {
608 m_startedByHasBeenSet = true;
609 m_startedBy = std::forward<StartedByT>(value);
610 }
611 template <typename StartedByT = Aws::String>
612 Task& WithStartedBy(StartedByT&& value) {
613 SetStartedBy(std::forward<StartedByT>(value));
614 return *this;
615 }
617
619
626 inline TaskStopCode GetStopCode() const { return m_stopCode; }
627 inline bool StopCodeHasBeenSet() const { return m_stopCodeHasBeenSet; }
628 inline void SetStopCode(TaskStopCode value) {
629 m_stopCodeHasBeenSet = true;
630 m_stopCode = value;
631 }
633 SetStopCode(value);
634 return *this;
635 }
637
639
644 inline const Aws::Utils::DateTime& GetStoppedAt() const { return m_stoppedAt; }
645 inline bool StoppedAtHasBeenSet() const { return m_stoppedAtHasBeenSet; }
646 template <typename StoppedAtT = Aws::Utils::DateTime>
647 void SetStoppedAt(StoppedAtT&& value) {
648 m_stoppedAtHasBeenSet = true;
649 m_stoppedAt = std::forward<StoppedAtT>(value);
650 }
651 template <typename StoppedAtT = Aws::Utils::DateTime>
652 Task& WithStoppedAt(StoppedAtT&& value) {
653 SetStoppedAt(std::forward<StoppedAtT>(value));
654 return *this;
655 }
657
659
662 inline const Aws::String& GetStoppedReason() const { return m_stoppedReason; }
663 inline bool StoppedReasonHasBeenSet() const { return m_stoppedReasonHasBeenSet; }
664 template <typename StoppedReasonT = Aws::String>
665 void SetStoppedReason(StoppedReasonT&& value) {
666 m_stoppedReasonHasBeenSet = true;
667 m_stoppedReason = std::forward<StoppedReasonT>(value);
668 }
669 template <typename StoppedReasonT = Aws::String>
670 Task& WithStoppedReason(StoppedReasonT&& value) {
671 SetStoppedReason(std::forward<StoppedReasonT>(value));
672 return *this;
673 }
675
677
682 inline const Aws::Utils::DateTime& GetStoppingAt() const { return m_stoppingAt; }
683 inline bool StoppingAtHasBeenSet() const { return m_stoppingAtHasBeenSet; }
684 template <typename StoppingAtT = Aws::Utils::DateTime>
685 void SetStoppingAt(StoppingAtT&& value) {
686 m_stoppingAtHasBeenSet = true;
687 m_stoppingAt = std::forward<StoppingAtT>(value);
688 }
689 template <typename StoppingAtT = Aws::Utils::DateTime>
690 Task& WithStoppingAt(StoppingAtT&& value) {
691 SetStoppingAt(std::forward<StoppingAtT>(value));
692 return *this;
693 }
695
697
716 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
717 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
718 template <typename TagsT = Aws::Vector<Tag>>
719 void SetTags(TagsT&& value) {
720 m_tagsHasBeenSet = true;
721 m_tags = std::forward<TagsT>(value);
722 }
723 template <typename TagsT = Aws::Vector<Tag>>
724 Task& WithTags(TagsT&& value) {
725 SetTags(std::forward<TagsT>(value));
726 return *this;
727 }
728 template <typename TagsT = Tag>
729 Task& AddTags(TagsT&& value) {
730 m_tagsHasBeenSet = true;
731 m_tags.emplace_back(std::forward<TagsT>(value));
732 return *this;
733 }
735
737
740 inline const Aws::String& GetTaskArn() const { return m_taskArn; }
741 inline bool TaskArnHasBeenSet() const { return m_taskArnHasBeenSet; }
742 template <typename TaskArnT = Aws::String>
743 void SetTaskArn(TaskArnT&& value) {
744 m_taskArnHasBeenSet = true;
745 m_taskArn = std::forward<TaskArnT>(value);
746 }
747 template <typename TaskArnT = Aws::String>
748 Task& WithTaskArn(TaskArnT&& value) {
749 SetTaskArn(std::forward<TaskArnT>(value));
750 return *this;
751 }
753
755
758 inline const Aws::String& GetTaskDefinitionArn() const { return m_taskDefinitionArn; }
759 inline bool TaskDefinitionArnHasBeenSet() const { return m_taskDefinitionArnHasBeenSet; }
760 template <typename TaskDefinitionArnT = Aws::String>
761 void SetTaskDefinitionArn(TaskDefinitionArnT&& value) {
762 m_taskDefinitionArnHasBeenSet = true;
763 m_taskDefinitionArn = std::forward<TaskDefinitionArnT>(value);
764 }
765 template <typename TaskDefinitionArnT = Aws::String>
766 Task& WithTaskDefinitionArn(TaskDefinitionArnT&& value) {
767 SetTaskDefinitionArn(std::forward<TaskDefinitionArnT>(value));
768 return *this;
769 }
771
773
781 inline long long GetVersion() const { return m_version; }
782 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
783 inline void SetVersion(long long value) {
784 m_versionHasBeenSet = true;
785 m_version = value;
786 }
787 inline Task& WithVersion(long long value) {
788 SetVersion(value);
789 return *this;
790 }
792
794
797 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
798 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
799 template <typename EphemeralStorageT = EphemeralStorage>
800 void SetEphemeralStorage(EphemeralStorageT&& value) {
801 m_ephemeralStorageHasBeenSet = true;
802 m_ephemeralStorage = std::forward<EphemeralStorageT>(value);
803 }
804 template <typename EphemeralStorageT = EphemeralStorage>
805 Task& WithEphemeralStorage(EphemeralStorageT&& value) {
806 SetEphemeralStorage(std::forward<EphemeralStorageT>(value));
807 return *this;
808 }
810
812
815 inline const TaskEphemeralStorage& GetFargateEphemeralStorage() const { return m_fargateEphemeralStorage; }
816 inline bool FargateEphemeralStorageHasBeenSet() const { return m_fargateEphemeralStorageHasBeenSet; }
817 template <typename FargateEphemeralStorageT = TaskEphemeralStorage>
818 void SetFargateEphemeralStorage(FargateEphemeralStorageT&& value) {
819 m_fargateEphemeralStorageHasBeenSet = true;
820 m_fargateEphemeralStorage = std::forward<FargateEphemeralStorageT>(value);
821 }
822 template <typename FargateEphemeralStorageT = TaskEphemeralStorage>
823 Task& WithFargateEphemeralStorage(FargateEphemeralStorageT&& value) {
824 SetFargateEphemeralStorage(std::forward<FargateEphemeralStorageT>(value));
825 return *this;
826 }
828 private:
829 Aws::Vector<Attachment> m_attachments;
830
831 Aws::Vector<Attribute> m_attributes;
832
833 Aws::String m_availabilityZone;
834
835 Aws::String m_capacityProviderName;
836
837 Aws::String m_clusterArn;
838
839 Connectivity m_connectivity{Connectivity::NOT_SET};
840
841 Aws::Utils::DateTime m_connectivityAt{};
842
843 Aws::String m_containerInstanceArn;
844
845 Aws::Vector<Container> m_containers;
846
847 Aws::String m_cpu;
848
849 Aws::Utils::DateTime m_createdAt{};
850
851 Aws::String m_desiredStatus;
852
853 bool m_enableExecuteCommand{false};
854
855 Aws::Utils::DateTime m_executionStoppedAt{};
856
857 Aws::String m_group;
858
859 HealthStatus m_healthStatus{HealthStatus::NOT_SET};
860
861 Aws::Vector<InferenceAccelerator> m_inferenceAccelerators;
862
863 Aws::String m_lastStatus;
864
865 LaunchType m_launchType{LaunchType::NOT_SET};
866
867 Aws::String m_memory;
868
869 TaskOverride m_overrides;
870
871 Aws::String m_platformVersion;
872
873 Aws::String m_platformFamily;
874
875 Aws::Utils::DateTime m_pullStartedAt{};
876
877 Aws::Utils::DateTime m_pullStoppedAt{};
878
879 Aws::Utils::DateTime m_startedAt{};
880
881 Aws::String m_startedBy;
882
884
885 Aws::Utils::DateTime m_stoppedAt{};
886
887 Aws::String m_stoppedReason;
888
889 Aws::Utils::DateTime m_stoppingAt{};
890
891 Aws::Vector<Tag> m_tags;
892
893 Aws::String m_taskArn;
894
895 Aws::String m_taskDefinitionArn;
896
897 long long m_version{0};
898
899 EphemeralStorage m_ephemeralStorage;
900
901 TaskEphemeralStorage m_fargateEphemeralStorage;
902 bool m_attachmentsHasBeenSet = false;
903 bool m_attributesHasBeenSet = false;
904 bool m_availabilityZoneHasBeenSet = false;
905 bool m_capacityProviderNameHasBeenSet = false;
906 bool m_clusterArnHasBeenSet = false;
907 bool m_connectivityHasBeenSet = false;
908 bool m_connectivityAtHasBeenSet = false;
909 bool m_containerInstanceArnHasBeenSet = false;
910 bool m_containersHasBeenSet = false;
911 bool m_cpuHasBeenSet = false;
912 bool m_createdAtHasBeenSet = false;
913 bool m_desiredStatusHasBeenSet = false;
914 bool m_enableExecuteCommandHasBeenSet = false;
915 bool m_executionStoppedAtHasBeenSet = false;
916 bool m_groupHasBeenSet = false;
917 bool m_healthStatusHasBeenSet = false;
918 bool m_inferenceAcceleratorsHasBeenSet = false;
919 bool m_lastStatusHasBeenSet = false;
920 bool m_launchTypeHasBeenSet = false;
921 bool m_memoryHasBeenSet = false;
922 bool m_overridesHasBeenSet = false;
923 bool m_platformVersionHasBeenSet = false;
924 bool m_platformFamilyHasBeenSet = false;
925 bool m_pullStartedAtHasBeenSet = false;
926 bool m_pullStoppedAtHasBeenSet = false;
927 bool m_startedAtHasBeenSet = false;
928 bool m_startedByHasBeenSet = false;
929 bool m_stopCodeHasBeenSet = false;
930 bool m_stoppedAtHasBeenSet = false;
931 bool m_stoppedReasonHasBeenSet = false;
932 bool m_stoppingAtHasBeenSet = false;
933 bool m_tagsHasBeenSet = false;
934 bool m_taskArnHasBeenSet = false;
935 bool m_taskDefinitionArnHasBeenSet = false;
936 bool m_versionHasBeenSet = false;
937 bool m_ephemeralStorageHasBeenSet = false;
938 bool m_fargateEphemeralStorageHasBeenSet = false;
939};
940
941} // namespace Model
942} // namespace ECS
943} // namespace Aws
void SetLaunchType(LaunchType value)
Definition Task.h:431
Task & AddInferenceAccelerators(InferenceAcceleratorsT &&value)
Definition Task.h:395
bool EphemeralStorageHasBeenSet() const
Definition Task.h:798
void SetEphemeralStorage(EphemeralStorageT &&value)
Definition Task.h:800
void SetStopCode(TaskStopCode value)
Definition Task.h:628
void SetLastStatus(LastStatusT &&value)
Definition Task.h:411
Task & WithGroup(GroupT &&value)
Definition Task.h:345
Task & WithCpu(CpuT &&value)
Definition Task.h:252
TaskStopCode GetStopCode() const
Definition Task.h:626
void SetConnectivityAt(ConnectivityAtT &&value)
Definition Task.h:175
long long GetVersion() const
Definition Task.h:781
Task & AddContainers(ContainersT &&value)
Definition Task.h:221
Task & WithContainers(ContainersT &&value)
Definition Task.h:216
void SetTags(TagsT &&value)
Definition Task.h:719
Task & AddAttributes(AttributesT &&value)
Definition Task.h:90
bool VersionHasBeenSet() const
Definition Task.h:782
Task & WithCreatedAt(CreatedAtT &&value)
Definition Task.h:271
bool DesiredStatusHasBeenSet() const
Definition Task.h:284
void SetExecutionStoppedAt(ExecutionStoppedAtT &&value)
Definition Task.h:322
bool HealthStatusHasBeenSet() const
Definition Task.h:367
bool CapacityProviderNameHasBeenSet() const
Definition Task.h:120
const Aws::Vector< Attachment > & GetAttachments() const
Definition Task.h:53
void SetCapacityProviderName(CapacityProviderNameT &&value)
Definition Task.h:122
bool OverridesHasBeenSet() const
Definition Task.h:485
void SetPlatformVersion(PlatformVersionT &&value)
Definition Task.h:510
Task & WithAttributes(AttributesT &&value)
Definition Task.h:85
const Aws::String & GetAvailabilityZone() const
Definition Task.h:101
Task & WithFargateEphemeralStorage(FargateEphemeralStorageT &&value)
Definition Task.h:823
Task & WithInferenceAccelerators(InferenceAcceleratorsT &&value)
Definition Task.h:390
Task & WithDesiredStatus(DesiredStatusT &&value)
Definition Task.h:291
void SetCreatedAt(CreatedAtT &&value)
Definition Task.h:266
Task & WithCapacityProviderName(CapacityProviderNameT &&value)
Definition Task.h:127
Task & WithExecutionStoppedAt(ExecutionStoppedAtT &&value)
Definition Task.h:327
bool AttachmentsHasBeenSet() const
Definition Task.h:54
bool StartedAtHasBeenSet() const
Definition Task.h:585
const TaskOverride & GetOverrides() const
Definition Task.h:484
Task & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Task.h:109
Task & WithLastStatus(LastStatusT &&value)
Definition Task.h:416
void SetContainerInstanceArn(ContainerInstanceArnT &&value)
Definition Task.h:193
Task & WithStoppedReason(StoppedReasonT &&value)
Definition Task.h:670
Task & WithLaunchType(LaunchType value)
Definition Task.h:435
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Task.h:263
Task & WithStopCode(TaskStopCode value)
Definition Task.h:632
void SetHealthStatus(HealthStatus value)
Definition Task.h:368
bool TaskArnHasBeenSet() const
Definition Task.h:741
bool LastStatusHasBeenSet() const
Definition Task.h:409
bool FargateEphemeralStorageHasBeenSet() const
Definition Task.h:816
void SetVersion(long long value)
Definition Task.h:783
Task & WithConnectivityAt(ConnectivityAtT &&value)
Definition Task.h:180
HealthStatus GetHealthStatus() const
Definition Task.h:366
bool EnableExecuteCommandHasBeenSet() const
Definition Task.h:304
Task & WithPullStoppedAt(PullStoppedAtT &&value)
Definition Task.h:572
Task & WithHealthStatus(HealthStatus value)
Definition Task.h:372
void SetFargateEphemeralStorage(FargateEphemeralStorageT &&value)
Definition Task.h:818
bool PlatformVersionHasBeenSet() const
Definition Task.h:508
bool StopCodeHasBeenSet() const
Definition Task.h:627
Task & WithEnableExecuteCommand(bool value)
Definition Task.h:309
const Aws::Utils::DateTime & GetStartedAt() const
Definition Task.h:584
Connectivity GetConnectivity() const
Definition Task.h:155
void SetAttachments(AttachmentsT &&value)
Definition Task.h:56
AWS_ECS_API Task & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetStoppedReason() const
Definition Task.h:662
bool TaskDefinitionArnHasBeenSet() const
Definition Task.h:759
bool ExecutionStoppedAtHasBeenSet() const
Definition Task.h:320
bool AvailabilityZoneHasBeenSet() const
Definition Task.h:102
const Aws::String & GetContainerInstanceArn() const
Definition Task.h:190
const Aws::String & GetTaskArn() const
Definition Task.h:740
Task & WithStartedBy(StartedByT &&value)
Definition Task.h:612
void SetStoppingAt(StoppingAtT &&value)
Definition Task.h:685
Task & WithStoppingAt(StoppingAtT &&value)
Definition Task.h:690
bool PlatformFamilyHasBeenSet() const
Definition Task.h:529
void SetOverrides(OverridesT &&value)
Definition Task.h:487
bool ConnectivityHasBeenSet() const
Definition Task.h:156
Task & AddAttachments(AttachmentsT &&value)
Definition Task.h:66
bool ContainersHasBeenSet() const
Definition Task.h:209
bool CreatedAtHasBeenSet() const
Definition Task.h:264
Task & WithVersion(long long value)
Definition Task.h:787
const Aws::Utils::DateTime & GetConnectivityAt() const
Definition Task.h:172
AWS_ECS_API Task()=default
bool StoppingAtHasBeenSet() const
Definition Task.h:683
const Aws::String & GetClusterArn() const
Definition Task.h:137
const Aws::String & GetLastStatus() const
Definition Task.h:408
const Aws::String & GetMemory() const
Definition Task.h:466
void SetPullStartedAt(PullStartedAtT &&value)
Definition Task.h:549
const Aws::Utils::DateTime & GetStoppedAt() const
Definition Task.h:644
const Aws::String & GetCapacityProviderName() const
Definition Task.h:119
void SetPlatformFamily(PlatformFamilyT &&value)
Definition Task.h:531
Task & WithPullStartedAt(PullStartedAtT &&value)
Definition Task.h:554
Task & WithStoppedAt(StoppedAtT &&value)
Definition Task.h:652
const Aws::Utils::DateTime & GetPullStoppedAt() const
Definition Task.h:564
Task & WithAttachments(AttachmentsT &&value)
Definition Task.h:61
const Aws::Vector< Tag > & GetTags() const
Definition Task.h:716
bool MemoryHasBeenSet() const
Definition Task.h:467
bool TagsHasBeenSet() const
Definition Task.h:717
void SetStartedBy(StartedByT &&value)
Definition Task.h:607
const EphemeralStorage & GetEphemeralStorage() const
Definition Task.h:797
const Aws::String & GetCpu() const
Definition Task.h:244
Task & WithContainerInstanceArn(ContainerInstanceArnT &&value)
Definition Task.h:198
Task & WithClusterArn(ClusterArnT &&value)
Definition Task.h:145
void SetEnableExecuteCommand(bool value)
Definition Task.h:305
void SetTaskDefinitionArn(TaskDefinitionArnT &&value)
Definition Task.h:761
const Aws::String & GetGroup() const
Definition Task.h:337
const Aws::Vector< Container > & GetContainers() const
Definition Task.h:208
bool GroupHasBeenSet() const
Definition Task.h:338
void SetConnectivity(Connectivity value)
Definition Task.h:157
const Aws::String & GetDesiredStatus() const
Definition Task.h:283
bool StartedByHasBeenSet() const
Definition Task.h:605
void SetGroup(GroupT &&value)
Definition Task.h:340
const Aws::Utils::DateTime & GetStoppingAt() const
Definition Task.h:682
bool ClusterArnHasBeenSet() const
Definition Task.h:138
void SetAttributes(AttributesT &&value)
Definition Task.h:80
void SetStoppedAt(StoppedAtT &&value)
Definition Task.h:647
void SetTaskArn(TaskArnT &&value)
Definition Task.h:743
LaunchType GetLaunchType() const
Definition Task.h:429
Task & WithTags(TagsT &&value)
Definition Task.h:724
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition Task.h:104
bool PullStartedAtHasBeenSet() const
Definition Task.h:547
void SetClusterArn(ClusterArnT &&value)
Definition Task.h:140
bool AttributesHasBeenSet() const
Definition Task.h:78
const Aws::String & GetStartedBy() const
Definition Task.h:604
void SetStartedAt(StartedAtT &&value)
Definition Task.h:587
void SetContainers(ContainersT &&value)
Definition Task.h:211
bool InferenceAcceleratorsHasBeenSet() const
Definition Task.h:383
const Aws::String & GetPlatformVersion() const
Definition Task.h:507
void SetCpu(CpuT &&value)
Definition Task.h:247
void SetMemory(MemoryT &&value)
Definition Task.h:469
bool PullStoppedAtHasBeenSet() const
Definition Task.h:565
Task & WithEphemeralStorage(EphemeralStorageT &&value)
Definition Task.h:805
Task & WithTaskDefinitionArn(TaskDefinitionArnT &&value)
Definition Task.h:766
const Aws::Utils::DateTime & GetPullStartedAt() const
Definition Task.h:546
bool LaunchTypeHasBeenSet() const
Definition Task.h:430
Task & WithConnectivity(Connectivity value)
Definition Task.h:161
bool GetEnableExecuteCommand() const
Definition Task.h:303
bool StoppedAtHasBeenSet() const
Definition Task.h:645
Task & WithTaskArn(TaskArnT &&value)
Definition Task.h:748
void SetInferenceAccelerators(InferenceAcceleratorsT &&value)
Definition Task.h:385
bool CpuHasBeenSet() const
Definition Task.h:245
const TaskEphemeralStorage & GetFargateEphemeralStorage() const
Definition Task.h:815
bool StoppedReasonHasBeenSet() const
Definition Task.h:663
bool ConnectivityAtHasBeenSet() const
Definition Task.h:173
void SetDesiredStatus(DesiredStatusT &&value)
Definition Task.h:286
const Aws::Vector< Attribute > & GetAttributes() const
Definition Task.h:77
void SetStoppedReason(StoppedReasonT &&value)
Definition Task.h:665
AWS_ECS_API Task(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetPlatformFamily() const
Definition Task.h:528
const Aws::String & GetTaskDefinitionArn() const
Definition Task.h:758
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
Task & WithPlatformFamily(PlatformFamilyT &&value)
Definition Task.h:536
const Aws::Vector< InferenceAccelerator > & GetInferenceAccelerators() const
Definition Task.h:382
Task & WithOverrides(OverridesT &&value)
Definition Task.h:492
const Aws::Utils::DateTime & GetExecutionStoppedAt() const
Definition Task.h:319
Task & WithPlatformVersion(PlatformVersionT &&value)
Definition Task.h:515
Task & AddTags(TagsT &&value)
Definition Task.h:729
void SetPullStoppedAt(PullStoppedAtT &&value)
Definition Task.h:567
Task & WithStartedAt(StartedAtT &&value)
Definition Task.h:592
bool ContainerInstanceArnHasBeenSet() const
Definition Task.h:191
Task & WithMemory(MemoryT &&value)
Definition Task.h:474
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue