AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
ComputeResourceUpdate.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/batch/model/CRUpdateAllocationStrategy.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/batch/model/LaunchTemplateSpecification.h>
13#include <aws/batch/model/CRType.h>
14#include <aws/batch/model/Ec2Configuration.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Json
22{
23 class JsonValue;
24 class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace Batch
28{
29namespace Model
30{
31
42 {
43 public:
44 AWS_BATCH_API ComputeResourceUpdate() = default;
47 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
48
49
51
57 inline int GetMinvCpus() const { return m_minvCpus; }
58 inline bool MinvCpusHasBeenSet() const { return m_minvCpusHasBeenSet; }
59 inline void SetMinvCpus(int value) { m_minvCpusHasBeenSet = true; m_minvCpus = value; }
60 inline ComputeResourceUpdate& WithMinvCpus(int value) { SetMinvCpus(value); return *this;}
62
64
74 inline int GetMaxvCpus() const { return m_maxvCpus; }
75 inline bool MaxvCpusHasBeenSet() const { return m_maxvCpusHasBeenSet; }
76 inline void SetMaxvCpus(int value) { m_maxvCpusHasBeenSet = true; m_maxvCpus = value; }
77 inline ComputeResourceUpdate& WithMaxvCpus(int value) { SetMaxvCpus(value); return *this;}
79
81
96 inline int GetDesiredvCpus() const { return m_desiredvCpus; }
97 inline bool DesiredvCpusHasBeenSet() const { return m_desiredvCpusHasBeenSet; }
98 inline void SetDesiredvCpus(int value) { m_desiredvCpusHasBeenSet = true; m_desiredvCpus = value; }
99 inline ComputeResourceUpdate& WithDesiredvCpus(int value) { SetDesiredvCpus(value); return *this;}
101
103
127 inline const Aws::Vector<Aws::String>& GetSubnets() const { return m_subnets; }
128 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
129 template<typename SubnetsT = Aws::Vector<Aws::String>>
130 void SetSubnets(SubnetsT&& value) { m_subnetsHasBeenSet = true; m_subnets = std::forward<SubnetsT>(value); }
131 template<typename SubnetsT = Aws::Vector<Aws::String>>
132 ComputeResourceUpdate& WithSubnets(SubnetsT&& value) { SetSubnets(std::forward<SubnetsT>(value)); return *this;}
133 template<typename SubnetsT = Aws::String>
134 ComputeResourceUpdate& AddSubnets(SubnetsT&& value) { m_subnetsHasBeenSet = true; m_subnets.emplace_back(std::forward<SubnetsT>(value)); return *this; }
136
138
151 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
152 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
153 template<typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
154 void SetSecurityGroupIds(SecurityGroupIdsT&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = std::forward<SecurityGroupIdsT>(value); }
155 template<typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
156 ComputeResourceUpdate& WithSecurityGroupIds(SecurityGroupIdsT&& value) { SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value)); return *this;}
157 template<typename SecurityGroupIdsT = Aws::String>
158 ComputeResourceUpdate& AddSecurityGroupIds(SecurityGroupIdsT&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value)); return *this; }
160
162
197 inline CRUpdateAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
198 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
199 inline void SetAllocationStrategy(CRUpdateAllocationStrategy value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; }
202
204
224 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
225 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
226 template<typename InstanceTypesT = Aws::Vector<Aws::String>>
227 void SetInstanceTypes(InstanceTypesT&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = std::forward<InstanceTypesT>(value); }
228 template<typename InstanceTypesT = Aws::Vector<Aws::String>>
229 ComputeResourceUpdate& WithInstanceTypes(InstanceTypesT&& value) { SetInstanceTypes(std::forward<InstanceTypesT>(value)); return *this;}
230 template<typename InstanceTypesT = Aws::String>
231 ComputeResourceUpdate& AddInstanceTypes(InstanceTypesT&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value)); return *this; }
233
235
246 inline const Aws::String& GetEc2KeyPair() const { return m_ec2KeyPair; }
247 inline bool Ec2KeyPairHasBeenSet() const { return m_ec2KeyPairHasBeenSet; }
248 template<typename Ec2KeyPairT = Aws::String>
249 void SetEc2KeyPair(Ec2KeyPairT&& value) { m_ec2KeyPairHasBeenSet = true; m_ec2KeyPair = std::forward<Ec2KeyPairT>(value); }
250 template<typename Ec2KeyPairT = Aws::String>
251 ComputeResourceUpdate& WithEc2KeyPair(Ec2KeyPairT&& value) { SetEc2KeyPair(std::forward<Ec2KeyPairT>(value)); return *this;}
253
255
271 inline const Aws::String& GetInstanceRole() const { return m_instanceRole; }
272 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
273 template<typename InstanceRoleT = Aws::String>
274 void SetInstanceRole(InstanceRoleT&& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = std::forward<InstanceRoleT>(value); }
275 template<typename InstanceRoleT = Aws::String>
276 ComputeResourceUpdate& WithInstanceRole(InstanceRoleT&& value) { SetInstanceRole(std::forward<InstanceRoleT>(value)); return *this;}
278
280
295 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
296 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
297 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
298 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
299 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
300 ComputeResourceUpdate& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
301 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
302 ComputeResourceUpdate& AddTags(TagsKeyT&& key, TagsValueT&& value) {
303 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
304 }
306
308
324 inline const Aws::String& GetPlacementGroup() const { return m_placementGroup; }
325 inline bool PlacementGroupHasBeenSet() const { return m_placementGroupHasBeenSet; }
326 template<typename PlacementGroupT = Aws::String>
327 void SetPlacementGroup(PlacementGroupT&& value) { m_placementGroupHasBeenSet = true; m_placementGroup = std::forward<PlacementGroupT>(value); }
328 template<typename PlacementGroupT = Aws::String>
329 ComputeResourceUpdate& WithPlacementGroup(PlacementGroupT&& value) { SetPlacementGroup(std::forward<PlacementGroupT>(value)); return *this;}
331
333
347 inline int GetBidPercentage() const { return m_bidPercentage; }
348 inline bool BidPercentageHasBeenSet() const { return m_bidPercentageHasBeenSet; }
349 inline void SetBidPercentage(int value) { m_bidPercentageHasBeenSet = true; m_bidPercentage = value; }
350 inline ComputeResourceUpdate& WithBidPercentage(int value) { SetBidPercentage(value); return *this;}
352
354
373 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
374 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
375 template<typename LaunchTemplateT = LaunchTemplateSpecification>
376 void SetLaunchTemplate(LaunchTemplateT&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::forward<LaunchTemplateT>(value); }
377 template<typename LaunchTemplateT = LaunchTemplateSpecification>
378 ComputeResourceUpdate& WithLaunchTemplate(LaunchTemplateT&& value) { SetLaunchTemplate(std::forward<LaunchTemplateT>(value)); return *this;}
380
382
395 inline const Aws::Vector<Ec2Configuration>& GetEc2Configuration() const { return m_ec2Configuration; }
396 inline bool Ec2ConfigurationHasBeenSet() const { return m_ec2ConfigurationHasBeenSet; }
397 template<typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
398 void SetEc2Configuration(Ec2ConfigurationT&& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration = std::forward<Ec2ConfigurationT>(value); }
399 template<typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
400 ComputeResourceUpdate& WithEc2Configuration(Ec2ConfigurationT&& value) { SetEc2Configuration(std::forward<Ec2ConfigurationT>(value)); return *this;}
401 template<typename Ec2ConfigurationT = Ec2Configuration>
402 ComputeResourceUpdate& AddEc2Configuration(Ec2ConfigurationT&& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration.emplace_back(std::forward<Ec2ConfigurationT>(value)); return *this; }
404
406
422 inline bool GetUpdateToLatestImageVersion() const { return m_updateToLatestImageVersion; }
423 inline bool UpdateToLatestImageVersionHasBeenSet() const { return m_updateToLatestImageVersionHasBeenSet; }
424 inline void SetUpdateToLatestImageVersion(bool value) { m_updateToLatestImageVersionHasBeenSet = true; m_updateToLatestImageVersion = value; }
427
429
443 inline CRType GetType() const { return m_type; }
444 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
445 inline void SetType(CRType value) { m_typeHasBeenSet = true; m_type = value; }
446 inline ComputeResourceUpdate& WithType(CRType value) { SetType(value); return *this;}
448
450
470 inline const Aws::String& GetImageId() const { return m_imageId; }
471 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
472 template<typename ImageIdT = Aws::String>
473 void SetImageId(ImageIdT&& value) { m_imageIdHasBeenSet = true; m_imageId = std::forward<ImageIdT>(value); }
474 template<typename ImageIdT = Aws::String>
475 ComputeResourceUpdate& WithImageId(ImageIdT&& value) { SetImageId(std::forward<ImageIdT>(value)); return *this;}
477 private:
478
479 int m_minvCpus{0};
480 bool m_minvCpusHasBeenSet = false;
481
482 int m_maxvCpus{0};
483 bool m_maxvCpusHasBeenSet = false;
484
485 int m_desiredvCpus{0};
486 bool m_desiredvCpusHasBeenSet = false;
487
488 Aws::Vector<Aws::String> m_subnets;
489 bool m_subnetsHasBeenSet = false;
490
491 Aws::Vector<Aws::String> m_securityGroupIds;
492 bool m_securityGroupIdsHasBeenSet = false;
493
495 bool m_allocationStrategyHasBeenSet = false;
496
497 Aws::Vector<Aws::String> m_instanceTypes;
498 bool m_instanceTypesHasBeenSet = false;
499
500 Aws::String m_ec2KeyPair;
501 bool m_ec2KeyPairHasBeenSet = false;
502
503 Aws::String m_instanceRole;
504 bool m_instanceRoleHasBeenSet = false;
505
507 bool m_tagsHasBeenSet = false;
508
509 Aws::String m_placementGroup;
510 bool m_placementGroupHasBeenSet = false;
511
512 int m_bidPercentage{0};
513 bool m_bidPercentageHasBeenSet = false;
514
515 LaunchTemplateSpecification m_launchTemplate;
516 bool m_launchTemplateHasBeenSet = false;
517
518 Aws::Vector<Ec2Configuration> m_ec2Configuration;
519 bool m_ec2ConfigurationHasBeenSet = false;
520
521 bool m_updateToLatestImageVersion{false};
522 bool m_updateToLatestImageVersionHasBeenSet = false;
523
524 CRType m_type{CRType::NOT_SET};
525 bool m_typeHasBeenSet = false;
526
527 Aws::String m_imageId;
528 bool m_imageIdHasBeenSet = false;
529 };
530
531} // namespace Model
532} // namespace Batch
533} // namespace Aws
ComputeResourceUpdate & AddSecurityGroupIds(SecurityGroupIdsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
ComputeResourceUpdate & WithImageId(ImageIdT &&value)
void SetEc2Configuration(Ec2ConfigurationT &&value)
void SetAllocationStrategy(CRUpdateAllocationStrategy value)
void SetPlacementGroup(PlacementGroupT &&value)
ComputeResourceUpdate & WithType(CRType value)
void SetLaunchTemplate(LaunchTemplateT &&value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_BATCH_API ComputeResourceUpdate(Aws::Utils::Json::JsonView jsonValue)
ComputeResourceUpdate & WithInstanceRole(InstanceRoleT &&value)
ComputeResourceUpdate & WithInstanceTypes(InstanceTypesT &&value)
ComputeResourceUpdate & AddEc2Configuration(Ec2ConfigurationT &&value)
void SetSecurityGroupIds(SecurityGroupIdsT &&value)
ComputeResourceUpdate & AddInstanceTypes(InstanceTypesT &&value)
ComputeResourceUpdate & WithUpdateToLatestImageVersion(bool value)
const LaunchTemplateSpecification & GetLaunchTemplate() const
ComputeResourceUpdate & WithTags(TagsT &&value)
ComputeResourceUpdate & WithDesiredvCpus(int value)
ComputeResourceUpdate & WithEc2Configuration(Ec2ConfigurationT &&value)
const Aws::Vector< Aws::String > & GetInstanceTypes() const
CRUpdateAllocationStrategy GetAllocationStrategy() const
ComputeResourceUpdate & WithEc2KeyPair(Ec2KeyPairT &&value)
ComputeResourceUpdate & WithSubnets(SubnetsT &&value)
const Aws::Vector< Ec2Configuration > & GetEc2Configuration() const
ComputeResourceUpdate & WithLaunchTemplate(LaunchTemplateT &&value)
ComputeResourceUpdate & AddSubnets(SubnetsT &&value)
ComputeResourceUpdate & WithPlacementGroup(PlacementGroupT &&value)
const Aws::Vector< Aws::String > & GetSubnets() const
AWS_BATCH_API ComputeResourceUpdate()=default
AWS_BATCH_API ComputeResourceUpdate & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetSecurityGroupIds() const
ComputeResourceUpdate & WithSecurityGroupIds(SecurityGroupIdsT &&value)
ComputeResourceUpdate & WithAllocationStrategy(CRUpdateAllocationStrategy value)
ComputeResourceUpdate & WithBidPercentage(int value)
ComputeResourceUpdate & AddTags(TagsKeyT &&key, TagsValueT &&value)
ComputeResourceUpdate & WithMinvCpus(int value)
ComputeResourceUpdate & WithMaxvCpus(int value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue