AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ComputeResource.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/CRType.h>
9#include <aws/batch/model/CRAllocationStrategy.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/batch/model/LaunchTemplateSpecification.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
41 {
42 public:
43 AWS_BATCH_API ComputeResource();
46 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
47
48
50
60 inline const CRType& GetType() const{ return m_type; }
61 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
62 inline void SetType(const CRType& value) { m_typeHasBeenSet = true; m_type = value; }
63 inline void SetType(CRType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
64 inline ComputeResource& WithType(const CRType& value) { SetType(value); return *this;}
65 inline ComputeResource& WithType(CRType&& value) { SetType(std::move(value)); return *this;}
67
69
112 inline const CRAllocationStrategy& GetAllocationStrategy() const{ return m_allocationStrategy; }
113 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
114 inline void SetAllocationStrategy(const CRAllocationStrategy& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; }
115 inline void SetAllocationStrategy(CRAllocationStrategy&& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = std::move(value); }
117 inline ComputeResource& WithAllocationStrategy(CRAllocationStrategy&& value) { SetAllocationStrategy(std::move(value)); return *this;}
119
121
127 inline int GetMinvCpus() const{ return m_minvCpus; }
128 inline bool MinvCpusHasBeenSet() const { return m_minvCpusHasBeenSet; }
129 inline void SetMinvCpus(int value) { m_minvCpusHasBeenSet = true; m_minvCpus = value; }
130 inline ComputeResource& WithMinvCpus(int value) { SetMinvCpus(value); return *this;}
132
134
144 inline int GetMaxvCpus() const{ return m_maxvCpus; }
145 inline bool MaxvCpusHasBeenSet() const { return m_maxvCpusHasBeenSet; }
146 inline void SetMaxvCpus(int value) { m_maxvCpusHasBeenSet = true; m_maxvCpus = value; }
147 inline ComputeResource& WithMaxvCpus(int value) { SetMaxvCpus(value); return *this;}
149
151
157 inline int GetDesiredvCpus() const{ return m_desiredvCpus; }
158 inline bool DesiredvCpusHasBeenSet() const { return m_desiredvCpusHasBeenSet; }
159 inline void SetDesiredvCpus(int value) { m_desiredvCpusHasBeenSet = true; m_desiredvCpus = value; }
160 inline ComputeResource& WithDesiredvCpus(int value) { SetDesiredvCpus(value); return *this;}
162
164
180 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const{ return m_instanceTypes; }
181 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
182 inline void SetInstanceTypes(const Aws::Vector<Aws::String>& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = value; }
183 inline void SetInstanceTypes(Aws::Vector<Aws::String>&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = std::move(value); }
184 inline ComputeResource& WithInstanceTypes(const Aws::Vector<Aws::String>& value) { SetInstanceTypes(value); return *this;}
185 inline ComputeResource& WithInstanceTypes(Aws::Vector<Aws::String>&& value) { SetInstanceTypes(std::move(value)); return *this;}
186 inline ComputeResource& AddInstanceTypes(const Aws::String& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(value); return *this; }
187 inline ComputeResource& AddInstanceTypes(Aws::String&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(std::move(value)); return *this; }
188 inline ComputeResource& AddInstanceTypes(const char* value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(value); return *this; }
190
192
210 inline const Aws::Vector<Aws::String>& GetSubnets() const{ return m_subnets; }
211 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
212 inline void SetSubnets(const Aws::Vector<Aws::String>& value) { m_subnetsHasBeenSet = true; m_subnets = value; }
213 inline void SetSubnets(Aws::Vector<Aws::String>&& value) { m_subnetsHasBeenSet = true; m_subnets = std::move(value); }
214 inline ComputeResource& WithSubnets(const Aws::Vector<Aws::String>& value) { SetSubnets(value); return *this;}
215 inline ComputeResource& WithSubnets(Aws::Vector<Aws::String>&& value) { SetSubnets(std::move(value)); return *this;}
216 inline ComputeResource& AddSubnets(const Aws::String& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; }
217 inline ComputeResource& AddSubnets(Aws::String&& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(std::move(value)); return *this; }
218 inline ComputeResource& AddSubnets(const char* value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; }
220
222
232 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const{ return m_securityGroupIds; }
233 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
234 inline void SetSecurityGroupIds(const Aws::Vector<Aws::String>& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = value; }
235 inline void SetSecurityGroupIds(Aws::Vector<Aws::String>&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = std::move(value); }
237 inline ComputeResource& WithSecurityGroupIds(Aws::Vector<Aws::String>&& value) { SetSecurityGroupIds(std::move(value)); return *this;}
238 inline ComputeResource& AddSecurityGroupIds(const Aws::String& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; }
239 inline ComputeResource& AddSecurityGroupIds(Aws::String&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(std::move(value)); return *this; }
240 inline ComputeResource& AddSecurityGroupIds(const char* value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; }
242
244
250 inline const Aws::String& GetEc2KeyPair() const{ return m_ec2KeyPair; }
251 inline bool Ec2KeyPairHasBeenSet() const { return m_ec2KeyPairHasBeenSet; }
252 inline void SetEc2KeyPair(const Aws::String& value) { m_ec2KeyPairHasBeenSet = true; m_ec2KeyPair = value; }
253 inline void SetEc2KeyPair(Aws::String&& value) { m_ec2KeyPairHasBeenSet = true; m_ec2KeyPair = std::move(value); }
254 inline void SetEc2KeyPair(const char* value) { m_ec2KeyPairHasBeenSet = true; m_ec2KeyPair.assign(value); }
255 inline ComputeResource& WithEc2KeyPair(const Aws::String& value) { SetEc2KeyPair(value); return *this;}
256 inline ComputeResource& WithEc2KeyPair(Aws::String&& value) { SetEc2KeyPair(std::move(value)); return *this;}
257 inline ComputeResource& WithEc2KeyPair(const char* value) { SetEc2KeyPair(value); return *this;}
259
261
273 inline const Aws::String& GetInstanceRole() const{ return m_instanceRole; }
274 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
275 inline void SetInstanceRole(const Aws::String& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = value; }
276 inline void SetInstanceRole(Aws::String&& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = std::move(value); }
277 inline void SetInstanceRole(const char* value) { m_instanceRoleHasBeenSet = true; m_instanceRole.assign(value); }
278 inline ComputeResource& WithInstanceRole(const Aws::String& value) { SetInstanceRole(value); return *this;}
279 inline ComputeResource& WithInstanceRole(Aws::String&& value) { SetInstanceRole(std::move(value)); return *this;}
280 inline ComputeResource& WithInstanceRole(const char* value) { SetInstanceRole(value); return *this;}
282
284
298 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
299 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
300 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
301 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
302 inline ComputeResource& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
303 inline ComputeResource& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
304 inline ComputeResource& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
305 inline ComputeResource& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
306 inline ComputeResource& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
307 inline ComputeResource& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
308 inline ComputeResource& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
309 inline ComputeResource& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
310 inline ComputeResource& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
312
314
326 inline const Aws::String& GetPlacementGroup() const{ return m_placementGroup; }
327 inline bool PlacementGroupHasBeenSet() const { return m_placementGroupHasBeenSet; }
328 inline void SetPlacementGroup(const Aws::String& value) { m_placementGroupHasBeenSet = true; m_placementGroup = value; }
329 inline void SetPlacementGroup(Aws::String&& value) { m_placementGroupHasBeenSet = true; m_placementGroup = std::move(value); }
330 inline void SetPlacementGroup(const char* value) { m_placementGroupHasBeenSet = true; m_placementGroup.assign(value); }
331 inline ComputeResource& WithPlacementGroup(const Aws::String& value) { SetPlacementGroup(value); return *this;}
332 inline ComputeResource& WithPlacementGroup(Aws::String&& value) { SetPlacementGroup(std::move(value)); return *this;}
333 inline ComputeResource& WithPlacementGroup(const char* value) { SetPlacementGroup(value); return *this;}
335
337
348 inline int GetBidPercentage() const{ return m_bidPercentage; }
349 inline bool BidPercentageHasBeenSet() const { return m_bidPercentageHasBeenSet; }
350 inline void SetBidPercentage(int value) { m_bidPercentageHasBeenSet = true; m_bidPercentage = value; }
351 inline ComputeResource& WithBidPercentage(int value) { SetBidPercentage(value); return *this;}
353
355
372 inline const Aws::String& GetSpotIamFleetRole() const{ return m_spotIamFleetRole; }
373 inline bool SpotIamFleetRoleHasBeenSet() const { return m_spotIamFleetRoleHasBeenSet; }
374 inline void SetSpotIamFleetRole(const Aws::String& value) { m_spotIamFleetRoleHasBeenSet = true; m_spotIamFleetRole = value; }
375 inline void SetSpotIamFleetRole(Aws::String&& value) { m_spotIamFleetRoleHasBeenSet = true; m_spotIamFleetRole = std::move(value); }
376 inline void SetSpotIamFleetRole(const char* value) { m_spotIamFleetRoleHasBeenSet = true; m_spotIamFleetRole.assign(value); }
377 inline ComputeResource& WithSpotIamFleetRole(const Aws::String& value) { SetSpotIamFleetRole(value); return *this;}
378 inline ComputeResource& WithSpotIamFleetRole(Aws::String&& value) { SetSpotIamFleetRole(std::move(value)); return *this;}
379 inline ComputeResource& WithSpotIamFleetRole(const char* value) { SetSpotIamFleetRole(value); return *this;}
381
383
395 inline const LaunchTemplateSpecification& GetLaunchTemplate() const{ return m_launchTemplate; }
396 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
397 inline void SetLaunchTemplate(const LaunchTemplateSpecification& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = value; }
398 inline void SetLaunchTemplate(LaunchTemplateSpecification&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::move(value); }
400 inline ComputeResource& WithLaunchTemplate(LaunchTemplateSpecification&& value) { SetLaunchTemplate(std::move(value)); return *this;}
402
404
412 inline const Aws::Vector<Ec2Configuration>& GetEc2Configuration() const{ return m_ec2Configuration; }
413 inline bool Ec2ConfigurationHasBeenSet() const { return m_ec2ConfigurationHasBeenSet; }
414 inline void SetEc2Configuration(const Aws::Vector<Ec2Configuration>& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration = value; }
415 inline void SetEc2Configuration(Aws::Vector<Ec2Configuration>&& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration = std::move(value); }
418 inline ComputeResource& AddEc2Configuration(const Ec2Configuration& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration.push_back(value); return *this; }
419 inline ComputeResource& AddEc2Configuration(Ec2Configuration&& value) { m_ec2ConfigurationHasBeenSet = true; m_ec2Configuration.push_back(std::move(value)); return *this; }
421 private:
422
423 CRType m_type;
424 bool m_typeHasBeenSet = false;
425
426 CRAllocationStrategy m_allocationStrategy;
427 bool m_allocationStrategyHasBeenSet = false;
428
429 int m_minvCpus;
430 bool m_minvCpusHasBeenSet = false;
431
432 int m_maxvCpus;
433 bool m_maxvCpusHasBeenSet = false;
434
435 int m_desiredvCpus;
436 bool m_desiredvCpusHasBeenSet = false;
437
438 Aws::Vector<Aws::String> m_instanceTypes;
439 bool m_instanceTypesHasBeenSet = false;
440
441 Aws::Vector<Aws::String> m_subnets;
442 bool m_subnetsHasBeenSet = false;
443
444 Aws::Vector<Aws::String> m_securityGroupIds;
445 bool m_securityGroupIdsHasBeenSet = false;
446
447 Aws::String m_ec2KeyPair;
448 bool m_ec2KeyPairHasBeenSet = false;
449
450 Aws::String m_instanceRole;
451 bool m_instanceRoleHasBeenSet = false;
452
454 bool m_tagsHasBeenSet = false;
455
456 Aws::String m_placementGroup;
457 bool m_placementGroupHasBeenSet = false;
458
459 int m_bidPercentage;
460 bool m_bidPercentageHasBeenSet = false;
461
462 Aws::String m_spotIamFleetRole;
463 bool m_spotIamFleetRoleHasBeenSet = false;
464
465 LaunchTemplateSpecification m_launchTemplate;
466 bool m_launchTemplateHasBeenSet = false;
467
468 Aws::Vector<Ec2Configuration> m_ec2Configuration;
469 bool m_ec2ConfigurationHasBeenSet = false;
470 };
471
472} // namespace Model
473} // namespace Batch
474} // namespace Aws
ComputeResource & AddEc2Configuration(const Ec2Configuration &value)
ComputeResource & WithAllocationStrategy(CRAllocationStrategy &&value)
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
ComputeResource & WithInstanceRole(const Aws::String &value)
ComputeResource & AddSubnets(const Aws::String &value)
ComputeResource & WithSpotIamFleetRole(const char *value)
void SetLaunchTemplate(const LaunchTemplateSpecification &value)
ComputeResource & WithEc2KeyPair(const char *value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
void SetSpotIamFleetRole(Aws::String &&value)
ComputeResource & WithMaxvCpus(int value)
void SetInstanceTypes(const Aws::Vector< Aws::String > &value)
ComputeResource & WithSpotIamFleetRole(const Aws::String &value)
ComputeResource & WithEc2KeyPair(Aws::String &&value)
ComputeResource & WithInstanceRole(Aws::String &&value)
ComputeResource & WithPlacementGroup(Aws::String &&value)
ComputeResource & WithSpotIamFleetRole(Aws::String &&value)
AWS_BATCH_API ComputeResource(Aws::Utils::Json::JsonView jsonValue)
void SetLaunchTemplate(LaunchTemplateSpecification &&value)
const Aws::String & GetInstanceRole() const
void SetSpotIamFleetRole(const Aws::String &value)
void SetInstanceRole(Aws::String &&value)
ComputeResource & AddTags(const char *key, Aws::String &&value)
ComputeResource & WithEc2Configuration(Aws::Vector< Ec2Configuration > &&value)
void SetAllocationStrategy(const CRAllocationStrategy &value)
void SetPlacementGroup(const Aws::String &value)
ComputeResource & AddInstanceTypes(const Aws::String &value)
const LaunchTemplateSpecification & GetLaunchTemplate() const
ComputeResource & WithMinvCpus(int value)
void SetPlacementGroup(const char *value)
void SetEc2KeyPair(const char *value)
ComputeResource & AddTags(Aws::String &&key, const char *value)
ComputeResource & WithAllocationStrategy(const CRAllocationStrategy &value)
ComputeResource & WithBidPercentage(int value)
ComputeResource & AddEc2Configuration(Ec2Configuration &&value)
ComputeResource & AddSecurityGroupIds(const char *value)
ComputeResource & WithPlacementGroup(const char *value)
void SetSubnets(const Aws::Vector< Aws::String > &value)
ComputeResource & AddTags(Aws::String &&key, const Aws::String &value)
ComputeResource & AddTags(const char *key, const char *value)
ComputeResource & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
ComputeResource & AddSecurityGroupIds(Aws::String &&value)
void SetInstanceRole(const char *value)
void SetInstanceRole(const Aws::String &value)
ComputeResource & WithDesiredvCpus(int value)
void SetEc2KeyPair(const Aws::String &value)
void SetSpotIamFleetRole(const char *value)
void SetSecurityGroupIds(const Aws::Vector< Aws::String > &value)
ComputeResource & AddSubnets(const char *value)
ComputeResource & WithSubnets(Aws::Vector< Aws::String > &&value)
void SetSubnets(Aws::Vector< Aws::String > &&value)
ComputeResource & WithType(const CRType &value)
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
void SetEc2Configuration(Aws::Vector< Ec2Configuration > &&value)
const CRAllocationStrategy & GetAllocationStrategy() const
ComputeResource & WithType(CRType &&value)
const Aws::String & GetEc2KeyPair() const
void SetInstanceTypes(Aws::Vector< Aws::String > &&value)
ComputeResource & WithLaunchTemplate(const LaunchTemplateSpecification &value)
ComputeResource & AddTags(Aws::String &&key, Aws::String &&value)
ComputeResource & WithEc2KeyPair(const Aws::String &value)
ComputeResource & AddSecurityGroupIds(const Aws::String &value)
const Aws::Vector< Aws::String > & GetSecurityGroupIds() const
ComputeResource & WithLaunchTemplate(LaunchTemplateSpecification &&value)
ComputeResource & AddTags(const Aws::String &key, Aws::String &&value)
ComputeResource & WithSubnets(const Aws::Vector< Aws::String > &value)
ComputeResource & WithSecurityGroupIds(const Aws::Vector< Aws::String > &value)
ComputeResource & WithInstanceTypes(const Aws::Vector< Aws::String > &value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
void SetType(const CRType &value)
ComputeResource & WithInstanceRole(const char *value)
ComputeResource & AddSubnets(Aws::String &&value)
ComputeResource & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
AWS_BATCH_API ComputeResource & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Ec2Configuration > & GetEc2Configuration() const
ComputeResource & WithEc2Configuration(const Aws::Vector< Ec2Configuration > &value)
const Aws::String & GetSpotIamFleetRole() const
const Aws::Vector< Aws::String > & GetSubnets() const
void SetPlacementGroup(Aws::String &&value)
const Aws::Vector< Aws::String > & GetInstanceTypes() const
const Aws::String & GetPlacementGroup() const
void SetEc2KeyPair(Aws::String &&value)
void SetEc2Configuration(const Aws::Vector< Ec2Configuration > &value)
ComputeResource & WithPlacementGroup(const Aws::String &value)
void SetAllocationStrategy(CRAllocationStrategy &&value)
ComputeResource & AddInstanceTypes(const char *value)
ComputeResource & WithSecurityGroupIds(Aws::Vector< Aws::String > &&value)
void SetSecurityGroupIds(Aws::Vector< Aws::String > &&value)
ComputeResource & AddTags(const Aws::String &key, const Aws::String &value)
ComputeResource & WithInstanceTypes(Aws::Vector< Aws::String > &&value)
ComputeResource & AddInstanceTypes(Aws::String &&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