AWS SDK for C++  1.9.71
AWS SDK for C++
AllocateHostsRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace EC2
19 {
20 namespace Model
21 {
22 
26  {
27  public:
29 
30  // Service request name is the Operation name which will send this request out,
31  // each operation should has unique request name, so that we can get operation's name from this request.
32  // Note: this is not true for response, multiple operations may have the same response name,
33  // so we can not get operation's name from response.
34  inline virtual const char* GetServiceRequestName() const override { return "AllocateHosts"; }
35 
36  Aws::String SerializePayload() const override;
37 
38  protected:
39  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40 
41  public:
42 
51  inline const AutoPlacement& GetAutoPlacement() const{ return m_autoPlacement; }
52 
61  inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; }
62 
71  inline void SetAutoPlacement(const AutoPlacement& value) { m_autoPlacementHasBeenSet = true; m_autoPlacement = value; }
72 
81  inline void SetAutoPlacement(AutoPlacement&& value) { m_autoPlacementHasBeenSet = true; m_autoPlacement = std::move(value); }
82 
91  inline AllocateHostsRequest& WithAutoPlacement(const AutoPlacement& value) { SetAutoPlacement(value); return *this;}
92 
101  inline AllocateHostsRequest& WithAutoPlacement(AutoPlacement&& value) { SetAutoPlacement(std::move(value)); return *this;}
102 
103 
107  inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
108 
112  inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
113 
117  inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
118 
122  inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
123 
127  inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
128 
132  inline AllocateHostsRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
133 
137  inline AllocateHostsRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
138 
142  inline AllocateHostsRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
143 
144 
151  inline const Aws::String& GetClientToken() const{ return m_clientToken; }
152 
159  inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
160 
167  inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
168 
175  inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
176 
183  inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
184 
191  inline AllocateHostsRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
192 
199  inline AllocateHostsRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
200 
207  inline AllocateHostsRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
208 
209 
218  inline const Aws::String& GetInstanceType() const{ return m_instanceType; }
219 
228  inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
229 
238  inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
239 
248  inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
249 
258  inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); }
259 
268  inline AllocateHostsRequest& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;}
269 
278  inline AllocateHostsRequest& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;}
279 
288  inline AllocateHostsRequest& WithInstanceType(const char* value) { SetInstanceType(value); return *this;}
289 
290 
299  inline const Aws::String& GetInstanceFamily() const{ return m_instanceFamily; }
300 
309  inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
310 
319  inline void SetInstanceFamily(const Aws::String& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = value; }
320 
329  inline void SetInstanceFamily(Aws::String&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::move(value); }
330 
339  inline void SetInstanceFamily(const char* value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily.assign(value); }
340 
349  inline AllocateHostsRequest& WithInstanceFamily(const Aws::String& value) { SetInstanceFamily(value); return *this;}
350 
359  inline AllocateHostsRequest& WithInstanceFamily(Aws::String&& value) { SetInstanceFamily(std::move(value)); return *this;}
360 
369  inline AllocateHostsRequest& WithInstanceFamily(const char* value) { SetInstanceFamily(value); return *this;}
370 
371 
376  inline int GetQuantity() const{ return m_quantity; }
377 
382  inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; }
383 
388  inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; }
389 
394  inline AllocateHostsRequest& WithQuantity(int value) { SetQuantity(value); return *this;}
395 
396 
400  inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
401 
405  inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
406 
410  inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
411 
415  inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
416 
420  inline AllocateHostsRequest& WithTagSpecifications(const Aws::Vector<TagSpecification>& value) { SetTagSpecifications(value); return *this;}
421 
425  inline AllocateHostsRequest& WithTagSpecifications(Aws::Vector<TagSpecification>&& value) { SetTagSpecifications(std::move(value)); return *this;}
426 
430  inline AllocateHostsRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
431 
435  inline AllocateHostsRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
436 
437 
445  inline const HostRecovery& GetHostRecovery() const{ return m_hostRecovery; }
446 
454  inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; }
455 
463  inline void SetHostRecovery(const HostRecovery& value) { m_hostRecoveryHasBeenSet = true; m_hostRecovery = value; }
464 
472  inline void SetHostRecovery(HostRecovery&& value) { m_hostRecoveryHasBeenSet = true; m_hostRecovery = std::move(value); }
473 
481  inline AllocateHostsRequest& WithHostRecovery(const HostRecovery& value) { SetHostRecovery(value); return *this;}
482 
490  inline AllocateHostsRequest& WithHostRecovery(HostRecovery&& value) { SetHostRecovery(std::move(value)); return *this;}
491 
492  private:
493 
494  AutoPlacement m_autoPlacement;
495  bool m_autoPlacementHasBeenSet;
496 
497  Aws::String m_availabilityZone;
498  bool m_availabilityZoneHasBeenSet;
499 
500  Aws::String m_clientToken;
501  bool m_clientTokenHasBeenSet;
502 
503  Aws::String m_instanceType;
504  bool m_instanceTypeHasBeenSet;
505 
506  Aws::String m_instanceFamily;
507  bool m_instanceFamilyHasBeenSet;
508 
509  int m_quantity;
510  bool m_quantityHasBeenSet;
511 
512  Aws::Vector<TagSpecification> m_tagSpecifications;
513  bool m_tagSpecificationsHasBeenSet;
514 
515  HostRecovery m_hostRecovery;
516  bool m_hostRecoveryHasBeenSet;
517  };
518 
519 } // namespace Model
520 } // namespace EC2
521 } // namespace Aws
TagSpecification.h
Aws::EC2::Model::AllocateHostsRequest::GetQuantity
int GetQuantity() const
Definition: AllocateHostsRequest.h:376
Aws::EC2::Model::AllocateHostsRequest::GetHostRecovery
const HostRecovery & GetHostRecovery() const
Definition: AllocateHostsRequest.h:445
Aws::EC2::Model::AllocateHostsRequest::WithAutoPlacement
AllocateHostsRequest & WithAutoPlacement(const AutoPlacement &value)
Definition: AllocateHostsRequest.h:91
Aws::EC2::Model::AllocateHostsRequest::InstanceFamilyHasBeenSet
bool InstanceFamilyHasBeenSet() const
Definition: AllocateHostsRequest.h:309
Aws::EC2::Model::AllocateHostsRequest::GetClientToken
const Aws::String & GetClientToken() const
Definition: AllocateHostsRequest.h:151
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::AllocateHostsRequest::SetAvailabilityZone
void SetAvailabilityZone(const Aws::String &value)
Definition: AllocateHostsRequest.h:117
Aws::EC2::Model::AllocateHostsRequest::SetInstanceType
void SetInstanceType(const char *value)
Definition: AllocateHostsRequest.h:258
Aws::EC2::Model::AllocateHostsRequest::InstanceTypeHasBeenSet
bool InstanceTypeHasBeenSet() const
Definition: AllocateHostsRequest.h:228
Aws::EC2::Model::AllocateHostsRequest::GetInstanceFamily
const Aws::String & GetInstanceFamily() const
Definition: AllocateHostsRequest.h:299
Aws::EC2::Model::AllocateHostsRequest::AutoPlacementHasBeenSet
bool AutoPlacementHasBeenSet() const
Definition: AllocateHostsRequest.h:61
Aws::EC2::Model::AllocateHostsRequest::WithAvailabilityZone
AllocateHostsRequest & WithAvailabilityZone(Aws::String &&value)
Definition: AllocateHostsRequest.h:137
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::AllocateHostsRequest::SetInstanceFamily
void SetInstanceFamily(const Aws::String &value)
Definition: AllocateHostsRequest.h:319
Aws::EC2::Model::AllocateHostsRequest::SetAutoPlacement
void SetAutoPlacement(AutoPlacement &&value)
Definition: AllocateHostsRequest.h:81
Aws::EC2::Model::AllocateHostsRequest::HostRecoveryHasBeenSet
bool HostRecoveryHasBeenSet() const
Definition: AllocateHostsRequest.h:454
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::AllocateHostsRequest::WithQuantity
AllocateHostsRequest & WithQuantity(int value)
Definition: AllocateHostsRequest.h:394
Aws::EC2::Model::AllocateHostsRequest::SetInstanceFamily
void SetInstanceFamily(Aws::String &&value)
Definition: AllocateHostsRequest.h:329
HostRecovery.h
Aws::EC2::Model::AllocateHostsRequest::SetHostRecovery
void SetHostRecovery(HostRecovery &&value)
Definition: AllocateHostsRequest.h:472
Aws::EC2::Model::AllocateHostsRequest::AddTagSpecifications
AllocateHostsRequest & AddTagSpecifications(TagSpecification &&value)
Definition: AllocateHostsRequest.h:435
Aws::EC2::Model::AllocateHostsRequest::WithHostRecovery
AllocateHostsRequest & WithHostRecovery(const HostRecovery &value)
Definition: AllocateHostsRequest.h:481
AWSVector.h
Aws::EC2::Model::HostRecovery
HostRecovery
Definition: HostRecovery.h:17
Aws::EC2::Model::AllocateHostsRequest::GetAutoPlacement
const AutoPlacement & GetAutoPlacement() const
Definition: AllocateHostsRequest.h:51
Aws::EC2::Model::AllocateHostsRequest::WithInstanceFamily
AllocateHostsRequest & WithInstanceFamily(const char *value)
Definition: AllocateHostsRequest.h:369
Aws::EC2::Model::AllocateHostsRequest
Definition: AllocateHostsRequest.h:26
Aws::EC2::Model::AllocateHostsRequest::SetAvailabilityZone
void SetAvailabilityZone(Aws::String &&value)
Definition: AllocateHostsRequest.h:122
Aws::EC2::Model::AllocateHostsRequest::SetInstanceType
void SetInstanceType(Aws::String &&value)
Definition: AllocateHostsRequest.h:248
Aws::EC2::Model::AllocateHostsRequest::WithClientToken
AllocateHostsRequest & WithClientToken(const char *value)
Definition: AllocateHostsRequest.h:207
Aws::EC2::Model::AllocateHostsRequest::WithInstanceType
AllocateHostsRequest & WithInstanceType(const Aws::String &value)
Definition: AllocateHostsRequest.h:268
Aws::EC2::Model::AllocateHostsRequest::WithAvailabilityZone
AllocateHostsRequest & WithAvailabilityZone(const char *value)
Definition: AllocateHostsRequest.h:142
Aws::EC2::Model::AllocateHostsRequest::QuantityHasBeenSet
bool QuantityHasBeenSet() const
Definition: AllocateHostsRequest.h:382
Aws::EC2::Model::AllocateHostsRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::AutoPlacement
AutoPlacement
Definition: AutoPlacement.h:17
Aws::EC2::Model::AllocateHostsRequest::WithInstanceType
AllocateHostsRequest & WithInstanceType(Aws::String &&value)
Definition: AllocateHostsRequest.h:278
Aws::EC2::Model::AllocateHostsRequest::SetAvailabilityZone
void SetAvailabilityZone(const char *value)
Definition: AllocateHostsRequest.h:127
Aws::EC2::Model::AllocateHostsRequest::GetTagSpecifications
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
Definition: AllocateHostsRequest.h:400
EC2Request.h
Aws::EC2::Model::AllocateHostsRequest::AvailabilityZoneHasBeenSet
bool AvailabilityZoneHasBeenSet() const
Definition: AllocateHostsRequest.h:112
Aws::EC2::Model::AllocateHostsRequest::WithTagSpecifications
AllocateHostsRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: AllocateHostsRequest.h:425
AWSString.h
Aws::EC2::Model::AllocateHostsRequest::WithClientToken
AllocateHostsRequest & WithClientToken(const Aws::String &value)
Definition: AllocateHostsRequest.h:191
Aws::EC2::Model::AllocateHostsRequest::SetInstanceType
void SetInstanceType(const Aws::String &value)
Definition: AllocateHostsRequest.h:238
Aws::EC2::Model::AllocateHostsRequest::SetInstanceFamily
void SetInstanceFamily(const char *value)
Definition: AllocateHostsRequest.h:339
AutoPlacement.h
Aws::EC2::Model::AllocateHostsRequest::SetClientToken
void SetClientToken(Aws::String &&value)
Definition: AllocateHostsRequest.h:175
Aws::EC2::Model::AllocateHostsRequest::WithInstanceFamily
AllocateHostsRequest & WithInstanceFamily(const Aws::String &value)
Definition: AllocateHostsRequest.h:349
Aws::EC2::Model::AllocateHostsRequest::WithAvailabilityZone
AllocateHostsRequest & WithAvailabilityZone(const Aws::String &value)
Definition: AllocateHostsRequest.h:132
Aws::EC2::Model::AllocateHostsRequest::SetAutoPlacement
void SetAutoPlacement(const AutoPlacement &value)
Definition: AllocateHostsRequest.h:71
Aws::EC2::Model::AllocateHostsRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: AllocateHostsRequest.h:34
Aws::EC2::Model::AllocateHostsRequest::WithTagSpecifications
AllocateHostsRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: AllocateHostsRequest.h:420
Aws::EC2::Model::AllocateHostsRequest::ClientTokenHasBeenSet
bool ClientTokenHasBeenSet() const
Definition: AllocateHostsRequest.h:159
Aws::EC2::Model::AllocateHostsRequest::WithClientToken
AllocateHostsRequest & WithClientToken(Aws::String &&value)
Definition: AllocateHostsRequest.h:199
Aws::EC2::Model::AllocateHostsRequest::WithAutoPlacement
AllocateHostsRequest & WithAutoPlacement(AutoPlacement &&value)
Definition: AllocateHostsRequest.h:101
Aws::EC2::Model::AllocateHostsRequest::SetHostRecovery
void SetHostRecovery(const HostRecovery &value)
Definition: AllocateHostsRequest.h:463
Aws::EC2::Model::AllocateHostsRequest::SetTagSpecifications
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: AllocateHostsRequest.h:415
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::AllocateHostsRequest::SetQuantity
void SetQuantity(int value)
Definition: AllocateHostsRequest.h:388
Aws::EC2::Model::AllocateHostsRequest::WithInstanceFamily
AllocateHostsRequest & WithInstanceFamily(Aws::String &&value)
Definition: AllocateHostsRequest.h:359
Aws::EC2::Model::AllocateHostsRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::EC2::Model::AllocateHostsRequest::SetTagSpecifications
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: AllocateHostsRequest.h:410
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::AllocateHostsRequest::TagSpecificationsHasBeenSet
bool TagSpecificationsHasBeenSet() const
Definition: AllocateHostsRequest.h:405
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::AllocateHostsRequest::AllocateHostsRequest
AllocateHostsRequest()
Aws::EC2::Model::AllocateHostsRequest::GetAvailabilityZone
const Aws::String & GetAvailabilityZone() const
Definition: AllocateHostsRequest.h:107
Aws::EC2::Model::AllocateHostsRequest::SetClientToken
void SetClientToken(const char *value)
Definition: AllocateHostsRequest.h:183
Aws::EC2::Model::AllocateHostsRequest::GetInstanceType
const Aws::String & GetInstanceType() const
Definition: AllocateHostsRequest.h:218
Aws::EC2::Model::TagSpecification
Definition: TagSpecification.h:35
EC2_EXPORTS.h
Aws::EC2::Model::AllocateHostsRequest::WithInstanceType
AllocateHostsRequest & WithInstanceType(const char *value)
Definition: AllocateHostsRequest.h:288
Aws::EC2::Model::AllocateHostsRequest::SetClientToken
void SetClientToken(const Aws::String &value)
Definition: AllocateHostsRequest.h:167
Aws::EC2::Model::AllocateHostsRequest::AddTagSpecifications
AllocateHostsRequest & AddTagSpecifications(const TagSpecification &value)
Definition: AllocateHostsRequest.h:430
Aws::EC2::Model::AllocateHostsRequest::WithHostRecovery
AllocateHostsRequest & WithHostRecovery(HostRecovery &&value)
Definition: AllocateHostsRequest.h:490