AWS SDK for C++

AWS SDK for C++ Version 1.11.637

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
250 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
251 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
252 template<typename InstanceTypesT = Aws::Vector<Aws::String>>
253 void SetInstanceTypes(InstanceTypesT&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = std::forward<InstanceTypesT>(value); }
254 template<typename InstanceTypesT = Aws::Vector<Aws::String>>
255 ComputeResourceUpdate& WithInstanceTypes(InstanceTypesT&& value) { SetInstanceTypes(std::forward<InstanceTypesT>(value)); return *this;}
256 template<typename InstanceTypesT = Aws::String>
257 ComputeResourceUpdate& AddInstanceTypes(InstanceTypesT&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value)); return *this; }
259
261
272 inline const Aws::String& GetEc2KeyPair() const { return m_ec2KeyPair; }
273 inline bool Ec2KeyPairHasBeenSet() const { return m_ec2KeyPairHasBeenSet; }
274 template<typename Ec2KeyPairT = Aws::String>
275 void SetEc2KeyPair(Ec2KeyPairT&& value) { m_ec2KeyPairHasBeenSet = true; m_ec2KeyPair = std::forward<Ec2KeyPairT>(value); }
276 template<typename Ec2KeyPairT = Aws::String>
277 ComputeResourceUpdate& WithEc2KeyPair(Ec2KeyPairT&& value) { SetEc2KeyPair(std::forward<Ec2KeyPairT>(value)); return *this;}
279
281
297 inline const Aws::String& GetInstanceRole() const { return m_instanceRole; }
298 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
299 template<typename InstanceRoleT = Aws::String>
300 void SetInstanceRole(InstanceRoleT&& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = std::forward<InstanceRoleT>(value); }
301 template<typename InstanceRoleT = Aws::String>
302 ComputeResourceUpdate& WithInstanceRole(InstanceRoleT&& value) { SetInstanceRole(std::forward<InstanceRoleT>(value)); return *this;}
304
306
321 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
322 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
323 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
324 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
325 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
326 ComputeResourceUpdate& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
327 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
328 ComputeResourceUpdate& AddTags(TagsKeyT&& key, TagsValueT&& value) {
329 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
330 }
332
334
350 inline const Aws::String& GetPlacementGroup() const { return m_placementGroup; }
351 inline bool PlacementGroupHasBeenSet() const { return m_placementGroupHasBeenSet; }
352 template<typename PlacementGroupT = Aws::String>
353 void SetPlacementGroup(PlacementGroupT&& value) { m_placementGroupHasBeenSet = true; m_placementGroup = std::forward<PlacementGroupT>(value); }
354 template<typename PlacementGroupT = Aws::String>
355 ComputeResourceUpdate& WithPlacementGroup(PlacementGroupT&& value) { SetPlacementGroup(std::forward<PlacementGroupT>(value)); return *this;}
357
359
373 inline int GetBidPercentage() const { return m_bidPercentage; }
374 inline bool BidPercentageHasBeenSet() const { return m_bidPercentageHasBeenSet; }
375 inline void SetBidPercentage(int value) { m_bidPercentageHasBeenSet = true; m_bidPercentage = value; }
376 inline ComputeResourceUpdate& WithBidPercentage(int value) { SetBidPercentage(value); return *this;}
378
380
399 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
400 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
401 template<typename LaunchTemplateT = LaunchTemplateSpecification>
402 void SetLaunchTemplate(LaunchTemplateT&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::forward<LaunchTemplateT>(value); }
403 template<typename LaunchTemplateT = LaunchTemplateSpecification>
404 ComputeResourceUpdate& WithLaunchTemplate(LaunchTemplateT&& value) { SetLaunchTemplate(std::forward<LaunchTemplateT>(value)); return *this;}
406
408
421 inline const Aws::Vector<Ec2Configuration>& GetEc2Configuration() const { return m_ec2Configuration; }
422 inline bool Ec2ConfigurationHasBeenSet() const { return m_ec2ConfigurationHasBeenSet; }
423 template<typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
424 void SetEc2Configuration(Ec2ConfigurationT&& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration = std::forward<Ec2ConfigurationT>(value); }
425 template<typename Ec2ConfigurationT = Aws::Vector<Ec2Configuration>>
426 ComputeResourceUpdate& WithEc2Configuration(Ec2ConfigurationT&& value) { SetEc2Configuration(std::forward<Ec2ConfigurationT>(value)); return *this;}
427 template<typename Ec2ConfigurationT = Ec2Configuration>
428 ComputeResourceUpdate& AddEc2Configuration(Ec2ConfigurationT&& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration.emplace_back(std::forward<Ec2ConfigurationT>(value)); return *this; }
430
432
448 inline bool GetUpdateToLatestImageVersion() const { return m_updateToLatestImageVersion; }
449 inline bool UpdateToLatestImageVersionHasBeenSet() const { return m_updateToLatestImageVersionHasBeenSet; }
450 inline void SetUpdateToLatestImageVersion(bool value) { m_updateToLatestImageVersionHasBeenSet = true; m_updateToLatestImageVersion = value; }
453
455
469 inline CRType GetType() const { return m_type; }
470 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
471 inline void SetType(CRType value) { m_typeHasBeenSet = true; m_type = value; }
472 inline ComputeResourceUpdate& WithType(CRType value) { SetType(value); return *this;}
474
476
496 inline const Aws::String& GetImageId() const { return m_imageId; }
497 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
498 template<typename ImageIdT = Aws::String>
499 void SetImageId(ImageIdT&& value) { m_imageIdHasBeenSet = true; m_imageId = std::forward<ImageIdT>(value); }
500 template<typename ImageIdT = Aws::String>
501 ComputeResourceUpdate& WithImageId(ImageIdT&& value) { SetImageId(std::forward<ImageIdT>(value)); return *this;}
503 private:
504
505 int m_minvCpus{0};
506 bool m_minvCpusHasBeenSet = false;
507
508 int m_maxvCpus{0};
509 bool m_maxvCpusHasBeenSet = false;
510
511 int m_desiredvCpus{0};
512 bool m_desiredvCpusHasBeenSet = false;
513
514 Aws::Vector<Aws::String> m_subnets;
515 bool m_subnetsHasBeenSet = false;
516
517 Aws::Vector<Aws::String> m_securityGroupIds;
518 bool m_securityGroupIdsHasBeenSet = false;
519
521 bool m_allocationStrategyHasBeenSet = false;
522
523 Aws::Vector<Aws::String> m_instanceTypes;
524 bool m_instanceTypesHasBeenSet = false;
525
526 Aws::String m_ec2KeyPair;
527 bool m_ec2KeyPairHasBeenSet = false;
528
529 Aws::String m_instanceRole;
530 bool m_instanceRoleHasBeenSet = false;
531
533 bool m_tagsHasBeenSet = false;
534
535 Aws::String m_placementGroup;
536 bool m_placementGroupHasBeenSet = false;
537
538 int m_bidPercentage{0};
539 bool m_bidPercentageHasBeenSet = false;
540
541 LaunchTemplateSpecification m_launchTemplate;
542 bool m_launchTemplateHasBeenSet = false;
543
544 Aws::Vector<Ec2Configuration> m_ec2Configuration;
545 bool m_ec2ConfigurationHasBeenSet = false;
546
547 bool m_updateToLatestImageVersion{false};
548 bool m_updateToLatestImageVersionHasBeenSet = false;
549
550 CRType m_type{CRType::NOT_SET};
551 bool m_typeHasBeenSet = false;
552
553 Aws::String m_imageId;
554 bool m_imageIdHasBeenSet = false;
555 };
556
557} // namespace Model
558} // namespace Batch
559} // 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