AWS SDK for C++

AWS SDK for C++ Version 1.11.875

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/ComputeScalingPolicy.h>
11#include <aws/batch/model/Ec2Configuration.h>
12#include <aws/batch/model/LaunchTemplateSpecification.h>
13#include <aws/batch/model/UpdateManagedInstancesProviderConfiguration.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16#include <aws/core/utils/memory/stl/AWSVector.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Json {
23class JsonValue;
24class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace Batch {
28namespace Model {
29
40 public:
41 AWS_BATCH_API ComputeResourceUpdate() = default;
44 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
45
47
53 inline int GetMinvCpus() const { return m_minvCpus; }
54 inline bool MinvCpusHasBeenSet() const { return m_minvCpusHasBeenSet; }
55 inline void SetMinvCpus(int value) {
56 m_minvCpusHasBeenSet = true;
57 m_minvCpus = value;
58 }
60 SetMinvCpus(value);
61 return *this;
62 }
64
66
73 inline int GetMaxvCpus() const { return m_maxvCpus; }
74 inline bool MaxvCpusHasBeenSet() const { return m_maxvCpusHasBeenSet; }
75 inline void SetMaxvCpus(int value) {
76 m_maxvCpusHasBeenSet = true;
77 m_maxvCpus = value;
78 }
80 SetMaxvCpus(value);
81 return *this;
82 }
84
86
101 inline int GetDesiredvCpus() const { return m_desiredvCpus; }
102 inline bool DesiredvCpusHasBeenSet() const { return m_desiredvCpusHasBeenSet; }
103 inline void SetDesiredvCpus(int value) {
104 m_desiredvCpusHasBeenSet = true;
105 m_desiredvCpus = value;
106 }
108 SetDesiredvCpus(value);
109 return *this;
110 }
112
114
138 inline const Aws::Vector<Aws::String>& GetSubnets() const { return m_subnets; }
139 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
140 template <typename SubnetsT = Aws::Vector<Aws::String>>
141 void SetSubnets(SubnetsT&& value) {
142 m_subnetsHasBeenSet = true;
143 m_subnets = std::forward<SubnetsT>(value);
144 }
145 template <typename SubnetsT = Aws::Vector<Aws::String>>
147 SetSubnets(std::forward<SubnetsT>(value));
148 return *this;
149 }
150 template <typename SubnetsT = Aws::String>
152 m_subnetsHasBeenSet = true;
153 m_subnets.emplace_back(std::forward<SubnetsT>(value));
154 return *this;
155 }
157
159
172 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
173 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
174 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
175 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
176 m_securityGroupIdsHasBeenSet = true;
177 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
178 }
179 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
180 ComputeResourceUpdate& WithSecurityGroupIds(SecurityGroupIdsT&& value) {
181 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
182 return *this;
183 }
184 template <typename SecurityGroupIdsT = Aws::String>
185 ComputeResourceUpdate& AddSecurityGroupIds(SecurityGroupIdsT&& value) {
186 m_securityGroupIdsHasBeenSet = true;
187 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
188 return *this;
189 }
191
193
260 inline CRUpdateAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
261 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
263 m_allocationStrategyHasBeenSet = true;
264 m_allocationStrategy = value;
265 }
268 return *this;
269 }
271
273
319 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
320 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
321 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
322 void SetInstanceTypes(InstanceTypesT&& value) {
323 m_instanceTypesHasBeenSet = true;
324 m_instanceTypes = std::forward<InstanceTypesT>(value);
325 }
326 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
327 ComputeResourceUpdate& WithInstanceTypes(InstanceTypesT&& value) {
328 SetInstanceTypes(std::forward<InstanceTypesT>(value));
329 return *this;
330 }
331 template <typename InstanceTypesT = Aws::String>
332 ComputeResourceUpdate& AddInstanceTypes(InstanceTypesT&& value) {
333 m_instanceTypesHasBeenSet = true;
334 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
335 return *this;
336 }
338
340
351 inline const Aws::String& GetEc2KeyPair() const { return m_ec2KeyPair; }
352 inline bool Ec2KeyPairHasBeenSet() const { return m_ec2KeyPairHasBeenSet; }
353 template <typename Ec2KeyPairT = Aws::String>
354 void SetEc2KeyPair(Ec2KeyPairT&& value) {
355 m_ec2KeyPairHasBeenSet = true;
356 m_ec2KeyPair = std::forward<Ec2KeyPairT>(value);
357 }
358 template <typename Ec2KeyPairT = Aws::String>
359 ComputeResourceUpdate& WithEc2KeyPair(Ec2KeyPairT&& value) {
360 SetEc2KeyPair(std::forward<Ec2KeyPairT>(value));
361 return *this;
362 }
364
366
382 inline const Aws::String& GetInstanceRole() const { return m_instanceRole; }
383 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
384 template <typename InstanceRoleT = Aws::String>
385 void SetInstanceRole(InstanceRoleT&& value) {
386 m_instanceRoleHasBeenSet = true;
387 m_instanceRole = std::forward<InstanceRoleT>(value);
388 }
389 template <typename InstanceRoleT = Aws::String>
390 ComputeResourceUpdate& WithInstanceRole(InstanceRoleT&& value) {
391 SetInstanceRole(std::forward<InstanceRoleT>(value));
392 return *this;
393 }
395
397
412 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
413 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
414 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
415 void SetTags(TagsT&& value) {
416 m_tagsHasBeenSet = true;
417 m_tags = std::forward<TagsT>(value);
418 }
419 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
421 SetTags(std::forward<TagsT>(value));
422 return *this;
423 }
424 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
425 ComputeResourceUpdate& AddTags(TagsKeyT&& key, TagsValueT&& value) {
426 m_tagsHasBeenSet = true;
427 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
428 return *this;
429 }
431
433
449 inline const Aws::String& GetPlacementGroup() const { return m_placementGroup; }
450 inline bool PlacementGroupHasBeenSet() const { return m_placementGroupHasBeenSet; }
451 template <typename PlacementGroupT = Aws::String>
452 void SetPlacementGroup(PlacementGroupT&& value) {
453 m_placementGroupHasBeenSet = true;
454 m_placementGroup = std::forward<PlacementGroupT>(value);
455 }
456 template <typename PlacementGroupT = Aws::String>
457 ComputeResourceUpdate& WithPlacementGroup(PlacementGroupT&& value) {
458 SetPlacementGroup(std::forward<PlacementGroupT>(value));
459 return *this;
460 }
462
464
478 inline int GetBidPercentage() const { return m_bidPercentage; }
479 inline bool BidPercentageHasBeenSet() const { return m_bidPercentageHasBeenSet; }
480 inline void SetBidPercentage(int value) {
481 m_bidPercentageHasBeenSet = true;
482 m_bidPercentage = value;
483 }
485 SetBidPercentage(value);
486 return *this;
487 }
489
491
510 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
511 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
512 template <typename LaunchTemplateT = LaunchTemplateSpecification>
513 void SetLaunchTemplate(LaunchTemplateT&& value) {
514 m_launchTemplateHasBeenSet = true;
515 m_launchTemplate = std::forward<LaunchTemplateT>(value);
516 }
517 template <typename LaunchTemplateT = LaunchTemplateSpecification>
518 ComputeResourceUpdate& WithLaunchTemplate(LaunchTemplateT&& value) {
519 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
520 return *this;
521 }
523
525
539 inline const Aws::Vector<Ec2Configuration>& GetEc2Configuration() const { return m_ec2Configuration; }
540 inline bool Ec2ConfigurationHasBeenSet() const { return m_ec2ConfigurationHasBeenSet; }
541 template <typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
542 void SetEc2Configuration(Ec2ConfigurationT&& value) {
543 m_ec2ConfigurationHasBeenSet = true;
544 m_ec2Configuration = std::forward<Ec2ConfigurationT>(value);
545 }
546 template <typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
547 ComputeResourceUpdate& WithEc2Configuration(Ec2ConfigurationT&& value) {
548 SetEc2Configuration(std::forward<Ec2ConfigurationT>(value));
549 return *this;
550 }
551 template <typename Ec2ConfigurationT = Ec2Configuration>
552 ComputeResourceUpdate& AddEc2Configuration(Ec2ConfigurationT&& value) {
553 m_ec2ConfigurationHasBeenSet = true;
554 m_ec2Configuration.emplace_back(std::forward<Ec2ConfigurationT>(value));
555 return *this;
556 }
558
560
576 inline bool GetUpdateToLatestImageVersion() const { return m_updateToLatestImageVersion; }
577 inline bool UpdateToLatestImageVersionHasBeenSet() const { return m_updateToLatestImageVersionHasBeenSet; }
578 inline void SetUpdateToLatestImageVersion(bool value) {
579 m_updateToLatestImageVersionHasBeenSet = true;
580 m_updateToLatestImageVersion = value;
581 }
584 return *this;
585 }
587
589
605 inline CRType GetType() const { return m_type; }
606 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
607 inline void SetType(CRType value) {
608 m_typeHasBeenSet = true;
609 m_type = value;
610 }
612 SetType(value);
613 return *this;
614 }
616
618
638 inline const Aws::String& GetImageId() const { return m_imageId; }
639 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
640 template <typename ImageIdT = Aws::String>
641 void SetImageId(ImageIdT&& value) {
642 m_imageIdHasBeenSet = true;
643 m_imageId = std::forward<ImageIdT>(value);
644 }
645 template <typename ImageIdT = Aws::String>
647 SetImageId(std::forward<ImageIdT>(value));
648 return *this;
649 }
651
653
658 inline const ComputeScalingPolicy& GetScalingPolicy() const { return m_scalingPolicy; }
659 inline bool ScalingPolicyHasBeenSet() const { return m_scalingPolicyHasBeenSet; }
660 template <typename ScalingPolicyT = ComputeScalingPolicy>
661 void SetScalingPolicy(ScalingPolicyT&& value) {
662 m_scalingPolicyHasBeenSet = true;
663 m_scalingPolicy = std::forward<ScalingPolicyT>(value);
664 }
665 template <typename ScalingPolicyT = ComputeScalingPolicy>
666 ComputeResourceUpdate& WithScalingPolicy(ScalingPolicyT&& value) {
667 SetScalingPolicy(std::forward<ScalingPolicyT>(value));
668 return *this;
669 }
671
673
679 inline const UpdateManagedInstancesProviderConfiguration& GetManagedInstancesProvider() const { return m_managedInstancesProvider; }
680 inline bool ManagedInstancesProviderHasBeenSet() const { return m_managedInstancesProviderHasBeenSet; }
681 template <typename ManagedInstancesProviderT = UpdateManagedInstancesProviderConfiguration>
682 void SetManagedInstancesProvider(ManagedInstancesProviderT&& value) {
683 m_managedInstancesProviderHasBeenSet = true;
684 m_managedInstancesProvider = std::forward<ManagedInstancesProviderT>(value);
685 }
686 template <typename ManagedInstancesProviderT = UpdateManagedInstancesProviderConfiguration>
687 ComputeResourceUpdate& WithManagedInstancesProvider(ManagedInstancesProviderT&& value) {
688 SetManagedInstancesProvider(std::forward<ManagedInstancesProviderT>(value));
689 return *this;
690 }
692
694
700 inline const Aws::Map<Aws::String, Aws::String>& GetCapacityTags() const { return m_capacityTags; }
701 inline bool CapacityTagsHasBeenSet() const { return m_capacityTagsHasBeenSet; }
702 template <typename CapacityTagsT = Aws::Map<Aws::String, Aws::String>>
703 void SetCapacityTags(CapacityTagsT&& value) {
704 m_capacityTagsHasBeenSet = true;
705 m_capacityTags = std::forward<CapacityTagsT>(value);
706 }
707 template <typename CapacityTagsT = Aws::Map<Aws::String, Aws::String>>
708 ComputeResourceUpdate& WithCapacityTags(CapacityTagsT&& value) {
709 SetCapacityTags(std::forward<CapacityTagsT>(value));
710 return *this;
711 }
712 template <typename CapacityTagsKeyT = Aws::String, typename CapacityTagsValueT = Aws::String>
713 ComputeResourceUpdate& AddCapacityTags(CapacityTagsKeyT&& key, CapacityTagsValueT&& value) {
714 m_capacityTagsHasBeenSet = true;
715 m_capacityTags.emplace(std::forward<CapacityTagsKeyT>(key), std::forward<CapacityTagsValueT>(value));
716 return *this;
717 }
719 private:
720 int m_minvCpus{0};
721
722 int m_maxvCpus{0};
723
724 int m_desiredvCpus{0};
725
726 Aws::Vector<Aws::String> m_subnets;
727
728 Aws::Vector<Aws::String> m_securityGroupIds;
729
731
732 Aws::Vector<Aws::String> m_instanceTypes;
733
734 Aws::String m_ec2KeyPair;
735
736 Aws::String m_instanceRole;
737
739
740 Aws::String m_placementGroup;
741
742 int m_bidPercentage{0};
743
744 LaunchTemplateSpecification m_launchTemplate;
745
746 Aws::Vector<Ec2Configuration> m_ec2Configuration;
747
748 bool m_updateToLatestImageVersion{false};
749
750 CRType m_type{CRType::NOT_SET};
751
752 Aws::String m_imageId;
753
754 ComputeScalingPolicy m_scalingPolicy;
755
756 UpdateManagedInstancesProviderConfiguration m_managedInstancesProvider;
757
759 bool m_minvCpusHasBeenSet = false;
760 bool m_maxvCpusHasBeenSet = false;
761 bool m_desiredvCpusHasBeenSet = false;
762 bool m_subnetsHasBeenSet = false;
763 bool m_securityGroupIdsHasBeenSet = false;
764 bool m_allocationStrategyHasBeenSet = false;
765 bool m_instanceTypesHasBeenSet = false;
766 bool m_ec2KeyPairHasBeenSet = false;
767 bool m_instanceRoleHasBeenSet = false;
768 bool m_tagsHasBeenSet = false;
769 bool m_placementGroupHasBeenSet = false;
770 bool m_bidPercentageHasBeenSet = false;
771 bool m_launchTemplateHasBeenSet = false;
772 bool m_ec2ConfigurationHasBeenSet = false;
773 bool m_updateToLatestImageVersionHasBeenSet = false;
774 bool m_typeHasBeenSet = false;
775 bool m_imageIdHasBeenSet = false;
776 bool m_scalingPolicyHasBeenSet = false;
777 bool m_managedInstancesProviderHasBeenSet = false;
778 bool m_capacityTagsHasBeenSet = false;
779};
780
781} // namespace Model
782} // namespace Batch
783} // namespace Aws
void SetManagedInstancesProvider(ManagedInstancesProviderT &&value)
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
ComputeResourceUpdate & WithManagedInstancesProvider(ManagedInstancesProviderT &&value)
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)
const ComputeScalingPolicy & GetScalingPolicy() const
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
ComputeResourceUpdate & WithScalingPolicy(ScalingPolicyT &&value)
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
ComputeResourceUpdate & AddCapacityTags(CapacityTagsKeyT &&key, CapacityTagsValueT &&value)
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 & WithCapacityTags(CapacityTagsT &&value)
ComputeResourceUpdate & WithAllocationStrategy(CRUpdateAllocationStrategy value)
ComputeResourceUpdate & WithBidPercentage(int value)
ComputeResourceUpdate & AddTags(TagsKeyT &&key, TagsValueT &&value)
ComputeResourceUpdate & WithMinvCpus(int value)
const Aws::Map< Aws::String, Aws::String > & GetCapacityTags() const
ComputeResourceUpdate & WithMaxvCpus(int value)
const UpdateManagedInstancesProviderConfiguration & GetManagedInstancesProvider() const
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