AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetSubnets(const Aws::Vector<Aws::String>& value) { m_subnetsHasBeenSet = true; m_subnets = value; }
130 inline void SetSubnets(Aws::Vector<Aws::String>&& value) { m_subnetsHasBeenSet = true; m_subnets = std::move(value); }
131 inline ComputeResourceUpdate& WithSubnets(const Aws::Vector<Aws::String>& value) { SetSubnets(value); return *this;}
132 inline ComputeResourceUpdate& WithSubnets(Aws::Vector<Aws::String>&& value) { SetSubnets(std::move(value)); return *this;}
133 inline ComputeResourceUpdate& AddSubnets(const Aws::String& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; }
134 inline ComputeResourceUpdate& AddSubnets(Aws::String&& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(std::move(value)); return *this; }
135 inline ComputeResourceUpdate& AddSubnets(const char* value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; }
137
139
152 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const{ return m_securityGroupIds; }
153 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
154 inline void SetSecurityGroupIds(const Aws::Vector<Aws::String>& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = value; }
155 inline void SetSecurityGroupIds(Aws::Vector<Aws::String>&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = std::move(value); }
158 inline ComputeResourceUpdate& AddSecurityGroupIds(const Aws::String& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; }
159 inline ComputeResourceUpdate& AddSecurityGroupIds(Aws::String&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(std::move(value)); return *this; }
160 inline ComputeResourceUpdate& AddSecurityGroupIds(const char* value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; }
162
164
199 inline const CRUpdateAllocationStrategy& GetAllocationStrategy() const{ return m_allocationStrategy; }
200 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
201 inline void SetAllocationStrategy(const CRUpdateAllocationStrategy& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; }
202 inline void SetAllocationStrategy(CRUpdateAllocationStrategy&& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = std::move(value); }
206
208
228 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const{ return m_instanceTypes; }
229 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
230 inline void SetInstanceTypes(const Aws::Vector<Aws::String>& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = value; }
231 inline void SetInstanceTypes(Aws::Vector<Aws::String>&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = std::move(value); }
233 inline ComputeResourceUpdate& WithInstanceTypes(Aws::Vector<Aws::String>&& value) { SetInstanceTypes(std::move(value)); return *this;}
234 inline ComputeResourceUpdate& AddInstanceTypes(const Aws::String& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(value); return *this; }
235 inline ComputeResourceUpdate& AddInstanceTypes(Aws::String&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(std::move(value)); return *this; }
236 inline ComputeResourceUpdate& AddInstanceTypes(const char* value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(value); return *this; }
238
240
251 inline const Aws::String& GetEc2KeyPair() const{ return m_ec2KeyPair; }
252 inline bool Ec2KeyPairHasBeenSet() const { return m_ec2KeyPairHasBeenSet; }
253 inline void SetEc2KeyPair(const Aws::String& value) { m_ec2KeyPairHasBeenSet = true; m_ec2KeyPair = value; }
254 inline void SetEc2KeyPair(Aws::String&& value) { m_ec2KeyPairHasBeenSet = true; m_ec2KeyPair = std::move(value); }
255 inline void SetEc2KeyPair(const char* value) { m_ec2KeyPairHasBeenSet = true; m_ec2KeyPair.assign(value); }
256 inline ComputeResourceUpdate& WithEc2KeyPair(const Aws::String& value) { SetEc2KeyPair(value); return *this;}
257 inline ComputeResourceUpdate& WithEc2KeyPair(Aws::String&& value) { SetEc2KeyPair(std::move(value)); return *this;}
258 inline ComputeResourceUpdate& WithEc2KeyPair(const char* value) { SetEc2KeyPair(value); return *this;}
260
262
278 inline const Aws::String& GetInstanceRole() const{ return m_instanceRole; }
279 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
280 inline void SetInstanceRole(const Aws::String& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = value; }
281 inline void SetInstanceRole(Aws::String&& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = std::move(value); }
282 inline void SetInstanceRole(const char* value) { m_instanceRoleHasBeenSet = true; m_instanceRole.assign(value); }
283 inline ComputeResourceUpdate& WithInstanceRole(const Aws::String& value) { SetInstanceRole(value); return *this;}
284 inline ComputeResourceUpdate& WithInstanceRole(Aws::String&& value) { SetInstanceRole(std::move(value)); return *this;}
285 inline ComputeResourceUpdate& WithInstanceRole(const char* value) { SetInstanceRole(value); return *this;}
287
289
304 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
305 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
306 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
307 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
308 inline ComputeResourceUpdate& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
309 inline ComputeResourceUpdate& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
310 inline ComputeResourceUpdate& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
311 inline ComputeResourceUpdate& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
312 inline ComputeResourceUpdate& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
313 inline ComputeResourceUpdate& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
314 inline ComputeResourceUpdate& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
315 inline ComputeResourceUpdate& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
316 inline ComputeResourceUpdate& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
318
320
336 inline const Aws::String& GetPlacementGroup() const{ return m_placementGroup; }
337 inline bool PlacementGroupHasBeenSet() const { return m_placementGroupHasBeenSet; }
338 inline void SetPlacementGroup(const Aws::String& value) { m_placementGroupHasBeenSet = true; m_placementGroup = value; }
339 inline void SetPlacementGroup(Aws::String&& value) { m_placementGroupHasBeenSet = true; m_placementGroup = std::move(value); }
340 inline void SetPlacementGroup(const char* value) { m_placementGroupHasBeenSet = true; m_placementGroup.assign(value); }
341 inline ComputeResourceUpdate& WithPlacementGroup(const Aws::String& value) { SetPlacementGroup(value); return *this;}
342 inline ComputeResourceUpdate& WithPlacementGroup(Aws::String&& value) { SetPlacementGroup(std::move(value)); return *this;}
343 inline ComputeResourceUpdate& WithPlacementGroup(const char* value) { SetPlacementGroup(value); return *this;}
345
347
361 inline int GetBidPercentage() const{ return m_bidPercentage; }
362 inline bool BidPercentageHasBeenSet() const { return m_bidPercentageHasBeenSet; }
363 inline void SetBidPercentage(int value) { m_bidPercentageHasBeenSet = true; m_bidPercentage = value; }
364 inline ComputeResourceUpdate& WithBidPercentage(int value) { SetBidPercentage(value); return *this;}
366
368
387 inline const LaunchTemplateSpecification& GetLaunchTemplate() const{ return m_launchTemplate; }
388 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
389 inline void SetLaunchTemplate(const LaunchTemplateSpecification& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = value; }
390 inline void SetLaunchTemplate(LaunchTemplateSpecification&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::move(value); }
394
396
409 inline const Aws::Vector<Ec2Configuration>& GetEc2Configuration() const{ return m_ec2Configuration; }
410 inline bool Ec2ConfigurationHasBeenSet() const { return m_ec2ConfigurationHasBeenSet; }
411 inline void SetEc2Configuration(const Aws::Vector<Ec2Configuration>& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration = value; }
412 inline void SetEc2Configuration(Aws::Vector<Ec2Configuration>&& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration = std::move(value); }
415 inline ComputeResourceUpdate& AddEc2Configuration(const Ec2Configuration& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration.push_back(value); return *this; }
416 inline ComputeResourceUpdate& AddEc2Configuration(Ec2Configuration&& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration.push_back(std::move(value)); return *this; }
418
420
436 inline bool GetUpdateToLatestImageVersion() const{ return m_updateToLatestImageVersion; }
437 inline bool UpdateToLatestImageVersionHasBeenSet() const { return m_updateToLatestImageVersionHasBeenSet; }
438 inline void SetUpdateToLatestImageVersion(bool value) { m_updateToLatestImageVersionHasBeenSet = true; m_updateToLatestImageVersion = value; }
441
443
457 inline const CRType& GetType() const{ return m_type; }
458 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
459 inline void SetType(const CRType& value) { m_typeHasBeenSet = true; m_type = value; }
460 inline void SetType(CRType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
461 inline ComputeResourceUpdate& WithType(const CRType& value) { SetType(value); return *this;}
462 inline ComputeResourceUpdate& WithType(CRType&& value) { SetType(std::move(value)); return *this;}
464
466
486 inline const Aws::String& GetImageId() const{ return m_imageId; }
487 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
488 inline void SetImageId(const Aws::String& value) { m_imageIdHasBeenSet = true; m_imageId = value; }
489 inline void SetImageId(Aws::String&& value) { m_imageIdHasBeenSet = true; m_imageId = std::move(value); }
490 inline void SetImageId(const char* value) { m_imageIdHasBeenSet = true; m_imageId.assign(value); }
491 inline ComputeResourceUpdate& WithImageId(const Aws::String& value) { SetImageId(value); return *this;}
492 inline ComputeResourceUpdate& WithImageId(Aws::String&& value) { SetImageId(std::move(value)); return *this;}
493 inline ComputeResourceUpdate& WithImageId(const char* value) { SetImageId(value); return *this;}
495 private:
496
497 int m_minvCpus;
498 bool m_minvCpusHasBeenSet = false;
499
500 int m_maxvCpus;
501 bool m_maxvCpusHasBeenSet = false;
502
503 int m_desiredvCpus;
504 bool m_desiredvCpusHasBeenSet = false;
505
506 Aws::Vector<Aws::String> m_subnets;
507 bool m_subnetsHasBeenSet = false;
508
509 Aws::Vector<Aws::String> m_securityGroupIds;
510 bool m_securityGroupIdsHasBeenSet = false;
511
512 CRUpdateAllocationStrategy m_allocationStrategy;
513 bool m_allocationStrategyHasBeenSet = false;
514
515 Aws::Vector<Aws::String> m_instanceTypes;
516 bool m_instanceTypesHasBeenSet = false;
517
518 Aws::String m_ec2KeyPair;
519 bool m_ec2KeyPairHasBeenSet = false;
520
521 Aws::String m_instanceRole;
522 bool m_instanceRoleHasBeenSet = false;
523
525 bool m_tagsHasBeenSet = false;
526
527 Aws::String m_placementGroup;
528 bool m_placementGroupHasBeenSet = false;
529
530 int m_bidPercentage;
531 bool m_bidPercentageHasBeenSet = false;
532
533 LaunchTemplateSpecification m_launchTemplate;
534 bool m_launchTemplateHasBeenSet = false;
535
536 Aws::Vector<Ec2Configuration> m_ec2Configuration;
537 bool m_ec2ConfigurationHasBeenSet = false;
538
539 bool m_updateToLatestImageVersion;
540 bool m_updateToLatestImageVersionHasBeenSet = false;
541
542 CRType m_type;
543 bool m_typeHasBeenSet = false;
544
545 Aws::String m_imageId;
546 bool m_imageIdHasBeenSet = false;
547 };
548
549} // namespace Model
550} // namespace Batch
551} // namespace Aws
ComputeResourceUpdate & WithEc2Configuration(const Aws::Vector< Ec2Configuration > &value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
ComputeResourceUpdate & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
ComputeResourceUpdate & AddTags(Aws::String &&key, const Aws::String &value)
ComputeResourceUpdate & AddSecurityGroupIds(const Aws::String &value)
ComputeResourceUpdate & WithImageId(const char *value)
ComputeResourceUpdate & AddTags(Aws::String &&key, const char *value)
const CRUpdateAllocationStrategy & GetAllocationStrategy() const
void SetInstanceTypes(Aws::Vector< Aws::String > &&value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
void SetSubnets(const Aws::Vector< Aws::String > &value)
ComputeResourceUpdate & WithInstanceRole(Aws::String &&value)
AWS_BATCH_API ComputeResourceUpdate(Aws::Utils::Json::JsonView jsonValue)
ComputeResourceUpdate & WithAllocationStrategy(CRUpdateAllocationStrategy &&value)
ComputeResourceUpdate & WithPlacementGroup(Aws::String &&value)
ComputeResourceUpdate & WithPlacementGroup(const char *value)
ComputeResourceUpdate & AddTags(const char *key, const char *value)
ComputeResourceUpdate & WithEc2KeyPair(Aws::String &&value)
ComputeResourceUpdate & AddSecurityGroupIds(const char *value)
ComputeResourceUpdate & AddSubnets(const Aws::String &value)
ComputeResourceUpdate & WithImageId(const Aws::String &value)
ComputeResourceUpdate & WithUpdateToLatestImageVersion(bool value)
const LaunchTemplateSpecification & GetLaunchTemplate() const
ComputeResourceUpdate & WithSecurityGroupIds(Aws::Vector< Aws::String > &&value)
ComputeResourceUpdate & WithDesiredvCpus(int value)
void SetSecurityGroupIds(Aws::Vector< Aws::String > &&value)
const Aws::Vector< Aws::String > & GetInstanceTypes() const
ComputeResourceUpdate & WithEc2KeyPair(const Aws::String &value)
void SetInstanceTypes(const Aws::Vector< Aws::String > &value)
ComputeResourceUpdate & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
ComputeResourceUpdate & AddSecurityGroupIds(Aws::String &&value)
ComputeResourceUpdate & WithLaunchTemplate(const LaunchTemplateSpecification &value)
ComputeResourceUpdate & WithInstanceRole(const Aws::String &value)
ComputeResourceUpdate & WithAllocationStrategy(const CRUpdateAllocationStrategy &value)
void SetEc2Configuration(const Aws::Vector< Ec2Configuration > &value)
ComputeResourceUpdate & AddEc2Configuration(Ec2Configuration &&value)
void SetPlacementGroup(const Aws::String &value)
ComputeResourceUpdate & WithLaunchTemplate(LaunchTemplateSpecification &&value)
ComputeResourceUpdate & AddSubnets(Aws::String &&value)
const Aws::Vector< Ec2Configuration > & GetEc2Configuration() const
ComputeResourceUpdate & AddTags(Aws::String &&key, Aws::String &&value)
ComputeResourceUpdate & WithInstanceTypes(const Aws::Vector< Aws::String > &value)
ComputeResourceUpdate & WithInstanceRole(const char *value)
ComputeResourceUpdate & AddInstanceTypes(const Aws::String &value)
void SetSubnets(Aws::Vector< Aws::String > &&value)
ComputeResourceUpdate & AddTags(const char *key, Aws::String &&value)
void SetEc2KeyPair(const Aws::String &value)
const Aws::Vector< Aws::String > & GetSubnets() const
void SetInstanceRole(const Aws::String &value)
ComputeResourceUpdate & WithSubnets(Aws::Vector< Aws::String > &&value)
ComputeResourceUpdate & AddTags(const Aws::String &key, Aws::String &&value)
ComputeResourceUpdate & WithType(const CRType &value)
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
AWS_BATCH_API ComputeResourceUpdate & operator=(Aws::Utils::Json::JsonView jsonValue)
ComputeResourceUpdate & WithSubnets(const Aws::Vector< Aws::String > &value)
ComputeResourceUpdate & WithSecurityGroupIds(const Aws::Vector< Aws::String > &value)
void SetLaunchTemplate(const LaunchTemplateSpecification &value)
const Aws::Vector< Aws::String > & GetSecurityGroupIds() const
void SetSecurityGroupIds(const Aws::Vector< Aws::String > &value)
ComputeResourceUpdate & WithInstanceTypes(Aws::Vector< Aws::String > &&value)
ComputeResourceUpdate & AddEc2Configuration(const Ec2Configuration &value)
ComputeResourceUpdate & AddInstanceTypes(const char *value)
ComputeResourceUpdate & AddTags(const Aws::String &key, const Aws::String &value)
ComputeResourceUpdate & WithPlacementGroup(const Aws::String &value)
ComputeResourceUpdate & WithBidPercentage(int value)
ComputeResourceUpdate & WithImageId(Aws::String &&value)
void SetEc2Configuration(Aws::Vector< Ec2Configuration > &&value)
ComputeResourceUpdate & AddInstanceTypes(Aws::String &&value)
ComputeResourceUpdate & WithEc2KeyPair(const char *value)
void SetAllocationStrategy(CRUpdateAllocationStrategy &&value)
ComputeResourceUpdate & WithEc2Configuration(Aws::Vector< Ec2Configuration > &&value)
void SetLaunchTemplate(LaunchTemplateSpecification &&value)
ComputeResourceUpdate & WithMinvCpus(int value)
void SetAllocationStrategy(const CRUpdateAllocationStrategy &value)
ComputeResourceUpdate & AddSubnets(const char *value)
ComputeResourceUpdate & WithType(CRType &&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