AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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() = default;
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 template<typename InstanceFamilyT = Aws::String>
56 void SetInstanceFamily(InstanceFamilyT&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::forward<InstanceFamilyT>(value); }
57 template<typename InstanceFamilyT = Aws::String>
58 AllocateHostsRequest& WithInstanceFamily(InstanceFamilyT&& value) { SetInstanceFamily(std::forward<InstanceFamilyT>(value)); return *this;}
60
62
65 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
66 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
67 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
68 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
69 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
70 AllocateHostsRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
71 template<typename TagSpecificationsT = TagSpecification>
72 AllocateHostsRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
74
76
83 inline HostRecovery GetHostRecovery() const { return m_hostRecovery; }
84 inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; }
85 inline void SetHostRecovery(HostRecovery value) { m_hostRecoveryHasBeenSet = true; m_hostRecovery = value; }
86 inline AllocateHostsRequest& WithHostRecovery(HostRecovery value) { SetHostRecovery(value); return *this;}
88
90
96 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
97 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
98 template<typename OutpostArnT = Aws::String>
99 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
100 template<typename OutpostArnT = Aws::String>
101 AllocateHostsRequest& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
103
105
111 inline HostMaintenance GetHostMaintenance() const { return m_hostMaintenance; }
112 inline bool HostMaintenanceHasBeenSet() const { return m_hostMaintenanceHasBeenSet; }
113 inline void SetHostMaintenance(HostMaintenance value) { m_hostMaintenanceHasBeenSet = true; m_hostMaintenance = value; }
116
118
129 inline const Aws::Vector<Aws::String>& GetAssetIds() const { return m_assetIds; }
130 inline bool AssetIdsHasBeenSet() const { return m_assetIdsHasBeenSet; }
131 template<typename AssetIdsT = Aws::Vector<Aws::String>>
132 void SetAssetIds(AssetIdsT&& value) { m_assetIdsHasBeenSet = true; m_assetIds = std::forward<AssetIdsT>(value); }
133 template<typename AssetIdsT = Aws::Vector<Aws::String>>
134 AllocateHostsRequest& WithAssetIds(AssetIdsT&& value) { SetAssetIds(std::forward<AssetIdsT>(value)); return *this;}
135 template<typename AssetIdsT = Aws::String>
136 AllocateHostsRequest& AddAssetIds(AssetIdsT&& value) { m_assetIdsHasBeenSet = true; m_assetIds.emplace_back(std::forward<AssetIdsT>(value)); return *this; }
138
140
143 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
144 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
145 template<typename AvailabilityZoneIdT = Aws::String>
146 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value); }
147 template<typename AvailabilityZoneIdT = Aws::String>
148 AllocateHostsRequest& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) { SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value)); return *this;}
150
152
160 inline AutoPlacement GetAutoPlacement() const { return m_autoPlacement; }
161 inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; }
162 inline void SetAutoPlacement(AutoPlacement value) { m_autoPlacementHasBeenSet = true; m_autoPlacement = value; }
165
167
173 inline const Aws::String& GetClientToken() const { return m_clientToken; }
174 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
175 template<typename ClientTokenT = Aws::String>
176 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
177 template<typename ClientTokenT = Aws::String>
178 AllocateHostsRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
180
182
190 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
191 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
192 template<typename InstanceTypeT = Aws::String>
193 void SetInstanceType(InstanceTypeT&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::forward<InstanceTypeT>(value); }
194 template<typename InstanceTypeT = Aws::String>
195 AllocateHostsRequest& WithInstanceType(InstanceTypeT&& value) { SetInstanceType(std::forward<InstanceTypeT>(value)); return *this;}
197
199
207 inline int GetQuantity() const { return m_quantity; }
208 inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; }
209 inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; }
210 inline AllocateHostsRequest& WithQuantity(int value) { SetQuantity(value); return *this;}
212
214
217 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
218 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
219 template<typename AvailabilityZoneT = Aws::String>
220 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
221 template<typename AvailabilityZoneT = Aws::String>
222 AllocateHostsRequest& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
224 private:
225
226 Aws::String m_instanceFamily;
227 bool m_instanceFamilyHasBeenSet = false;
228
229 Aws::Vector<TagSpecification> m_tagSpecifications;
230 bool m_tagSpecificationsHasBeenSet = false;
231
232 HostRecovery m_hostRecovery{HostRecovery::NOT_SET};
233 bool m_hostRecoveryHasBeenSet = false;
234
235 Aws::String m_outpostArn;
236 bool m_outpostArnHasBeenSet = false;
237
238 HostMaintenance m_hostMaintenance{HostMaintenance::NOT_SET};
239 bool m_hostMaintenanceHasBeenSet = false;
240
241 Aws::Vector<Aws::String> m_assetIds;
242 bool m_assetIdsHasBeenSet = false;
243
244 Aws::String m_availabilityZoneId;
245 bool m_availabilityZoneIdHasBeenSet = false;
246
247 AutoPlacement m_autoPlacement{AutoPlacement::NOT_SET};
248 bool m_autoPlacementHasBeenSet = false;
249
250 Aws::String m_clientToken;
251 bool m_clientTokenHasBeenSet = false;
252
253 Aws::String m_instanceType;
254 bool m_instanceTypeHasBeenSet = false;
255
256 int m_quantity{0};
257 bool m_quantityHasBeenSet = false;
258
259 Aws::String m_availabilityZone;
260 bool m_availabilityZoneHasBeenSet = false;
261 };
262
263} // namespace Model
264} // namespace EC2
265} // namespace Aws
AllocateHostsRequest & WithAssetIds(AssetIdsT &&value)
void SetTagSpecifications(TagSpecificationsT &&value)
void SetAvailabilityZone(AvailabilityZoneT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
AllocateHostsRequest & WithHostMaintenance(HostMaintenance value)
AllocateHostsRequest & WithAutoPlacement(AutoPlacement value)
AWS_EC2_API AllocateHostsRequest()=default
AllocateHostsRequest & WithOutpostArn(OutpostArnT &&value)
AllocateHostsRequest & WithInstanceFamily(InstanceFamilyT &&value)
void SetInstanceFamily(InstanceFamilyT &&value)
const Aws::String & GetInstanceFamily() const
AllocateHostsRequest & WithHostRecovery(HostRecovery value)
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
const Aws::String & GetInstanceType() const
AllocateHostsRequest & WithAvailabilityZone(AvailabilityZoneT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AllocateHostsRequest & AddTagSpecifications(TagSpecificationsT &&value)
AllocateHostsRequest & WithQuantity(int value)
const Aws::String & GetAvailabilityZoneId() const
void SetInstanceType(InstanceTypeT &&value)
const Aws::Vector< Aws::String > & GetAssetIds() const
AllocateHostsRequest & WithTagSpecifications(TagSpecificationsT &&value)
AllocateHostsRequest & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
void SetHostMaintenance(HostMaintenance value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetOutpostArn() const
AllocateHostsRequest & WithClientToken(ClientTokenT &&value)
AllocateHostsRequest & AddAssetIds(AssetIdsT &&value)
AllocateHostsRequest & WithInstanceType(InstanceTypeT &&value)
const Aws::String & GetAvailabilityZone() const
const Aws::String & GetClientToken() const
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector