AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ComputeResourceUpdate.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/CRType.h>
9#include <aws/batch/model/CRUpdateAllocationStrategy.h>
10#include <aws/batch/model/Ec2Configuration.h>
11#include <aws/batch/model/LaunchTemplateSpecification.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace Batch {
26namespace Model {
27
38 public:
39 AWS_BATCH_API ComputeResourceUpdate() = default;
42 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
43
45
51 inline int GetMinvCpus() const { return m_minvCpus; }
52 inline bool MinvCpusHasBeenSet() const { return m_minvCpusHasBeenSet; }
53 inline void SetMinvCpus(int value) {
54 m_minvCpusHasBeenSet = true;
55 m_minvCpus = value;
56 }
58 SetMinvCpus(value);
59 return *this;
60 }
62
64
74 inline int GetMaxvCpus() const { return m_maxvCpus; }
75 inline bool MaxvCpusHasBeenSet() const { return m_maxvCpusHasBeenSet; }
76 inline void SetMaxvCpus(int value) {
77 m_maxvCpusHasBeenSet = true;
78 m_maxvCpus = value;
79 }
81 SetMaxvCpus(value);
82 return *this;
83 }
85
87
102 inline int GetDesiredvCpus() const { return m_desiredvCpus; }
103 inline bool DesiredvCpusHasBeenSet() const { return m_desiredvCpusHasBeenSet; }
104 inline void SetDesiredvCpus(int value) {
105 m_desiredvCpusHasBeenSet = true;
106 m_desiredvCpus = value;
107 }
109 SetDesiredvCpus(value);
110 return *this;
111 }
113
115
139 inline const Aws::Vector<Aws::String>& GetSubnets() const { return m_subnets; }
140 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
141 template <typename SubnetsT = Aws::Vector<Aws::String>>
142 void SetSubnets(SubnetsT&& value) {
143 m_subnetsHasBeenSet = true;
144 m_subnets = std::forward<SubnetsT>(value);
145 }
146 template <typename SubnetsT = Aws::Vector<Aws::String>>
148 SetSubnets(std::forward<SubnetsT>(value));
149 return *this;
150 }
151 template <typename SubnetsT = Aws::String>
153 m_subnetsHasBeenSet = true;
154 m_subnets.emplace_back(std::forward<SubnetsT>(value));
155 return *this;
156 }
158
160
173 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
174 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
175 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
176 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
177 m_securityGroupIdsHasBeenSet = true;
178 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
179 }
180 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
181 ComputeResourceUpdate& WithSecurityGroupIds(SecurityGroupIdsT&& value) {
182 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
183 return *this;
184 }
185 template <typename SecurityGroupIdsT = Aws::String>
186 ComputeResourceUpdate& AddSecurityGroupIds(SecurityGroupIdsT&& value) {
187 m_securityGroupIdsHasBeenSet = true;
188 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
189 return *this;
190 }
192
194
229 inline CRUpdateAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
230 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
232 m_allocationStrategyHasBeenSet = true;
233 m_allocationStrategy = value;
234 }
237 return *this;
238 }
240
242
288 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
289 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
290 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
291 void SetInstanceTypes(InstanceTypesT&& value) {
292 m_instanceTypesHasBeenSet = true;
293 m_instanceTypes = std::forward<InstanceTypesT>(value);
294 }
295 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
296 ComputeResourceUpdate& WithInstanceTypes(InstanceTypesT&& value) {
297 SetInstanceTypes(std::forward<InstanceTypesT>(value));
298 return *this;
299 }
300 template <typename InstanceTypesT = Aws::String>
301 ComputeResourceUpdate& AddInstanceTypes(InstanceTypesT&& value) {
302 m_instanceTypesHasBeenSet = true;
303 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
304 return *this;
305 }
307
309
320 inline const Aws::String& GetEc2KeyPair() const { return m_ec2KeyPair; }
321 inline bool Ec2KeyPairHasBeenSet() const { return m_ec2KeyPairHasBeenSet; }
322 template <typename Ec2KeyPairT = Aws::String>
323 void SetEc2KeyPair(Ec2KeyPairT&& value) {
324 m_ec2KeyPairHasBeenSet = true;
325 m_ec2KeyPair = std::forward<Ec2KeyPairT>(value);
326 }
327 template <typename Ec2KeyPairT = Aws::String>
328 ComputeResourceUpdate& WithEc2KeyPair(Ec2KeyPairT&& value) {
329 SetEc2KeyPair(std::forward<Ec2KeyPairT>(value));
330 return *this;
331 }
333
335
351 inline const Aws::String& GetInstanceRole() const { return m_instanceRole; }
352 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
353 template <typename InstanceRoleT = Aws::String>
354 void SetInstanceRole(InstanceRoleT&& value) {
355 m_instanceRoleHasBeenSet = true;
356 m_instanceRole = std::forward<InstanceRoleT>(value);
357 }
358 template <typename InstanceRoleT = Aws::String>
359 ComputeResourceUpdate& WithInstanceRole(InstanceRoleT&& value) {
360 SetInstanceRole(std::forward<InstanceRoleT>(value));
361 return *this;
362 }
364
366
381 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
382 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
383 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
384 void SetTags(TagsT&& value) {
385 m_tagsHasBeenSet = true;
386 m_tags = std::forward<TagsT>(value);
387 }
388 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
390 SetTags(std::forward<TagsT>(value));
391 return *this;
392 }
393 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
394 ComputeResourceUpdate& AddTags(TagsKeyT&& key, TagsValueT&& value) {
395 m_tagsHasBeenSet = true;
396 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
397 return *this;
398 }
400
402
418 inline const Aws::String& GetPlacementGroup() const { return m_placementGroup; }
419 inline bool PlacementGroupHasBeenSet() const { return m_placementGroupHasBeenSet; }
420 template <typename PlacementGroupT = Aws::String>
421 void SetPlacementGroup(PlacementGroupT&& value) {
422 m_placementGroupHasBeenSet = true;
423 m_placementGroup = std::forward<PlacementGroupT>(value);
424 }
425 template <typename PlacementGroupT = Aws::String>
426 ComputeResourceUpdate& WithPlacementGroup(PlacementGroupT&& value) {
427 SetPlacementGroup(std::forward<PlacementGroupT>(value));
428 return *this;
429 }
431
433
447 inline int GetBidPercentage() const { return m_bidPercentage; }
448 inline bool BidPercentageHasBeenSet() const { return m_bidPercentageHasBeenSet; }
449 inline void SetBidPercentage(int value) {
450 m_bidPercentageHasBeenSet = true;
451 m_bidPercentage = value;
452 }
454 SetBidPercentage(value);
455 return *this;
456 }
458
460
479 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
480 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
481 template <typename LaunchTemplateT = LaunchTemplateSpecification>
482 void SetLaunchTemplate(LaunchTemplateT&& value) {
483 m_launchTemplateHasBeenSet = true;
484 m_launchTemplate = std::forward<LaunchTemplateT>(value);
485 }
486 template <typename LaunchTemplateT = LaunchTemplateSpecification>
487 ComputeResourceUpdate& WithLaunchTemplate(LaunchTemplateT&& value) {
488 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
489 return *this;
490 }
492
494
507 inline const Aws::Vector<Ec2Configuration>& GetEc2Configuration() const { return m_ec2Configuration; }
508 inline bool Ec2ConfigurationHasBeenSet() const { return m_ec2ConfigurationHasBeenSet; }
509 template <typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
510 void SetEc2Configuration(Ec2ConfigurationT&& value) {
511 m_ec2ConfigurationHasBeenSet = true;
512 m_ec2Configuration = std::forward<Ec2ConfigurationT>(value);
513 }
514 template <typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
515 ComputeResourceUpdate& WithEc2Configuration(Ec2ConfigurationT&& value) {
516 SetEc2Configuration(std::forward<Ec2ConfigurationT>(value));
517 return *this;
518 }
519 template <typename Ec2ConfigurationT = Ec2Configuration>
520 ComputeResourceUpdate& AddEc2Configuration(Ec2ConfigurationT&& value) {
521 m_ec2ConfigurationHasBeenSet = true;
522 m_ec2Configuration.emplace_back(std::forward<Ec2ConfigurationT>(value));
523 return *this;
524 }
526
528
544 inline bool GetUpdateToLatestImageVersion() const { return m_updateToLatestImageVersion; }
545 inline bool UpdateToLatestImageVersionHasBeenSet() const { return m_updateToLatestImageVersionHasBeenSet; }
546 inline void SetUpdateToLatestImageVersion(bool value) {
547 m_updateToLatestImageVersionHasBeenSet = true;
548 m_updateToLatestImageVersion = value;
549 }
552 return *this;
553 }
555
557
571 inline CRType GetType() const { return m_type; }
572 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
573 inline void SetType(CRType value) {
574 m_typeHasBeenSet = true;
575 m_type = value;
576 }
578 SetType(value);
579 return *this;
580 }
582
584
604 inline const Aws::String& GetImageId() const { return m_imageId; }
605 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
606 template <typename ImageIdT = Aws::String>
607 void SetImageId(ImageIdT&& value) {
608 m_imageIdHasBeenSet = true;
609 m_imageId = std::forward<ImageIdT>(value);
610 }
611 template <typename ImageIdT = Aws::String>
613 SetImageId(std::forward<ImageIdT>(value));
614 return *this;
615 }
617 private:
618 int m_minvCpus{0};
619
620 int m_maxvCpus{0};
621
622 int m_desiredvCpus{0};
623
624 Aws::Vector<Aws::String> m_subnets;
625
626 Aws::Vector<Aws::String> m_securityGroupIds;
627
629
630 Aws::Vector<Aws::String> m_instanceTypes;
631
632 Aws::String m_ec2KeyPair;
633
634 Aws::String m_instanceRole;
635
637
638 Aws::String m_placementGroup;
639
640 int m_bidPercentage{0};
641
642 LaunchTemplateSpecification m_launchTemplate;
643
644 Aws::Vector<Ec2Configuration> m_ec2Configuration;
645
646 bool m_updateToLatestImageVersion{false};
647
648 CRType m_type{CRType::NOT_SET};
649
650 Aws::String m_imageId;
651 bool m_minvCpusHasBeenSet = false;
652 bool m_maxvCpusHasBeenSet = false;
653 bool m_desiredvCpusHasBeenSet = false;
654 bool m_subnetsHasBeenSet = false;
655 bool m_securityGroupIdsHasBeenSet = false;
656 bool m_allocationStrategyHasBeenSet = false;
657 bool m_instanceTypesHasBeenSet = false;
658 bool m_ec2KeyPairHasBeenSet = false;
659 bool m_instanceRoleHasBeenSet = false;
660 bool m_tagsHasBeenSet = false;
661 bool m_placementGroupHasBeenSet = false;
662 bool m_bidPercentageHasBeenSet = false;
663 bool m_launchTemplateHasBeenSet = false;
664 bool m_ec2ConfigurationHasBeenSet = false;
665 bool m_updateToLatestImageVersionHasBeenSet = false;
666 bool m_typeHasBeenSet = false;
667 bool m_imageIdHasBeenSet = false;
668};
669
670} // namespace Model
671} // namespace Batch
672} // 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