AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
AllocateHostsRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/model/HostRecovery.h>
12#include <aws/ec2/model/HostMaintenance.h>
13#include <aws/ec2/model/AutoPlacement.h>
14#include <aws/ec2/model/TagSpecification.h>
15#include <utility>
16
17namespace Aws
18{
19namespace EC2
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_EC2_API AllocateHostsRequest();
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "AllocateHosts"; }
36
37 AWS_EC2_API Aws::String SerializePayload() const override;
38
39 protected:
40 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
41
42 public:
43
45
53 inline const Aws::String& GetInstanceFamily() const{ return m_instanceFamily; }
54 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
55 inline void SetInstanceFamily(const Aws::String& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = value; }
56 inline void SetInstanceFamily(Aws::String&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::move(value); }
57 inline void SetInstanceFamily(const char* value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily.assign(value); }
58 inline AllocateHostsRequest& WithInstanceFamily(const Aws::String& value) { SetInstanceFamily(value); return *this;}
59 inline AllocateHostsRequest& WithInstanceFamily(Aws::String&& value) { SetInstanceFamily(std::move(value)); return *this;}
60 inline AllocateHostsRequest& WithInstanceFamily(const char* value) { SetInstanceFamily(value); return *this;}
62
64
67 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
68 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
69 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
70 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
73 inline AllocateHostsRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
74 inline AllocateHostsRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
76
78
85 inline const HostRecovery& GetHostRecovery() const{ return m_hostRecovery; }
86 inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; }
87 inline void SetHostRecovery(const HostRecovery& value) { m_hostRecoveryHasBeenSet = true; m_hostRecovery = value; }
88 inline void SetHostRecovery(HostRecovery&& value) { m_hostRecoveryHasBeenSet = true; m_hostRecovery = std::move(value); }
89 inline AllocateHostsRequest& WithHostRecovery(const HostRecovery& value) { SetHostRecovery(value); return *this;}
90 inline AllocateHostsRequest& WithHostRecovery(HostRecovery&& value) { SetHostRecovery(std::move(value)); return *this;}
92
94
100 inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; }
101 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
102 inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; }
103 inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); }
104 inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); }
105 inline AllocateHostsRequest& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;}
106 inline AllocateHostsRequest& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;}
107 inline AllocateHostsRequest& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;}
109
111
117 inline const HostMaintenance& GetHostMaintenance() const{ return m_hostMaintenance; }
118 inline bool HostMaintenanceHasBeenSet() const { return m_hostMaintenanceHasBeenSet; }
119 inline void SetHostMaintenance(const HostMaintenance& value) { m_hostMaintenanceHasBeenSet = true; m_hostMaintenance = value; }
120 inline void SetHostMaintenance(HostMaintenance&& value) { m_hostMaintenanceHasBeenSet = true; m_hostMaintenance = std::move(value); }
121 inline AllocateHostsRequest& WithHostMaintenance(const HostMaintenance& value) { SetHostMaintenance(value); return *this;}
122 inline AllocateHostsRequest& WithHostMaintenance(HostMaintenance&& value) { SetHostMaintenance(std::move(value)); return *this;}
124
126
137 inline const Aws::Vector<Aws::String>& GetAssetIds() const{ return m_assetIds; }
138 inline bool AssetIdsHasBeenSet() const { return m_assetIdsHasBeenSet; }
139 inline void SetAssetIds(const Aws::Vector<Aws::String>& value) { m_assetIdsHasBeenSet = true; m_assetIds = value; }
140 inline void SetAssetIds(Aws::Vector<Aws::String>&& value) { m_assetIdsHasBeenSet = true; m_assetIds = std::move(value); }
141 inline AllocateHostsRequest& WithAssetIds(const Aws::Vector<Aws::String>& value) { SetAssetIds(value); return *this;}
142 inline AllocateHostsRequest& WithAssetIds(Aws::Vector<Aws::String>&& value) { SetAssetIds(std::move(value)); return *this;}
143 inline AllocateHostsRequest& AddAssetIds(const Aws::String& value) { m_assetIdsHasBeenSet = true; m_assetIds.push_back(value); return *this; }
144 inline AllocateHostsRequest& AddAssetIds(Aws::String&& value) { m_assetIdsHasBeenSet = true; m_assetIds.push_back(std::move(value)); return *this; }
145 inline AllocateHostsRequest& AddAssetIds(const char* value) { m_assetIdsHasBeenSet = true; m_assetIds.push_back(value); return *this; }
147
149
157 inline const AutoPlacement& GetAutoPlacement() const{ return m_autoPlacement; }
158 inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; }
159 inline void SetAutoPlacement(const AutoPlacement& value) { m_autoPlacementHasBeenSet = true; m_autoPlacement = value; }
160 inline void SetAutoPlacement(AutoPlacement&& value) { m_autoPlacementHasBeenSet = true; m_autoPlacement = std::move(value); }
161 inline AllocateHostsRequest& WithAutoPlacement(const AutoPlacement& value) { SetAutoPlacement(value); return *this;}
162 inline AllocateHostsRequest& WithAutoPlacement(AutoPlacement&& value) { SetAutoPlacement(std::move(value)); return *this;}
164
166
172 inline const Aws::String& GetClientToken() const{ return m_clientToken; }
173 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
174 inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
175 inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
176 inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
177 inline AllocateHostsRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
178 inline AllocateHostsRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
179 inline AllocateHostsRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
181
183
191 inline const Aws::String& GetInstanceType() const{ return m_instanceType; }
192 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
193 inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
194 inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
195 inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); }
196 inline AllocateHostsRequest& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;}
197 inline AllocateHostsRequest& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;}
198 inline AllocateHostsRequest& WithInstanceType(const char* value) { SetInstanceType(value); return *this;}
200
202
210 inline int GetQuantity() const{ return m_quantity; }
211 inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; }
212 inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; }
213 inline AllocateHostsRequest& WithQuantity(int value) { SetQuantity(value); return *this;}
215
217
220 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
221 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
222 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
223 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
224 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
225 inline AllocateHostsRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
226 inline AllocateHostsRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
227 inline AllocateHostsRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
229 private:
230
231 Aws::String m_instanceFamily;
232 bool m_instanceFamilyHasBeenSet = false;
233
234 Aws::Vector<TagSpecification> m_tagSpecifications;
235 bool m_tagSpecificationsHasBeenSet = false;
236
237 HostRecovery m_hostRecovery;
238 bool m_hostRecoveryHasBeenSet = false;
239
240 Aws::String m_outpostArn;
241 bool m_outpostArnHasBeenSet = false;
242
243 HostMaintenance m_hostMaintenance;
244 bool m_hostMaintenanceHasBeenSet = false;
245
246 Aws::Vector<Aws::String> m_assetIds;
247 bool m_assetIdsHasBeenSet = false;
248
249 AutoPlacement m_autoPlacement;
250 bool m_autoPlacementHasBeenSet = false;
251
252 Aws::String m_clientToken;
253 bool m_clientTokenHasBeenSet = false;
254
255 Aws::String m_instanceType;
256 bool m_instanceTypeHasBeenSet = false;
257
258 int m_quantity;
259 bool m_quantityHasBeenSet = false;
260
261 Aws::String m_availabilityZone;
262 bool m_availabilityZoneHasBeenSet = false;
263 };
264
265} // namespace Model
266} // namespace EC2
267} // namespace Aws
AllocateHostsRequest & AddAssetIds(const Aws::String &value)
void SetOutpostArn(const Aws::String &value)
AllocateHostsRequest & WithAutoPlacement(const AutoPlacement &value)
AWS_EC2_API Aws::String SerializePayload() const override
void SetInstanceFamily(Aws::String &&value)
AllocateHostsRequest & WithAvailabilityZone(const char *value)
AllocateHostsRequest & WithClientToken(const char *value)
AllocateHostsRequest & WithHostMaintenance(const HostMaintenance &value)
void SetAutoPlacement(AutoPlacement &&value)
AllocateHostsRequest & WithOutpostArn(Aws::String &&value)
AllocateHostsRequest & AddAssetIds(const char *value)
void SetInstanceType(const Aws::String &value)
AllocateHostsRequest & WithAssetIds(const Aws::Vector< Aws::String > &value)
void SetInstanceFamily(const Aws::String &value)
AllocateHostsRequest & WithClientToken(const Aws::String &value)
AllocateHostsRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
AllocateHostsRequest & WithAutoPlacement(AutoPlacement &&value)
const Aws::String & GetInstanceFamily() const
void SetAutoPlacement(const AutoPlacement &value)
AllocateHostsRequest & WithInstanceFamily(Aws::String &&value)
AllocateHostsRequest & AddTagSpecifications(const TagSpecification &value)
void SetHostMaintenance(HostMaintenance &&value)
AllocateHostsRequest & WithAssetIds(Aws::Vector< Aws::String > &&value)
void SetAvailabilityZone(Aws::String &&value)
const Aws::String & GetInstanceType() const
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetHostMaintenance(const HostMaintenance &value)
AllocateHostsRequest & WithInstanceType(Aws::String &&value)
AllocateHostsRequest & WithAvailabilityZone(const Aws::String &value)
AllocateHostsRequest & WithQuantity(int value)
void SetHostRecovery(HostRecovery &&value)
AllocateHostsRequest & WithHostMaintenance(HostMaintenance &&value)
AllocateHostsRequest & AddAssetIds(Aws::String &&value)
AllocateHostsRequest & WithInstanceFamily(const Aws::String &value)
const Aws::Vector< Aws::String > & GetAssetIds() const
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
void SetClientToken(const Aws::String &value)
void SetHostRecovery(const HostRecovery &value)
AllocateHostsRequest & WithInstanceType(const char *value)
AllocateHostsRequest & WithHostRecovery(const HostRecovery &value)
AllocateHostsRequest & AddTagSpecifications(TagSpecification &&value)
const HostRecovery & GetHostRecovery() const
const HostMaintenance & GetHostMaintenance() const
AllocateHostsRequest & WithInstanceFamily(const char *value)
void SetAssetIds(Aws::Vector< Aws::String > &&value)
const AutoPlacement & GetAutoPlacement() const
AllocateHostsRequest & WithOutpostArn(const char *value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetOutpostArn() const
AllocateHostsRequest & WithOutpostArn(const Aws::String &value)
void SetAvailabilityZone(const Aws::String &value)
AllocateHostsRequest & WithInstanceType(const Aws::String &value)
AllocateHostsRequest & WithClientToken(Aws::String &&value)
const Aws::String & GetAvailabilityZone() const
const Aws::String & GetClientToken() const
AllocateHostsRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
void SetAssetIds(const Aws::Vector< Aws::String > &value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
AllocateHostsRequest & WithHostRecovery(HostRecovery &&value)
AllocateHostsRequest & WithAvailabilityZone(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector