AWS SDK for C++

AWS SDK for C++ Version 1.11.787

Loading...
Searching...
No Matches
RegisterTaskDefinitionRequest.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/ECSRequest.h>
10#include <aws/ecs/ECS_EXPORTS.h>
11#include <aws/ecs/model/Compatibility.h>
12#include <aws/ecs/model/ContainerDefinition.h>
13#include <aws/ecs/model/EphemeralStorage.h>
14#include <aws/ecs/model/InferenceAccelerator.h>
15#include <aws/ecs/model/IpcMode.h>
16#include <aws/ecs/model/NetworkMode.h>
17#include <aws/ecs/model/PidMode.h>
18#include <aws/ecs/model/ProxyConfiguration.h>
19#include <aws/ecs/model/RuntimePlatform.h>
20#include <aws/ecs/model/Tag.h>
21#include <aws/ecs/model/TaskDefinitionPlacementConstraint.h>
22#include <aws/ecs/model/Volume.h>
23
24#include <utility>
25
26namespace Aws {
27namespace ECS {
28namespace Model {
29
36 public:
37 AWS_ECS_API RegisterTaskDefinitionRequest() = default;
38
39 // Service request name is the Operation name which will send this request out,
40 // each operation should has unique request name, so that we can get operation's name from this request.
41 // Note: this is not true for response, multiple operations may have the same response name,
42 // so we can not get operation's name from response.
43 inline virtual const char* GetServiceRequestName() const override { return "RegisterTaskDefinition"; }
44
45 AWS_ECS_API Aws::String SerializePayload() const override;
46
48
50
56 inline const Aws::String& GetFamily() const { return m_family; }
57 inline bool FamilyHasBeenSet() const { return m_familyHasBeenSet; }
58 template <typename FamilyT = Aws::String>
59 void SetFamily(FamilyT&& value) {
60 m_familyHasBeenSet = true;
61 m_family = std::forward<FamilyT>(value);
62 }
63 template <typename FamilyT = Aws::String>
65 SetFamily(std::forward<FamilyT>(value));
66 return *this;
67 }
69
71
79 inline const Aws::String& GetTaskRoleArn() const { return m_taskRoleArn; }
80 inline bool TaskRoleArnHasBeenSet() const { return m_taskRoleArnHasBeenSet; }
81 template <typename TaskRoleArnT = Aws::String>
82 void SetTaskRoleArn(TaskRoleArnT&& value) {
83 m_taskRoleArnHasBeenSet = true;
84 m_taskRoleArn = std::forward<TaskRoleArnT>(value);
85 }
86 template <typename TaskRoleArnT = Aws::String>
88 SetTaskRoleArn(std::forward<TaskRoleArnT>(value));
89 return *this;
90 }
92
94
102 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
103 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
104 template <typename ExecutionRoleArnT = Aws::String>
105 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
106 m_executionRoleArnHasBeenSet = true;
107 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
108 }
109 template <typename ExecutionRoleArnT = Aws::String>
111 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
112 return *this;
113 }
115
117
148 inline NetworkMode GetNetworkMode() const { return m_networkMode; }
149 inline bool NetworkModeHasBeenSet() const { return m_networkModeHasBeenSet; }
150 inline void SetNetworkMode(NetworkMode value) {
151 m_networkModeHasBeenSet = true;
152 m_networkMode = value;
153 }
155 SetNetworkMode(value);
156 return *this;
157 }
159
161
165 inline const Aws::Vector<ContainerDefinition>& GetContainerDefinitions() const { return m_containerDefinitions; }
166 inline bool ContainerDefinitionsHasBeenSet() const { return m_containerDefinitionsHasBeenSet; }
167 template <typename ContainerDefinitionsT = Aws::Vector<ContainerDefinition>>
168 void SetContainerDefinitions(ContainerDefinitionsT&& value) {
169 m_containerDefinitionsHasBeenSet = true;
170 m_containerDefinitions = std::forward<ContainerDefinitionsT>(value);
171 }
172 template <typename ContainerDefinitionsT = Aws::Vector<ContainerDefinition>>
174 SetContainerDefinitions(std::forward<ContainerDefinitionsT>(value));
175 return *this;
176 }
177 template <typename ContainerDefinitionsT = ContainerDefinition>
179 m_containerDefinitionsHasBeenSet = true;
180 m_containerDefinitions.emplace_back(std::forward<ContainerDefinitionsT>(value));
181 return *this;
182 }
184
186
190 inline const Aws::Vector<Volume>& GetVolumes() const { return m_volumes; }
191 inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; }
192 template <typename VolumesT = Aws::Vector<Volume>>
193 void SetVolumes(VolumesT&& value) {
194 m_volumesHasBeenSet = true;
195 m_volumes = std::forward<VolumesT>(value);
196 }
197 template <typename VolumesT = Aws::Vector<Volume>>
199 SetVolumes(std::forward<VolumesT>(value));
200 return *this;
201 }
202 template <typename VolumesT = Volume>
204 m_volumesHasBeenSet = true;
205 m_volumes.emplace_back(std::forward<VolumesT>(value));
206 return *this;
207 }
209
211
216 inline const Aws::Vector<TaskDefinitionPlacementConstraint>& GetPlacementConstraints() const { return m_placementConstraints; }
217 inline bool PlacementConstraintsHasBeenSet() const { return m_placementConstraintsHasBeenSet; }
218 template <typename PlacementConstraintsT = Aws::Vector<TaskDefinitionPlacementConstraint>>
219 void SetPlacementConstraints(PlacementConstraintsT&& value) {
220 m_placementConstraintsHasBeenSet = true;
221 m_placementConstraints = std::forward<PlacementConstraintsT>(value);
222 }
223 template <typename PlacementConstraintsT = Aws::Vector<TaskDefinitionPlacementConstraint>>
225 SetPlacementConstraints(std::forward<PlacementConstraintsT>(value));
226 return *this;
227 }
228 template <typename PlacementConstraintsT = TaskDefinitionPlacementConstraint>
230 m_placementConstraintsHasBeenSet = true;
231 m_placementConstraints.emplace_back(std::forward<PlacementConstraintsT>(value));
232 return *this;
233 }
235
237
243 inline const Aws::Vector<Compatibility>& GetRequiresCompatibilities() const { return m_requiresCompatibilities; }
244 inline bool RequiresCompatibilitiesHasBeenSet() const { return m_requiresCompatibilitiesHasBeenSet; }
245 template <typename RequiresCompatibilitiesT = Aws::Vector<Compatibility>>
246 void SetRequiresCompatibilities(RequiresCompatibilitiesT&& value) {
247 m_requiresCompatibilitiesHasBeenSet = true;
248 m_requiresCompatibilities = std::forward<RequiresCompatibilitiesT>(value);
249 }
250 template <typename RequiresCompatibilitiesT = Aws::Vector<Compatibility>>
252 SetRequiresCompatibilities(std::forward<RequiresCompatibilitiesT>(value));
253 return *this;
254 }
256 m_requiresCompatibilitiesHasBeenSet = true;
257 m_requiresCompatibilities.push_back(value);
258 return *this;
259 }
261
263
279 inline const Aws::String& GetCpu() const { return m_cpu; }
280 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
281 template <typename CpuT = Aws::String>
282 void SetCpu(CpuT&& value) {
283 m_cpuHasBeenSet = true;
284 m_cpu = std::forward<CpuT>(value);
285 }
286 template <typename CpuT = Aws::String>
288 SetCpu(std::forward<CpuT>(value));
289 return *this;
290 }
292
294
321 inline const Aws::String& GetMemory() const { return m_memory; }
322 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
323 template <typename MemoryT = Aws::String>
324 void SetMemory(MemoryT&& value) {
325 m_memoryHasBeenSet = true;
326 m_memory = std::forward<MemoryT>(value);
327 }
328 template <typename MemoryT = Aws::String>
330 SetMemory(std::forward<MemoryT>(value));
331 return *this;
332 }
334
336
354 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
355 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
356 template <typename TagsT = Aws::Vector<Tag>>
357 void SetTags(TagsT&& value) {
358 m_tagsHasBeenSet = true;
359 m_tags = std::forward<TagsT>(value);
360 }
361 template <typename TagsT = Aws::Vector<Tag>>
363 SetTags(std::forward<TagsT>(value));
364 return *this;
365 }
366 template <typename TagsT = Tag>
368 m_tagsHasBeenSet = true;
369 m_tags.emplace_back(std::forward<TagsT>(value));
370 return *this;
371 }
373
375
393 inline PidMode GetPidMode() const { return m_pidMode; }
394 inline bool PidModeHasBeenSet() const { return m_pidModeHasBeenSet; }
395 inline void SetPidMode(PidMode value) {
396 m_pidModeHasBeenSet = true;
397 m_pidMode = value;
398 }
400 SetPidMode(value);
401 return *this;
402 }
404
406
431 inline IpcMode GetIpcMode() const { return m_ipcMode; }
432 inline bool IpcModeHasBeenSet() const { return m_ipcModeHasBeenSet; }
433 inline void SetIpcMode(IpcMode value) {
434 m_ipcModeHasBeenSet = true;
435 m_ipcMode = value;
436 }
438 SetIpcMode(value);
439 return *this;
440 }
442
444
457 inline const ProxyConfiguration& GetProxyConfiguration() const { return m_proxyConfiguration; }
458 inline bool ProxyConfigurationHasBeenSet() const { return m_proxyConfigurationHasBeenSet; }
459 template <typename ProxyConfigurationT = ProxyConfiguration>
460 void SetProxyConfiguration(ProxyConfigurationT&& value) {
461 m_proxyConfigurationHasBeenSet = true;
462 m_proxyConfiguration = std::forward<ProxyConfigurationT>(value);
463 }
464 template <typename ProxyConfigurationT = ProxyConfiguration>
466 SetProxyConfiguration(std::forward<ProxyConfigurationT>(value));
467 return *this;
468 }
470
472
475 inline const Aws::Vector<InferenceAccelerator>& GetInferenceAccelerators() const { return m_inferenceAccelerators; }
476 inline bool InferenceAcceleratorsHasBeenSet() const { return m_inferenceAcceleratorsHasBeenSet; }
477 template <typename InferenceAcceleratorsT = Aws::Vector<InferenceAccelerator>>
478 void SetInferenceAccelerators(InferenceAcceleratorsT&& value) {
479 m_inferenceAcceleratorsHasBeenSet = true;
480 m_inferenceAccelerators = std::forward<InferenceAcceleratorsT>(value);
481 }
482 template <typename InferenceAcceleratorsT = Aws::Vector<InferenceAccelerator>>
484 SetInferenceAccelerators(std::forward<InferenceAcceleratorsT>(value));
485 return *this;
486 }
487 template <typename InferenceAcceleratorsT = InferenceAccelerator>
489 m_inferenceAcceleratorsHasBeenSet = true;
490 m_inferenceAccelerators.emplace_back(std::forward<InferenceAcceleratorsT>(value));
491 return *this;
492 }
494
496
507 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
508 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
509 template <typename EphemeralStorageT = EphemeralStorage>
510 void SetEphemeralStorage(EphemeralStorageT&& value) {
511 m_ephemeralStorageHasBeenSet = true;
512 m_ephemeralStorage = std::forward<EphemeralStorageT>(value);
513 }
514 template <typename EphemeralStorageT = EphemeralStorage>
516 SetEphemeralStorage(std::forward<EphemeralStorageT>(value));
517 return *this;
518 }
520
522
525 inline const RuntimePlatform& GetRuntimePlatform() const { return m_runtimePlatform; }
526 inline bool RuntimePlatformHasBeenSet() const { return m_runtimePlatformHasBeenSet; }
527 template <typename RuntimePlatformT = RuntimePlatform>
528 void SetRuntimePlatform(RuntimePlatformT&& value) {
529 m_runtimePlatformHasBeenSet = true;
530 m_runtimePlatform = std::forward<RuntimePlatformT>(value);
531 }
532 template <typename RuntimePlatformT = RuntimePlatform>
534 SetRuntimePlatform(std::forward<RuntimePlatformT>(value));
535 return *this;
536 }
538
540
545 inline bool GetEnableFaultInjection() const { return m_enableFaultInjection; }
546 inline bool EnableFaultInjectionHasBeenSet() const { return m_enableFaultInjectionHasBeenSet; }
547 inline void SetEnableFaultInjection(bool value) {
548 m_enableFaultInjectionHasBeenSet = true;
549 m_enableFaultInjection = value;
550 }
553 return *this;
554 }
556 private:
557 Aws::String m_family;
558
559 Aws::String m_taskRoleArn;
560
561 Aws::String m_executionRoleArn;
562
563 NetworkMode m_networkMode{NetworkMode::NOT_SET};
564
565 Aws::Vector<ContainerDefinition> m_containerDefinitions;
566
567 Aws::Vector<Volume> m_volumes;
568
570
571 Aws::Vector<Compatibility> m_requiresCompatibilities;
572
573 Aws::String m_cpu;
574
575 Aws::String m_memory;
576
577 Aws::Vector<Tag> m_tags;
578
579 PidMode m_pidMode{PidMode::NOT_SET};
580
581 IpcMode m_ipcMode{IpcMode::NOT_SET};
582
583 ProxyConfiguration m_proxyConfiguration;
584
585 Aws::Vector<InferenceAccelerator> m_inferenceAccelerators;
586
587 EphemeralStorage m_ephemeralStorage;
588
589 RuntimePlatform m_runtimePlatform;
590
591 bool m_enableFaultInjection{false};
592 bool m_familyHasBeenSet = false;
593 bool m_taskRoleArnHasBeenSet = false;
594 bool m_executionRoleArnHasBeenSet = false;
595 bool m_networkModeHasBeenSet = false;
596 bool m_containerDefinitionsHasBeenSet = false;
597 bool m_volumesHasBeenSet = false;
598 bool m_placementConstraintsHasBeenSet = false;
599 bool m_requiresCompatibilitiesHasBeenSet = false;
600 bool m_cpuHasBeenSet = false;
601 bool m_memoryHasBeenSet = false;
602 bool m_tagsHasBeenSet = false;
603 bool m_pidModeHasBeenSet = false;
604 bool m_ipcModeHasBeenSet = false;
605 bool m_proxyConfigurationHasBeenSet = false;
606 bool m_inferenceAcceleratorsHasBeenSet = false;
607 bool m_ephemeralStorageHasBeenSet = false;
608 bool m_runtimePlatformHasBeenSet = false;
609 bool m_enableFaultInjectionHasBeenSet = false;
610};
611
612} // namespace Model
613} // namespace ECS
614} // namespace Aws
virtual const char * GetServiceRequestName() const override
AWS_ECS_API Aws::String SerializePayload() const override
const Aws::Vector< ContainerDefinition > & GetContainerDefinitions() const
RegisterTaskDefinitionRequest & WithProxyConfiguration(ProxyConfigurationT &&value)
RegisterTaskDefinitionRequest & WithEnableFaultInjection(bool value)
RegisterTaskDefinitionRequest & WithRequiresCompatibilities(RequiresCompatibilitiesT &&value)
RegisterTaskDefinitionRequest & WithRuntimePlatform(RuntimePlatformT &&value)
RegisterTaskDefinitionRequest & WithPidMode(PidMode value)
RegisterTaskDefinitionRequest & WithEphemeralStorage(EphemeralStorageT &&value)
RegisterTaskDefinitionRequest & WithVolumes(VolumesT &&value)
RegisterTaskDefinitionRequest & WithTags(TagsT &&value)
RegisterTaskDefinitionRequest & WithExecutionRoleArn(ExecutionRoleArnT &&value)
RegisterTaskDefinitionRequest & WithPlacementConstraints(PlacementConstraintsT &&value)
RegisterTaskDefinitionRequest & WithCpu(CpuT &&value)
RegisterTaskDefinitionRequest & WithContainerDefinitions(ContainerDefinitionsT &&value)
RegisterTaskDefinitionRequest & AddVolumes(VolumesT &&value)
AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
RegisterTaskDefinitionRequest & AddRequiresCompatibilities(Compatibility value)
const Aws::Vector< Compatibility > & GetRequiresCompatibilities() const
RegisterTaskDefinitionRequest & WithTaskRoleArn(TaskRoleArnT &&value)
RegisterTaskDefinitionRequest & AddInferenceAccelerators(InferenceAcceleratorsT &&value)
const Aws::Vector< InferenceAccelerator > & GetInferenceAccelerators() const
RegisterTaskDefinitionRequest & WithMemory(MemoryT &&value)
RegisterTaskDefinitionRequest & WithNetworkMode(NetworkMode value)
RegisterTaskDefinitionRequest & AddPlacementConstraints(PlacementConstraintsT &&value)
const Aws::Vector< TaskDefinitionPlacementConstraint > & GetPlacementConstraints() const
RegisterTaskDefinitionRequest & AddContainerDefinitions(ContainerDefinitionsT &&value)
RegisterTaskDefinitionRequest & AddTags(TagsT &&value)
RegisterTaskDefinitionRequest & WithFamily(FamilyT &&value)
RegisterTaskDefinitionRequest & WithInferenceAccelerators(InferenceAcceleratorsT &&value)
RegisterTaskDefinitionRequest & WithIpcMode(IpcMode value)
void SetInferenceAccelerators(InferenceAcceleratorsT &&value)
void SetRequiresCompatibilities(RequiresCompatibilitiesT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector