AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ContainerProperties.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/EphemeralStorage.h>
9#include <aws/batch/model/FargatePlatformConfiguration.h>
10#include <aws/batch/model/KeyValuePair.h>
11#include <aws/batch/model/LinuxParameters.h>
12#include <aws/batch/model/LogConfiguration.h>
13#include <aws/batch/model/MountPoint.h>
14#include <aws/batch/model/NetworkConfiguration.h>
15#include <aws/batch/model/RepositoryCredentials.h>
16#include <aws/batch/model/ResourceRequirement.h>
17#include <aws/batch/model/RuntimePlatform.h>
18#include <aws/batch/model/Secret.h>
19#include <aws/batch/model/Ulimit.h>
20#include <aws/batch/model/Volume.h>
21#include <aws/core/utils/memory/stl/AWSString.h>
22#include <aws/core/utils/memory/stl/AWSVector.h>
23
24#include <utility>
25
26namespace Aws {
27namespace Utils {
28namespace Json {
29class JsonValue;
30class JsonView;
31} // namespace Json
32} // namespace Utils
33namespace Batch {
34namespace Model {
35
44 public:
45 AWS_BATCH_API ContainerProperties() = default;
48 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
49
51
81 inline const Aws::String& GetImage() const { return m_image; }
82 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
83 template <typename ImageT = Aws::String>
84 void SetImage(ImageT&& value) {
85 m_imageHasBeenSet = true;
86 m_image = std::forward<ImageT>(value);
87 }
88 template <typename ImageT = Aws::String>
89 ContainerProperties& WithImage(ImageT&& value) {
90 SetImage(std::forward<ImageT>(value));
91 return *this;
92 }
94
96
107 inline const Aws::Vector<Aws::String>& GetCommand() const { return m_command; }
108 inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; }
109 template <typename CommandT = Aws::Vector<Aws::String>>
110 void SetCommand(CommandT&& value) {
111 m_commandHasBeenSet = true;
112 m_command = std::forward<CommandT>(value);
113 }
114 template <typename CommandT = Aws::Vector<Aws::String>>
115 ContainerProperties& WithCommand(CommandT&& value) {
116 SetCommand(std::forward<CommandT>(value));
117 return *this;
118 }
119 template <typename CommandT = Aws::String>
120 ContainerProperties& AddCommand(CommandT&& value) {
121 m_commandHasBeenSet = true;
122 m_command.emplace_back(std::forward<CommandT>(value));
123 return *this;
124 }
126
128
135 inline const Aws::String& GetJobRoleArn() const { return m_jobRoleArn; }
136 inline bool JobRoleArnHasBeenSet() const { return m_jobRoleArnHasBeenSet; }
137 template <typename JobRoleArnT = Aws::String>
138 void SetJobRoleArn(JobRoleArnT&& value) {
139 m_jobRoleArnHasBeenSet = true;
140 m_jobRoleArn = std::forward<JobRoleArnT>(value);
141 }
142 template <typename JobRoleArnT = Aws::String>
143 ContainerProperties& WithJobRoleArn(JobRoleArnT&& value) {
144 SetJobRoleArn(std::forward<JobRoleArnT>(value));
145 return *this;
146 }
148
150
157 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
158 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
159 template <typename ExecutionRoleArnT = Aws::String>
160 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
161 m_executionRoleArnHasBeenSet = true;
162 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
163 }
164 template <typename ExecutionRoleArnT = Aws::String>
165 ContainerProperties& WithExecutionRoleArn(ExecutionRoleArnT&& value) {
166 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
167 return *this;
168 }
170
172
175 inline const Aws::Vector<Volume>& GetVolumes() const { return m_volumes; }
176 inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; }
177 template <typename VolumesT = Aws::Vector<Volume>>
178 void SetVolumes(VolumesT&& value) {
179 m_volumesHasBeenSet = true;
180 m_volumes = std::forward<VolumesT>(value);
181 }
182 template <typename VolumesT = Aws::Vector<Volume>>
183 ContainerProperties& WithVolumes(VolumesT&& value) {
184 SetVolumes(std::forward<VolumesT>(value));
185 return *this;
186 }
187 template <typename VolumesT = Volume>
188 ContainerProperties& AddVolumes(VolumesT&& value) {
189 m_volumesHasBeenSet = true;
190 m_volumes.emplace_back(std::forward<VolumesT>(value));
191 return *this;
192 }
194
196
209 inline const Aws::Vector<KeyValuePair>& GetEnvironment() const { return m_environment; }
210 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
211 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
212 void SetEnvironment(EnvironmentT&& value) {
213 m_environmentHasBeenSet = true;
214 m_environment = std::forward<EnvironmentT>(value);
215 }
216 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
217 ContainerProperties& WithEnvironment(EnvironmentT&& value) {
218 SetEnvironment(std::forward<EnvironmentT>(value));
219 return *this;
220 }
221 template <typename EnvironmentT = KeyValuePair>
222 ContainerProperties& AddEnvironment(EnvironmentT&& value) {
223 m_environmentHasBeenSet = true;
224 m_environment.emplace_back(std::forward<EnvironmentT>(value));
225 return *this;
226 }
228
230
239 inline const Aws::Vector<MountPoint>& GetMountPoints() const { return m_mountPoints; }
240 inline bool MountPointsHasBeenSet() const { return m_mountPointsHasBeenSet; }
241 template <typename MountPointsT = Aws::Vector<MountPoint>>
242 void SetMountPoints(MountPointsT&& value) {
243 m_mountPointsHasBeenSet = true;
244 m_mountPoints = std::forward<MountPointsT>(value);
245 }
246 template <typename MountPointsT = Aws::Vector<MountPoint>>
247 ContainerProperties& WithMountPoints(MountPointsT&& value) {
248 SetMountPoints(std::forward<MountPointsT>(value));
249 return *this;
250 }
251 template <typename MountPointsT = MountPoint>
252 ContainerProperties& AddMountPoints(MountPointsT&& value) {
253 m_mountPointsHasBeenSet = true;
254 m_mountPoints.emplace_back(std::forward<MountPointsT>(value));
255 return *this;
256 }
258
260
268 inline bool GetReadonlyRootFilesystem() const { return m_readonlyRootFilesystem; }
269 inline bool ReadonlyRootFilesystemHasBeenSet() const { return m_readonlyRootFilesystemHasBeenSet; }
270 inline void SetReadonlyRootFilesystem(bool value) {
271 m_readonlyRootFilesystemHasBeenSet = true;
272 m_readonlyRootFilesystem = value;
273 }
276 return *this;
277 }
279
281
294 inline bool GetPrivileged() const { return m_privileged; }
295 inline bool PrivilegedHasBeenSet() const { return m_privilegedHasBeenSet; }
296 inline void SetPrivileged(bool value) {
297 m_privilegedHasBeenSet = true;
298 m_privileged = value;
299 }
301 SetPrivileged(value);
302 return *this;
303 }
305
307
318 inline const Aws::Vector<Ulimit>& GetUlimits() const { return m_ulimits; }
319 inline bool UlimitsHasBeenSet() const { return m_ulimitsHasBeenSet; }
320 template <typename UlimitsT = Aws::Vector<Ulimit>>
321 void SetUlimits(UlimitsT&& value) {
322 m_ulimitsHasBeenSet = true;
323 m_ulimits = std::forward<UlimitsT>(value);
324 }
325 template <typename UlimitsT = Aws::Vector<Ulimit>>
326 ContainerProperties& WithUlimits(UlimitsT&& value) {
327 SetUlimits(std::forward<UlimitsT>(value));
328 return *this;
329 }
330 template <typename UlimitsT = Ulimit>
331 ContainerProperties& AddUlimits(UlimitsT&& value) {
332 m_ulimitsHasBeenSet = true;
333 m_ulimits.emplace_back(std::forward<UlimitsT>(value));
334 return *this;
335 }
337
339
348 inline const Aws::String& GetUser() const { return m_user; }
349 inline bool UserHasBeenSet() const { return m_userHasBeenSet; }
350 template <typename UserT = Aws::String>
351 void SetUser(UserT&& value) {
352 m_userHasBeenSet = true;
353 m_user = std::forward<UserT>(value);
354 }
355 template <typename UserT = Aws::String>
357 SetUser(std::forward<UserT>(value));
358 return *this;
359 }
361
363
369 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
370 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
371 template <typename InstanceTypeT = Aws::String>
372 void SetInstanceType(InstanceTypeT&& value) {
373 m_instanceTypeHasBeenSet = true;
374 m_instanceType = std::forward<InstanceTypeT>(value);
375 }
376 template <typename InstanceTypeT = Aws::String>
377 ContainerProperties& WithInstanceType(InstanceTypeT&& value) {
378 SetInstanceType(std::forward<InstanceTypeT>(value));
379 return *this;
380 }
382
384
389 inline const Aws::Vector<ResourceRequirement>& GetResourceRequirements() const { return m_resourceRequirements; }
390 inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; }
391 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
392 void SetResourceRequirements(ResourceRequirementsT&& value) {
393 m_resourceRequirementsHasBeenSet = true;
394 m_resourceRequirements = std::forward<ResourceRequirementsT>(value);
395 }
396 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
397 ContainerProperties& WithResourceRequirements(ResourceRequirementsT&& value) {
398 SetResourceRequirements(std::forward<ResourceRequirementsT>(value));
399 return *this;
400 }
401 template <typename ResourceRequirementsT = ResourceRequirement>
402 ContainerProperties& AddResourceRequirements(ResourceRequirementsT&& value) {
403 m_resourceRequirementsHasBeenSet = true;
404 m_resourceRequirements.emplace_back(std::forward<ResourceRequirementsT>(value));
405 return *this;
406 }
408
410
414 inline const LinuxParameters& GetLinuxParameters() const { return m_linuxParameters; }
415 inline bool LinuxParametersHasBeenSet() const { return m_linuxParametersHasBeenSet; }
416 template <typename LinuxParametersT = LinuxParameters>
417 void SetLinuxParameters(LinuxParametersT&& value) {
418 m_linuxParametersHasBeenSet = true;
419 m_linuxParameters = std::forward<LinuxParametersT>(value);
420 }
421 template <typename LinuxParametersT = LinuxParameters>
422 ContainerProperties& WithLinuxParameters(LinuxParametersT&& value) {
423 SetLinuxParameters(std::forward<LinuxParametersT>(value));
424 return *this;
425 }
427
429
461 inline const LogConfiguration& GetLogConfiguration() const { return m_logConfiguration; }
462 inline bool LogConfigurationHasBeenSet() const { return m_logConfigurationHasBeenSet; }
463 template <typename LogConfigurationT = LogConfiguration>
464 void SetLogConfiguration(LogConfigurationT&& value) {
465 m_logConfigurationHasBeenSet = true;
466 m_logConfiguration = std::forward<LogConfigurationT>(value);
467 }
468 template <typename LogConfigurationT = LogConfiguration>
469 ContainerProperties& WithLogConfiguration(LogConfigurationT&& value) {
470 SetLogConfiguration(std::forward<LogConfigurationT>(value));
471 return *this;
472 }
474
476
481 inline const Aws::Vector<Secret>& GetSecrets() const { return m_secrets; }
482 inline bool SecretsHasBeenSet() const { return m_secretsHasBeenSet; }
483 template <typename SecretsT = Aws::Vector<Secret>>
484 void SetSecrets(SecretsT&& value) {
485 m_secretsHasBeenSet = true;
486 m_secrets = std::forward<SecretsT>(value);
487 }
488 template <typename SecretsT = Aws::Vector<Secret>>
489 ContainerProperties& WithSecrets(SecretsT&& value) {
490 SetSecrets(std::forward<SecretsT>(value));
491 return *this;
492 }
493 template <typename SecretsT = Secret>
494 ContainerProperties& AddSecrets(SecretsT&& value) {
495 m_secretsHasBeenSet = true;
496 m_secrets.emplace_back(std::forward<SecretsT>(value));
497 return *this;
498 }
500
502
507 inline const NetworkConfiguration& GetNetworkConfiguration() const { return m_networkConfiguration; }
508 inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; }
509 template <typename NetworkConfigurationT = NetworkConfiguration>
510 void SetNetworkConfiguration(NetworkConfigurationT&& value) {
511 m_networkConfigurationHasBeenSet = true;
512 m_networkConfiguration = std::forward<NetworkConfigurationT>(value);
513 }
514 template <typename NetworkConfigurationT = NetworkConfiguration>
515 ContainerProperties& WithNetworkConfiguration(NetworkConfigurationT&& value) {
516 SetNetworkConfiguration(std::forward<NetworkConfigurationT>(value));
517 return *this;
518 }
520
522
527 inline const FargatePlatformConfiguration& GetFargatePlatformConfiguration() const { return m_fargatePlatformConfiguration; }
528 inline bool FargatePlatformConfigurationHasBeenSet() const { return m_fargatePlatformConfigurationHasBeenSet; }
529 template <typename FargatePlatformConfigurationT = FargatePlatformConfiguration>
530 void SetFargatePlatformConfiguration(FargatePlatformConfigurationT&& value) {
531 m_fargatePlatformConfigurationHasBeenSet = true;
532 m_fargatePlatformConfiguration = std::forward<FargatePlatformConfigurationT>(value);
533 }
534 template <typename FargatePlatformConfigurationT = FargatePlatformConfiguration>
535 ContainerProperties& WithFargatePlatformConfiguration(FargatePlatformConfigurationT&& value) {
536 SetFargatePlatformConfiguration(std::forward<FargatePlatformConfigurationT>(value));
537 return *this;
538 }
540
542
547 inline bool GetEnableExecuteCommand() const { return m_enableExecuteCommand; }
548 inline bool EnableExecuteCommandHasBeenSet() const { return m_enableExecuteCommandHasBeenSet; }
549 inline void SetEnableExecuteCommand(bool value) {
550 m_enableExecuteCommandHasBeenSet = true;
551 m_enableExecuteCommand = value;
552 }
555 return *this;
556 }
558
560
565 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
566 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
567 template <typename EphemeralStorageT = EphemeralStorage>
568 void SetEphemeralStorage(EphemeralStorageT&& value) {
569 m_ephemeralStorageHasBeenSet = true;
570 m_ephemeralStorage = std::forward<EphemeralStorageT>(value);
571 }
572 template <typename EphemeralStorageT = EphemeralStorage>
573 ContainerProperties& WithEphemeralStorage(EphemeralStorageT&& value) {
574 SetEphemeralStorage(std::forward<EphemeralStorageT>(value));
575 return *this;
576 }
578
580
584 inline const RuntimePlatform& GetRuntimePlatform() const { return m_runtimePlatform; }
585 inline bool RuntimePlatformHasBeenSet() const { return m_runtimePlatformHasBeenSet; }
586 template <typename RuntimePlatformT = RuntimePlatform>
587 void SetRuntimePlatform(RuntimePlatformT&& value) {
588 m_runtimePlatformHasBeenSet = true;
589 m_runtimePlatform = std::forward<RuntimePlatformT>(value);
590 }
591 template <typename RuntimePlatformT = RuntimePlatform>
592 ContainerProperties& WithRuntimePlatform(RuntimePlatformT&& value) {
593 SetRuntimePlatform(std::forward<RuntimePlatformT>(value));
594 return *this;
595 }
597
599
602 inline const RepositoryCredentials& GetRepositoryCredentials() const { return m_repositoryCredentials; }
603 inline bool RepositoryCredentialsHasBeenSet() const { return m_repositoryCredentialsHasBeenSet; }
604 template <typename RepositoryCredentialsT = RepositoryCredentials>
605 void SetRepositoryCredentials(RepositoryCredentialsT&& value) {
606 m_repositoryCredentialsHasBeenSet = true;
607 m_repositoryCredentials = std::forward<RepositoryCredentialsT>(value);
608 }
609 template <typename RepositoryCredentialsT = RepositoryCredentials>
610 ContainerProperties& WithRepositoryCredentials(RepositoryCredentialsT&& value) {
611 SetRepositoryCredentials(std::forward<RepositoryCredentialsT>(value));
612 return *this;
613 }
615 private:
616 Aws::String m_image;
617
618 Aws::Vector<Aws::String> m_command;
619
620 Aws::String m_jobRoleArn;
621
622 Aws::String m_executionRoleArn;
623
624 Aws::Vector<Volume> m_volumes;
625
626 Aws::Vector<KeyValuePair> m_environment;
627
628 Aws::Vector<MountPoint> m_mountPoints;
629
630 bool m_readonlyRootFilesystem{false};
631
632 bool m_privileged{false};
633
634 Aws::Vector<Ulimit> m_ulimits;
635
636 Aws::String m_user;
637
638 Aws::String m_instanceType;
639
640 Aws::Vector<ResourceRequirement> m_resourceRequirements;
641
642 LinuxParameters m_linuxParameters;
643
644 LogConfiguration m_logConfiguration;
645
646 Aws::Vector<Secret> m_secrets;
647
648 NetworkConfiguration m_networkConfiguration;
649
650 FargatePlatformConfiguration m_fargatePlatformConfiguration;
651
652 bool m_enableExecuteCommand{false};
653
654 EphemeralStorage m_ephemeralStorage;
655
656 RuntimePlatform m_runtimePlatform;
657
658 RepositoryCredentials m_repositoryCredentials;
659 bool m_imageHasBeenSet = false;
660 bool m_commandHasBeenSet = false;
661 bool m_jobRoleArnHasBeenSet = false;
662 bool m_executionRoleArnHasBeenSet = false;
663 bool m_volumesHasBeenSet = false;
664 bool m_environmentHasBeenSet = false;
665 bool m_mountPointsHasBeenSet = false;
666 bool m_readonlyRootFilesystemHasBeenSet = false;
667 bool m_privilegedHasBeenSet = false;
668 bool m_ulimitsHasBeenSet = false;
669 bool m_userHasBeenSet = false;
670 bool m_instanceTypeHasBeenSet = false;
671 bool m_resourceRequirementsHasBeenSet = false;
672 bool m_linuxParametersHasBeenSet = false;
673 bool m_logConfigurationHasBeenSet = false;
674 bool m_secretsHasBeenSet = false;
675 bool m_networkConfigurationHasBeenSet = false;
676 bool m_fargatePlatformConfigurationHasBeenSet = false;
677 bool m_enableExecuteCommandHasBeenSet = false;
678 bool m_ephemeralStorageHasBeenSet = false;
679 bool m_runtimePlatformHasBeenSet = false;
680 bool m_repositoryCredentialsHasBeenSet = false;
681};
682
683} // namespace Model
684} // namespace Batch
685} // namespace Aws
const Aws::String & GetExecutionRoleArn() const
AWS_BATCH_API ContainerProperties(Aws::Utils::Json::JsonView jsonValue)
ContainerProperties & WithLogConfiguration(LogConfigurationT &&value)
const Aws::Vector< Ulimit > & GetUlimits() const
void SetResourceRequirements(ResourceRequirementsT &&value)
ContainerProperties & WithVolumes(VolumesT &&value)
ContainerProperties & WithExecutionRoleArn(ExecutionRoleArnT &&value)
AWS_BATCH_API ContainerProperties()=default
const Aws::String & GetInstanceType() const
const RuntimePlatform & GetRuntimePlatform() const
void SetLogConfiguration(LogConfigurationT &&value)
void SetNetworkConfiguration(NetworkConfigurationT &&value)
ContainerProperties & WithUlimits(UlimitsT &&value)
ContainerProperties & AddEnvironment(EnvironmentT &&value)
ContainerProperties & WithReadonlyRootFilesystem(bool value)
ContainerProperties & AddMountPoints(MountPointsT &&value)
ContainerProperties & WithSecrets(SecretsT &&value)
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
void SetEphemeralStorage(EphemeralStorageT &&value)
const Aws::String & GetJobRoleArn() const
ContainerProperties & WithResourceRequirements(ResourceRequirementsT &&value)
AWS_BATCH_API ContainerProperties & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< ResourceRequirement > & GetResourceRequirements() const
ContainerProperties & AddResourceRequirements(ResourceRequirementsT &&value)
const Aws::Vector< Volume > & GetVolumes() const
const LogConfiguration & GetLogConfiguration() const
const Aws::Vector< MountPoint > & GetMountPoints() const
const Aws::Vector< KeyValuePair > & GetEnvironment() const
const FargatePlatformConfiguration & GetFargatePlatformConfiguration() const
ContainerProperties & WithJobRoleArn(JobRoleArnT &&value)
ContainerProperties & WithInstanceType(InstanceTypeT &&value)
ContainerProperties & WithEnvironment(EnvironmentT &&value)
ContainerProperties & WithLinuxParameters(LinuxParametersT &&value)
ContainerProperties & WithUser(UserT &&value)
void SetInstanceType(InstanceTypeT &&value)
ContainerProperties & WithFargatePlatformConfiguration(FargatePlatformConfigurationT &&value)
const EphemeralStorage & GetEphemeralStorage() const
ContainerProperties & WithMountPoints(MountPointsT &&value)
ContainerProperties & WithRuntimePlatform(RuntimePlatformT &&value)
ContainerProperties & WithCommand(CommandT &&value)
ContainerProperties & AddSecrets(SecretsT &&value)
void SetLinuxParameters(LinuxParametersT &&value)
const LinuxParameters & GetLinuxParameters() const
const RepositoryCredentials & GetRepositoryCredentials() const
const Aws::Vector< Secret > & GetSecrets() const
void SetFargatePlatformConfiguration(FargatePlatformConfigurationT &&value)
void SetRepositoryCredentials(RepositoryCredentialsT &&value)
ContainerProperties & WithNetworkConfiguration(NetworkConfigurationT &&value)
ContainerProperties & WithImage(ImageT &&value)
void SetRuntimePlatform(RuntimePlatformT &&value)
const NetworkConfiguration & GetNetworkConfiguration() const
ContainerProperties & AddUlimits(UlimitsT &&value)
ContainerProperties & WithRepositoryCredentials(RepositoryCredentialsT &&value)
ContainerProperties & WithEphemeralStorage(EphemeralStorageT &&value)
ContainerProperties & AddCommand(CommandT &&value)
ContainerProperties & WithPrivileged(bool value)
ContainerProperties & AddVolumes(VolumesT &&value)
ContainerProperties & WithEnableExecuteCommand(bool value)
const Aws::Vector< Aws::String > & GetCommand() const
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue