AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ContainerProperties.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/batch/model/LinuxParameters.h>
11#include <aws/batch/model/LogConfiguration.h>
12#include <aws/batch/model/NetworkConfiguration.h>
13#include <aws/batch/model/FargatePlatformConfiguration.h>
14#include <aws/batch/model/EphemeralStorage.h>
15#include <aws/batch/model/RuntimePlatform.h>
16#include <aws/batch/model/RepositoryCredentials.h>
17#include <aws/batch/model/Volume.h>
18#include <aws/batch/model/KeyValuePair.h>
19#include <aws/batch/model/MountPoint.h>
20#include <aws/batch/model/Ulimit.h>
21#include <aws/batch/model/ResourceRequirement.h>
22#include <aws/batch/model/Secret.h>
23#include <utility>
24
25namespace Aws
26{
27namespace Utils
28{
29namespace Json
30{
31 class JsonValue;
32 class JsonView;
33} // namespace Json
34} // namespace Utils
35namespace Batch
36{
37namespace Model
38{
39
48 {
49 public:
50 AWS_BATCH_API ContainerProperties() = default;
53 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
54
55
57
87 inline const Aws::String& GetImage() const { return m_image; }
88 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
89 template<typename ImageT = Aws::String>
90 void SetImage(ImageT&& value) { m_imageHasBeenSet = true; m_image = std::forward<ImageT>(value); }
91 template<typename ImageT = Aws::String>
92 ContainerProperties& WithImage(ImageT&& value) { SetImage(std::forward<ImageT>(value)); return *this;}
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) { m_commandHasBeenSet = true; m_command = std::forward<CommandT>(value); }
111 template<typename CommandT = Aws::Vector<Aws::String>>
112 ContainerProperties& WithCommand(CommandT&& value) { SetCommand(std::forward<CommandT>(value)); return *this;}
113 template<typename CommandT = Aws::String>
114 ContainerProperties& AddCommand(CommandT&& value) { m_commandHasBeenSet = true; m_command.emplace_back(std::forward<CommandT>(value)); return *this; }
116
118
125 inline const Aws::String& GetJobRoleArn() const { return m_jobRoleArn; }
126 inline bool JobRoleArnHasBeenSet() const { return m_jobRoleArnHasBeenSet; }
127 template<typename JobRoleArnT = Aws::String>
128 void SetJobRoleArn(JobRoleArnT&& value) { m_jobRoleArnHasBeenSet = true; m_jobRoleArn = std::forward<JobRoleArnT>(value); }
129 template<typename JobRoleArnT = Aws::String>
130 ContainerProperties& WithJobRoleArn(JobRoleArnT&& value) { SetJobRoleArn(std::forward<JobRoleArnT>(value)); return *this;}
132
134
141 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
142 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
143 template<typename ExecutionRoleArnT = Aws::String>
144 void SetExecutionRoleArn(ExecutionRoleArnT&& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = std::forward<ExecutionRoleArnT>(value); }
145 template<typename ExecutionRoleArnT = Aws::String>
146 ContainerProperties& WithExecutionRoleArn(ExecutionRoleArnT&& value) { SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value)); return *this;}
148
150
153 inline const Aws::Vector<Volume>& GetVolumes() const { return m_volumes; }
154 inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; }
155 template<typename VolumesT = Aws::Vector<Volume>>
156 void SetVolumes(VolumesT&& value) { m_volumesHasBeenSet = true; m_volumes = std::forward<VolumesT>(value); }
157 template<typename VolumesT = Aws::Vector<Volume>>
158 ContainerProperties& WithVolumes(VolumesT&& value) { SetVolumes(std::forward<VolumesT>(value)); return *this;}
159 template<typename VolumesT = Volume>
160 ContainerProperties& AddVolumes(VolumesT&& value) { m_volumesHasBeenSet = true; m_volumes.emplace_back(std::forward<VolumesT>(value)); return *this; }
162
164
177 inline const Aws::Vector<KeyValuePair>& GetEnvironment() const { return m_environment; }
178 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
179 template<typename EnvironmentT = Aws::Vector<KeyValuePair>>
180 void SetEnvironment(EnvironmentT&& value) { m_environmentHasBeenSet = true; m_environment = std::forward<EnvironmentT>(value); }
181 template<typename EnvironmentT = Aws::Vector<KeyValuePair>>
182 ContainerProperties& WithEnvironment(EnvironmentT&& value) { SetEnvironment(std::forward<EnvironmentT>(value)); return *this;}
183 template<typename EnvironmentT = KeyValuePair>
184 ContainerProperties& AddEnvironment(EnvironmentT&& value) { m_environmentHasBeenSet = true; m_environment.emplace_back(std::forward<EnvironmentT>(value)); return *this; }
186
188
197 inline const Aws::Vector<MountPoint>& GetMountPoints() const { return m_mountPoints; }
198 inline bool MountPointsHasBeenSet() const { return m_mountPointsHasBeenSet; }
199 template<typename MountPointsT = Aws::Vector<MountPoint>>
200 void SetMountPoints(MountPointsT&& value) { m_mountPointsHasBeenSet = true; m_mountPoints = std::forward<MountPointsT>(value); }
201 template<typename MountPointsT = Aws::Vector<MountPoint>>
202 ContainerProperties& WithMountPoints(MountPointsT&& value) { SetMountPoints(std::forward<MountPointsT>(value)); return *this;}
203 template<typename MountPointsT = MountPoint>
204 ContainerProperties& AddMountPoints(MountPointsT&& value) { m_mountPointsHasBeenSet = true; m_mountPoints.emplace_back(std::forward<MountPointsT>(value)); return *this; }
206
208
216 inline bool GetReadonlyRootFilesystem() const { return m_readonlyRootFilesystem; }
217 inline bool ReadonlyRootFilesystemHasBeenSet() const { return m_readonlyRootFilesystemHasBeenSet; }
218 inline void SetReadonlyRootFilesystem(bool value) { m_readonlyRootFilesystemHasBeenSet = true; m_readonlyRootFilesystem = value; }
221
223
236 inline bool GetPrivileged() const { return m_privileged; }
237 inline bool PrivilegedHasBeenSet() const { return m_privilegedHasBeenSet; }
238 inline void SetPrivileged(bool value) { m_privilegedHasBeenSet = true; m_privileged = value; }
239 inline ContainerProperties& WithPrivileged(bool value) { SetPrivileged(value); return *this;}
241
243
254 inline const Aws::Vector<Ulimit>& GetUlimits() const { return m_ulimits; }
255 inline bool UlimitsHasBeenSet() const { return m_ulimitsHasBeenSet; }
256 template<typename UlimitsT = Aws::Vector<Ulimit>>
257 void SetUlimits(UlimitsT&& value) { m_ulimitsHasBeenSet = true; m_ulimits = std::forward<UlimitsT>(value); }
258 template<typename UlimitsT = Aws::Vector<Ulimit>>
259 ContainerProperties& WithUlimits(UlimitsT&& value) { SetUlimits(std::forward<UlimitsT>(value)); return *this;}
260 template<typename UlimitsT = Ulimit>
261 ContainerProperties& AddUlimits(UlimitsT&& value) { m_ulimitsHasBeenSet = true; m_ulimits.emplace_back(std::forward<UlimitsT>(value)); return *this; }
263
265
274 inline const Aws::String& GetUser() const { return m_user; }
275 inline bool UserHasBeenSet() const { return m_userHasBeenSet; }
276 template<typename UserT = Aws::String>
277 void SetUser(UserT&& value) { m_userHasBeenSet = true; m_user = std::forward<UserT>(value); }
278 template<typename UserT = Aws::String>
279 ContainerProperties& WithUser(UserT&& value) { SetUser(std::forward<UserT>(value)); return *this;}
281
283
289 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
290 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
291 template<typename InstanceTypeT = Aws::String>
292 void SetInstanceType(InstanceTypeT&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::forward<InstanceTypeT>(value); }
293 template<typename InstanceTypeT = Aws::String>
294 ContainerProperties& WithInstanceType(InstanceTypeT&& value) { SetInstanceType(std::forward<InstanceTypeT>(value)); return *this;}
296
298
303 inline const Aws::Vector<ResourceRequirement>& GetResourceRequirements() const { return m_resourceRequirements; }
304 inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; }
305 template<typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
306 void SetResourceRequirements(ResourceRequirementsT&& value) { m_resourceRequirementsHasBeenSet = true; m_resourceRequirements = std::forward<ResourceRequirementsT>(value); }
307 template<typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
308 ContainerProperties& WithResourceRequirements(ResourceRequirementsT&& value) { SetResourceRequirements(std::forward<ResourceRequirementsT>(value)); return *this;}
309 template<typename ResourceRequirementsT = ResourceRequirement>
310 ContainerProperties& AddResourceRequirements(ResourceRequirementsT&& value) { m_resourceRequirementsHasBeenSet = true; m_resourceRequirements.emplace_back(std::forward<ResourceRequirementsT>(value)); return *this; }
312
314
318 inline const LinuxParameters& GetLinuxParameters() const { return m_linuxParameters; }
319 inline bool LinuxParametersHasBeenSet() const { return m_linuxParametersHasBeenSet; }
320 template<typename LinuxParametersT = LinuxParameters>
321 void SetLinuxParameters(LinuxParametersT&& value) { m_linuxParametersHasBeenSet = true; m_linuxParameters = std::forward<LinuxParametersT>(value); }
322 template<typename LinuxParametersT = LinuxParameters>
323 ContainerProperties& WithLinuxParameters(LinuxParametersT&& value) { SetLinuxParameters(std::forward<LinuxParametersT>(value)); return *this;}
325
327
359 inline const LogConfiguration& GetLogConfiguration() const { return m_logConfiguration; }
360 inline bool LogConfigurationHasBeenSet() const { return m_logConfigurationHasBeenSet; }
361 template<typename LogConfigurationT = LogConfiguration>
362 void SetLogConfiguration(LogConfigurationT&& value) { m_logConfigurationHasBeenSet = true; m_logConfiguration = std::forward<LogConfigurationT>(value); }
363 template<typename LogConfigurationT = LogConfiguration>
364 ContainerProperties& WithLogConfiguration(LogConfigurationT&& value) { SetLogConfiguration(std::forward<LogConfigurationT>(value)); return *this;}
366
368
373 inline const Aws::Vector<Secret>& GetSecrets() const { return m_secrets; }
374 inline bool SecretsHasBeenSet() const { return m_secretsHasBeenSet; }
375 template<typename SecretsT = Aws::Vector<Secret>>
376 void SetSecrets(SecretsT&& value) { m_secretsHasBeenSet = true; m_secrets = std::forward<SecretsT>(value); }
377 template<typename SecretsT = Aws::Vector<Secret>>
378 ContainerProperties& WithSecrets(SecretsT&& value) { SetSecrets(std::forward<SecretsT>(value)); return *this;}
379 template<typename SecretsT = Secret>
380 ContainerProperties& AddSecrets(SecretsT&& value) { m_secretsHasBeenSet = true; m_secrets.emplace_back(std::forward<SecretsT>(value)); return *this; }
382
384
389 inline const NetworkConfiguration& GetNetworkConfiguration() const { return m_networkConfiguration; }
390 inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; }
391 template<typename NetworkConfigurationT = NetworkConfiguration>
392 void SetNetworkConfiguration(NetworkConfigurationT&& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = std::forward<NetworkConfigurationT>(value); }
393 template<typename NetworkConfigurationT = NetworkConfiguration>
394 ContainerProperties& WithNetworkConfiguration(NetworkConfigurationT&& value) { SetNetworkConfiguration(std::forward<NetworkConfigurationT>(value)); return *this;}
396
398
403 inline const FargatePlatformConfiguration& GetFargatePlatformConfiguration() const { return m_fargatePlatformConfiguration; }
404 inline bool FargatePlatformConfigurationHasBeenSet() const { return m_fargatePlatformConfigurationHasBeenSet; }
405 template<typename FargatePlatformConfigurationT = FargatePlatformConfiguration>
406 void SetFargatePlatformConfiguration(FargatePlatformConfigurationT&& value) { m_fargatePlatformConfigurationHasBeenSet = true; m_fargatePlatformConfiguration = std::forward<FargatePlatformConfigurationT>(value); }
407 template<typename FargatePlatformConfigurationT = FargatePlatformConfiguration>
408 ContainerProperties& WithFargatePlatformConfiguration(FargatePlatformConfigurationT&& value) { SetFargatePlatformConfiguration(std::forward<FargatePlatformConfigurationT>(value)); return *this;}
410
412
417 inline bool GetEnableExecuteCommand() const { return m_enableExecuteCommand; }
418 inline bool EnableExecuteCommandHasBeenSet() const { return m_enableExecuteCommandHasBeenSet; }
419 inline void SetEnableExecuteCommand(bool value) { m_enableExecuteCommandHasBeenSet = true; m_enableExecuteCommand = value; }
420 inline ContainerProperties& WithEnableExecuteCommand(bool value) { SetEnableExecuteCommand(value); return *this;}
422
424
429 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
430 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
431 template<typename EphemeralStorageT = EphemeralStorage>
432 void SetEphemeralStorage(EphemeralStorageT&& value) { m_ephemeralStorageHasBeenSet = true; m_ephemeralStorage = std::forward<EphemeralStorageT>(value); }
433 template<typename EphemeralStorageT = EphemeralStorage>
434 ContainerProperties& WithEphemeralStorage(EphemeralStorageT&& value) { SetEphemeralStorage(std::forward<EphemeralStorageT>(value)); return *this;}
436
438
442 inline const RuntimePlatform& GetRuntimePlatform() const { return m_runtimePlatform; }
443 inline bool RuntimePlatformHasBeenSet() const { return m_runtimePlatformHasBeenSet; }
444 template<typename RuntimePlatformT = RuntimePlatform>
445 void SetRuntimePlatform(RuntimePlatformT&& value) { m_runtimePlatformHasBeenSet = true; m_runtimePlatform = std::forward<RuntimePlatformT>(value); }
446 template<typename RuntimePlatformT = RuntimePlatform>
447 ContainerProperties& WithRuntimePlatform(RuntimePlatformT&& value) { SetRuntimePlatform(std::forward<RuntimePlatformT>(value)); return *this;}
449
451
454 inline const RepositoryCredentials& GetRepositoryCredentials() const { return m_repositoryCredentials; }
455 inline bool RepositoryCredentialsHasBeenSet() const { return m_repositoryCredentialsHasBeenSet; }
456 template<typename RepositoryCredentialsT = RepositoryCredentials>
457 void SetRepositoryCredentials(RepositoryCredentialsT&& value) { m_repositoryCredentialsHasBeenSet = true; m_repositoryCredentials = std::forward<RepositoryCredentialsT>(value); }
458 template<typename RepositoryCredentialsT = RepositoryCredentials>
459 ContainerProperties& WithRepositoryCredentials(RepositoryCredentialsT&& value) { SetRepositoryCredentials(std::forward<RepositoryCredentialsT>(value)); return *this;}
461 private:
462
463 Aws::String m_image;
464 bool m_imageHasBeenSet = false;
465
466 Aws::Vector<Aws::String> m_command;
467 bool m_commandHasBeenSet = false;
468
469 Aws::String m_jobRoleArn;
470 bool m_jobRoleArnHasBeenSet = false;
471
472 Aws::String m_executionRoleArn;
473 bool m_executionRoleArnHasBeenSet = false;
474
475 Aws::Vector<Volume> m_volumes;
476 bool m_volumesHasBeenSet = false;
477
478 Aws::Vector<KeyValuePair> m_environment;
479 bool m_environmentHasBeenSet = false;
480
481 Aws::Vector<MountPoint> m_mountPoints;
482 bool m_mountPointsHasBeenSet = false;
483
484 bool m_readonlyRootFilesystem{false};
485 bool m_readonlyRootFilesystemHasBeenSet = false;
486
487 bool m_privileged{false};
488 bool m_privilegedHasBeenSet = false;
489
490 Aws::Vector<Ulimit> m_ulimits;
491 bool m_ulimitsHasBeenSet = false;
492
493 Aws::String m_user;
494 bool m_userHasBeenSet = false;
495
496 Aws::String m_instanceType;
497 bool m_instanceTypeHasBeenSet = false;
498
499 Aws::Vector<ResourceRequirement> m_resourceRequirements;
500 bool m_resourceRequirementsHasBeenSet = false;
501
502 LinuxParameters m_linuxParameters;
503 bool m_linuxParametersHasBeenSet = false;
504
505 LogConfiguration m_logConfiguration;
506 bool m_logConfigurationHasBeenSet = false;
507
508 Aws::Vector<Secret> m_secrets;
509 bool m_secretsHasBeenSet = false;
510
511 NetworkConfiguration m_networkConfiguration;
512 bool m_networkConfigurationHasBeenSet = false;
513
514 FargatePlatformConfiguration m_fargatePlatformConfiguration;
515 bool m_fargatePlatformConfigurationHasBeenSet = false;
516
517 bool m_enableExecuteCommand{false};
518 bool m_enableExecuteCommandHasBeenSet = false;
519
520 EphemeralStorage m_ephemeralStorage;
521 bool m_ephemeralStorageHasBeenSet = false;
522
523 RuntimePlatform m_runtimePlatform;
524 bool m_runtimePlatformHasBeenSet = false;
525
526 RepositoryCredentials m_repositoryCredentials;
527 bool m_repositoryCredentialsHasBeenSet = false;
528 };
529
530} // namespace Model
531} // namespace Batch
532} // 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