AWS SDK for C++

AWS SDK for C++ Version 1.11.744

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
33 public:
34 AWS_ECS_API RegisterTaskDefinitionRequest() = default;
35
36 // Service request name is the Operation name which will send this request out,
37 // each operation should has unique request name, so that we can get operation's name from this request.
38 // Note: this is not true for response, multiple operations may have the same response name,
39 // so we can not get operation's name from response.
40 inline virtual const char* GetServiceRequestName() const override { return "RegisterTaskDefinition"; }
41
42 AWS_ECS_API Aws::String SerializePayload() const override;
43
45
47
53 inline const Aws::String& GetFamily() const { return m_family; }
54 inline bool FamilyHasBeenSet() const { return m_familyHasBeenSet; }
55 template <typename FamilyT = Aws::String>
56 void SetFamily(FamilyT&& value) {
57 m_familyHasBeenSet = true;
58 m_family = std::forward<FamilyT>(value);
59 }
60 template <typename FamilyT = Aws::String>
62 SetFamily(std::forward<FamilyT>(value));
63 return *this;
64 }
66
68
76 inline const Aws::String& GetTaskRoleArn() const { return m_taskRoleArn; }
77 inline bool TaskRoleArnHasBeenSet() const { return m_taskRoleArnHasBeenSet; }
78 template <typename TaskRoleArnT = Aws::String>
79 void SetTaskRoleArn(TaskRoleArnT&& value) {
80 m_taskRoleArnHasBeenSet = true;
81 m_taskRoleArn = std::forward<TaskRoleArnT>(value);
82 }
83 template <typename TaskRoleArnT = Aws::String>
85 SetTaskRoleArn(std::forward<TaskRoleArnT>(value));
86 return *this;
87 }
89
91
99 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
100 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
101 template <typename ExecutionRoleArnT = Aws::String>
102 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
103 m_executionRoleArnHasBeenSet = true;
104 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
105 }
106 template <typename ExecutionRoleArnT = Aws::String>
108 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
109 return *this;
110 }
112
114
145 inline NetworkMode GetNetworkMode() const { return m_networkMode; }
146 inline bool NetworkModeHasBeenSet() const { return m_networkModeHasBeenSet; }
147 inline void SetNetworkMode(NetworkMode value) {
148 m_networkModeHasBeenSet = true;
149 m_networkMode = value;
150 }
152 SetNetworkMode(value);
153 return *this;
154 }
156
158
162 inline const Aws::Vector<ContainerDefinition>& GetContainerDefinitions() const { return m_containerDefinitions; }
163 inline bool ContainerDefinitionsHasBeenSet() const { return m_containerDefinitionsHasBeenSet; }
164 template <typename ContainerDefinitionsT = Aws::Vector<ContainerDefinition>>
165 void SetContainerDefinitions(ContainerDefinitionsT&& value) {
166 m_containerDefinitionsHasBeenSet = true;
167 m_containerDefinitions = std::forward<ContainerDefinitionsT>(value);
168 }
169 template <typename ContainerDefinitionsT = Aws::Vector<ContainerDefinition>>
171 SetContainerDefinitions(std::forward<ContainerDefinitionsT>(value));
172 return *this;
173 }
174 template <typename ContainerDefinitionsT = ContainerDefinition>
176 m_containerDefinitionsHasBeenSet = true;
177 m_containerDefinitions.emplace_back(std::forward<ContainerDefinitionsT>(value));
178 return *this;
179 }
181
183
187 inline const Aws::Vector<Volume>& GetVolumes() const { return m_volumes; }
188 inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; }
189 template <typename VolumesT = Aws::Vector<Volume>>
190 void SetVolumes(VolumesT&& value) {
191 m_volumesHasBeenSet = true;
192 m_volumes = std::forward<VolumesT>(value);
193 }
194 template <typename VolumesT = Aws::Vector<Volume>>
196 SetVolumes(std::forward<VolumesT>(value));
197 return *this;
198 }
199 template <typename VolumesT = Volume>
201 m_volumesHasBeenSet = true;
202 m_volumes.emplace_back(std::forward<VolumesT>(value));
203 return *this;
204 }
206
208
213 inline const Aws::Vector<TaskDefinitionPlacementConstraint>& GetPlacementConstraints() const { return m_placementConstraints; }
214 inline bool PlacementConstraintsHasBeenSet() const { return m_placementConstraintsHasBeenSet; }
215 template <typename PlacementConstraintsT = Aws::Vector<TaskDefinitionPlacementConstraint>>
216 void SetPlacementConstraints(PlacementConstraintsT&& value) {
217 m_placementConstraintsHasBeenSet = true;
218 m_placementConstraints = std::forward<PlacementConstraintsT>(value);
219 }
220 template <typename PlacementConstraintsT = Aws::Vector<TaskDefinitionPlacementConstraint>>
222 SetPlacementConstraints(std::forward<PlacementConstraintsT>(value));
223 return *this;
224 }
225 template <typename PlacementConstraintsT = TaskDefinitionPlacementConstraint>
227 m_placementConstraintsHasBeenSet = true;
228 m_placementConstraints.emplace_back(std::forward<PlacementConstraintsT>(value));
229 return *this;
230 }
232
234
240 inline const Aws::Vector<Compatibility>& GetRequiresCompatibilities() const { return m_requiresCompatibilities; }
241 inline bool RequiresCompatibilitiesHasBeenSet() const { return m_requiresCompatibilitiesHasBeenSet; }
242 template <typename RequiresCompatibilitiesT = Aws::Vector<Compatibility>>
243 void SetRequiresCompatibilities(RequiresCompatibilitiesT&& value) {
244 m_requiresCompatibilitiesHasBeenSet = true;
245 m_requiresCompatibilities = std::forward<RequiresCompatibilitiesT>(value);
246 }
247 template <typename RequiresCompatibilitiesT = Aws::Vector<Compatibility>>
249 SetRequiresCompatibilities(std::forward<RequiresCompatibilitiesT>(value));
250 return *this;
251 }
253 m_requiresCompatibilitiesHasBeenSet = true;
254 m_requiresCompatibilities.push_back(value);
255 return *this;
256 }
258
260
276 inline const Aws::String& GetCpu() const { return m_cpu; }
277 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
278 template <typename CpuT = Aws::String>
279 void SetCpu(CpuT&& value) {
280 m_cpuHasBeenSet = true;
281 m_cpu = std::forward<CpuT>(value);
282 }
283 template <typename CpuT = Aws::String>
285 SetCpu(std::forward<CpuT>(value));
286 return *this;
287 }
289
291
318 inline const Aws::String& GetMemory() const { return m_memory; }
319 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
320 template <typename MemoryT = Aws::String>
321 void SetMemory(MemoryT&& value) {
322 m_memoryHasBeenSet = true;
323 m_memory = std::forward<MemoryT>(value);
324 }
325 template <typename MemoryT = Aws::String>
327 SetMemory(std::forward<MemoryT>(value));
328 return *this;
329 }
331
333
351 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
352 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
353 template <typename TagsT = Aws::Vector<Tag>>
354 void SetTags(TagsT&& value) {
355 m_tagsHasBeenSet = true;
356 m_tags = std::forward<TagsT>(value);
357 }
358 template <typename TagsT = Aws::Vector<Tag>>
360 SetTags(std::forward<TagsT>(value));
361 return *this;
362 }
363 template <typename TagsT = Tag>
365 m_tagsHasBeenSet = true;
366 m_tags.emplace_back(std::forward<TagsT>(value));
367 return *this;
368 }
370
372
390 inline PidMode GetPidMode() const { return m_pidMode; }
391 inline bool PidModeHasBeenSet() const { return m_pidModeHasBeenSet; }
392 inline void SetPidMode(PidMode value) {
393 m_pidModeHasBeenSet = true;
394 m_pidMode = value;
395 }
397 SetPidMode(value);
398 return *this;
399 }
401
403
428 inline IpcMode GetIpcMode() const { return m_ipcMode; }
429 inline bool IpcModeHasBeenSet() const { return m_ipcModeHasBeenSet; }
430 inline void SetIpcMode(IpcMode value) {
431 m_ipcModeHasBeenSet = true;
432 m_ipcMode = value;
433 }
435 SetIpcMode(value);
436 return *this;
437 }
439
441
454 inline const ProxyConfiguration& GetProxyConfiguration() const { return m_proxyConfiguration; }
455 inline bool ProxyConfigurationHasBeenSet() const { return m_proxyConfigurationHasBeenSet; }
456 template <typename ProxyConfigurationT = ProxyConfiguration>
457 void SetProxyConfiguration(ProxyConfigurationT&& value) {
458 m_proxyConfigurationHasBeenSet = true;
459 m_proxyConfiguration = std::forward<ProxyConfigurationT>(value);
460 }
461 template <typename ProxyConfigurationT = ProxyConfiguration>
463 SetProxyConfiguration(std::forward<ProxyConfigurationT>(value));
464 return *this;
465 }
467
469
472 inline const Aws::Vector<InferenceAccelerator>& GetInferenceAccelerators() const { return m_inferenceAccelerators; }
473 inline bool InferenceAcceleratorsHasBeenSet() const { return m_inferenceAcceleratorsHasBeenSet; }
474 template <typename InferenceAcceleratorsT = Aws::Vector<InferenceAccelerator>>
475 void SetInferenceAccelerators(InferenceAcceleratorsT&& value) {
476 m_inferenceAcceleratorsHasBeenSet = true;
477 m_inferenceAccelerators = std::forward<InferenceAcceleratorsT>(value);
478 }
479 template <typename InferenceAcceleratorsT = Aws::Vector<InferenceAccelerator>>
481 SetInferenceAccelerators(std::forward<InferenceAcceleratorsT>(value));
482 return *this;
483 }
484 template <typename InferenceAcceleratorsT = InferenceAccelerator>
486 m_inferenceAcceleratorsHasBeenSet = true;
487 m_inferenceAccelerators.emplace_back(std::forward<InferenceAcceleratorsT>(value));
488 return *this;
489 }
491
493
504 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
505 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
506 template <typename EphemeralStorageT = EphemeralStorage>
507 void SetEphemeralStorage(EphemeralStorageT&& value) {
508 m_ephemeralStorageHasBeenSet = true;
509 m_ephemeralStorage = std::forward<EphemeralStorageT>(value);
510 }
511 template <typename EphemeralStorageT = EphemeralStorage>
513 SetEphemeralStorage(std::forward<EphemeralStorageT>(value));
514 return *this;
515 }
517
519
522 inline const RuntimePlatform& GetRuntimePlatform() const { return m_runtimePlatform; }
523 inline bool RuntimePlatformHasBeenSet() const { return m_runtimePlatformHasBeenSet; }
524 template <typename RuntimePlatformT = RuntimePlatform>
525 void SetRuntimePlatform(RuntimePlatformT&& value) {
526 m_runtimePlatformHasBeenSet = true;
527 m_runtimePlatform = std::forward<RuntimePlatformT>(value);
528 }
529 template <typename RuntimePlatformT = RuntimePlatform>
531 SetRuntimePlatform(std::forward<RuntimePlatformT>(value));
532 return *this;
533 }
535
537
542 inline bool GetEnableFaultInjection() const { return m_enableFaultInjection; }
543 inline bool EnableFaultInjectionHasBeenSet() const { return m_enableFaultInjectionHasBeenSet; }
544 inline void SetEnableFaultInjection(bool value) {
545 m_enableFaultInjectionHasBeenSet = true;
546 m_enableFaultInjection = value;
547 }
550 return *this;
551 }
553 private:
554 Aws::String m_family;
555
556 Aws::String m_taskRoleArn;
557
558 Aws::String m_executionRoleArn;
559
560 NetworkMode m_networkMode{NetworkMode::NOT_SET};
561
562 Aws::Vector<ContainerDefinition> m_containerDefinitions;
563
564 Aws::Vector<Volume> m_volumes;
565
567
568 Aws::Vector<Compatibility> m_requiresCompatibilities;
569
570 Aws::String m_cpu;
571
572 Aws::String m_memory;
573
574 Aws::Vector<Tag> m_tags;
575
576 PidMode m_pidMode{PidMode::NOT_SET};
577
578 IpcMode m_ipcMode{IpcMode::NOT_SET};
579
580 ProxyConfiguration m_proxyConfiguration;
581
582 Aws::Vector<InferenceAccelerator> m_inferenceAccelerators;
583
584 EphemeralStorage m_ephemeralStorage;
585
586 RuntimePlatform m_runtimePlatform;
587
588 bool m_enableFaultInjection{false};
589 bool m_familyHasBeenSet = false;
590 bool m_taskRoleArnHasBeenSet = false;
591 bool m_executionRoleArnHasBeenSet = false;
592 bool m_networkModeHasBeenSet = false;
593 bool m_containerDefinitionsHasBeenSet = false;
594 bool m_volumesHasBeenSet = false;
595 bool m_placementConstraintsHasBeenSet = false;
596 bool m_requiresCompatibilitiesHasBeenSet = false;
597 bool m_cpuHasBeenSet = false;
598 bool m_memoryHasBeenSet = false;
599 bool m_tagsHasBeenSet = false;
600 bool m_pidModeHasBeenSet = false;
601 bool m_ipcModeHasBeenSet = false;
602 bool m_proxyConfigurationHasBeenSet = false;
603 bool m_inferenceAcceleratorsHasBeenSet = false;
604 bool m_ephemeralStorageHasBeenSet = false;
605 bool m_runtimePlatformHasBeenSet = false;
606 bool m_enableFaultInjectionHasBeenSet = false;
607};
608
609} // namespace Model
610} // namespace ECS
611} // 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