AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateCapacityReservationRequest.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/ec2/model/CapacityReservationInstancePlatform.h>
11#include <aws/ec2/model/CapacityReservationTenancy.h>
12#include <aws/core/utils/DateTime.h>
13#include <aws/ec2/model/EndDateType.h>
14#include <aws/ec2/model/InstanceMatchCriteria.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16#include <aws/ec2/model/CapacityReservationDeliveryPreference.h>
17#include <aws/ec2/model/TagSpecification.h>
18#include <utility>
19
20namespace Aws
21{
22namespace EC2
23{
24namespace Model
25{
26
30 {
31 public:
32 AWS_EC2_API CreateCapacityReservationRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "CreateCapacityReservation"; }
39
40 AWS_EC2_API Aws::String SerializePayload() const override;
41
42 protected:
43 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
44
45 public:
46
48
54 inline const Aws::String& GetClientToken() const { return m_clientToken; }
55 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
56 template<typename ClientTokenT = Aws::String>
57 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
58 template<typename ClientTokenT = Aws::String>
59 CreateCapacityReservationRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
61
63
70 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
71 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
72 template<typename InstanceTypeT = Aws::String>
73 void SetInstanceType(InstanceTypeT&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::forward<InstanceTypeT>(value); }
74 template<typename InstanceTypeT = Aws::String>
75 CreateCapacityReservationRequest& WithInstanceType(InstanceTypeT&& value) { SetInstanceType(std::forward<InstanceTypeT>(value)); return *this;}
77
79
82 inline CapacityReservationInstancePlatform GetInstancePlatform() const { return m_instancePlatform; }
83 inline bool InstancePlatformHasBeenSet() const { return m_instancePlatformHasBeenSet; }
84 inline void SetInstancePlatform(CapacityReservationInstancePlatform value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = value; }
87
89
92 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
93 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
94 template<typename AvailabilityZoneT = Aws::String>
95 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
96 template<typename AvailabilityZoneT = Aws::String>
97 CreateCapacityReservationRequest& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
99
101
105 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
106 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
107 template<typename AvailabilityZoneIdT = Aws::String>
108 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value); }
109 template<typename AvailabilityZoneIdT = Aws::String>
110 CreateCapacityReservationRequest& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) { SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value)); return *this;}
112
114
123 inline CapacityReservationTenancy GetTenancy() const { return m_tenancy; }
124 inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; }
125 inline void SetTenancy(CapacityReservationTenancy value) { m_tenancyHasBeenSet = true; m_tenancy = value; }
128
130
137 inline int GetInstanceCount() const { return m_instanceCount; }
138 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
139 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
140 inline CreateCapacityReservationRequest& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
142
144
151 inline bool GetEbsOptimized() const { return m_ebsOptimized; }
152 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
153 inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; }
154 inline CreateCapacityReservationRequest& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;}
156
158
161 inline bool GetEphemeralStorage() const { return m_ephemeralStorage; }
162 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
163 inline void SetEphemeralStorage(bool value) { m_ephemeralStorageHasBeenSet = true; m_ephemeralStorage = value; }
166
168
182 inline const Aws::Utils::DateTime& GetEndDate() const { return m_endDate; }
183 inline bool EndDateHasBeenSet() const { return m_endDateHasBeenSet; }
184 template<typename EndDateT = Aws::Utils::DateTime>
185 void SetEndDate(EndDateT&& value) { m_endDateHasBeenSet = true; m_endDate = std::forward<EndDateT>(value); }
186 template<typename EndDateT = Aws::Utils::DateTime>
187 CreateCapacityReservationRequest& WithEndDate(EndDateT&& value) { SetEndDate(std::forward<EndDateT>(value)); return *this;}
189
191
201 inline EndDateType GetEndDateType() const { return m_endDateType; }
202 inline bool EndDateTypeHasBeenSet() const { return m_endDateTypeHasBeenSet; }
203 inline void SetEndDateType(EndDateType value) { m_endDateTypeHasBeenSet = true; m_endDateType = value; }
206
208
222 inline InstanceMatchCriteria GetInstanceMatchCriteria() const { return m_instanceMatchCriteria; }
223 inline bool InstanceMatchCriteriaHasBeenSet() const { return m_instanceMatchCriteriaHasBeenSet; }
224 inline void SetInstanceMatchCriteria(InstanceMatchCriteria value) { m_instanceMatchCriteriaHasBeenSet = true; m_instanceMatchCriteria = value; }
227
229
232 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
233 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
234 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
235 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
236 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
237 CreateCapacityReservationRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
238 template<typename TagSpecificationsT = TagSpecification>
239 CreateCapacityReservationRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
241
243
249 inline bool GetDryRun() const { return m_dryRun; }
250 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
251 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
252 inline CreateCapacityReservationRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
254
256
261 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
262 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
263 template<typename OutpostArnT = Aws::String>
264 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
265 template<typename OutpostArnT = Aws::String>
266 CreateCapacityReservationRequest& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
268
270
278 inline const Aws::String& GetPlacementGroupArn() const { return m_placementGroupArn; }
279 inline bool PlacementGroupArnHasBeenSet() const { return m_placementGroupArnHasBeenSet; }
280 template<typename PlacementGroupArnT = Aws::String>
281 void SetPlacementGroupArn(PlacementGroupArnT&& value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn = std::forward<PlacementGroupArnT>(value); }
282 template<typename PlacementGroupArnT = Aws::String>
283 CreateCapacityReservationRequest& WithPlacementGroupArn(PlacementGroupArnT&& value) { SetPlacementGroupArn(std::forward<PlacementGroupArnT>(value)); return *this;}
285
287
295 inline const Aws::Utils::DateTime& GetStartDate() const { return m_startDate; }
296 inline bool StartDateHasBeenSet() const { return m_startDateHasBeenSet; }
297 template<typename StartDateT = Aws::Utils::DateTime>
298 void SetStartDate(StartDateT&& value) { m_startDateHasBeenSet = true; m_startDate = std::forward<StartDateT>(value); }
299 template<typename StartDateT = Aws::Utils::DateTime>
300 CreateCapacityReservationRequest& WithStartDate(StartDateT&& value) { SetStartDate(std::forward<StartDateT>(value)); return *this;}
302
304
315 inline long long GetCommitmentDuration() const { return m_commitmentDuration; }
316 inline bool CommitmentDurationHasBeenSet() const { return m_commitmentDurationHasBeenSet; }
317 inline void SetCommitmentDuration(long long value) { m_commitmentDurationHasBeenSet = true; m_commitmentDuration = value; }
318 inline CreateCapacityReservationRequest& WithCommitmentDuration(long long value) { SetCommitmentDuration(value); return *this;}
320
322
330 inline CapacityReservationDeliveryPreference GetDeliveryPreference() const { return m_deliveryPreference; }
331 inline bool DeliveryPreferenceHasBeenSet() const { return m_deliveryPreferenceHasBeenSet; }
332 inline void SetDeliveryPreference(CapacityReservationDeliveryPreference value) { m_deliveryPreferenceHasBeenSet = true; m_deliveryPreference = value; }
335 private:
336
337 Aws::String m_clientToken;
338 bool m_clientTokenHasBeenSet = false;
339
340 Aws::String m_instanceType;
341 bool m_instanceTypeHasBeenSet = false;
342
344 bool m_instancePlatformHasBeenSet = false;
345
346 Aws::String m_availabilityZone;
347 bool m_availabilityZoneHasBeenSet = false;
348
349 Aws::String m_availabilityZoneId;
350 bool m_availabilityZoneIdHasBeenSet = false;
351
353 bool m_tenancyHasBeenSet = false;
354
355 int m_instanceCount{0};
356 bool m_instanceCountHasBeenSet = false;
357
358 bool m_ebsOptimized{false};
359 bool m_ebsOptimizedHasBeenSet = false;
360
361 bool m_ephemeralStorage{false};
362 bool m_ephemeralStorageHasBeenSet = false;
363
364 Aws::Utils::DateTime m_endDate{};
365 bool m_endDateHasBeenSet = false;
366
367 EndDateType m_endDateType{EndDateType::NOT_SET};
368 bool m_endDateTypeHasBeenSet = false;
369
371 bool m_instanceMatchCriteriaHasBeenSet = false;
372
373 Aws::Vector<TagSpecification> m_tagSpecifications;
374 bool m_tagSpecificationsHasBeenSet = false;
375
376 bool m_dryRun{false};
377 bool m_dryRunHasBeenSet = false;
378
379 Aws::String m_outpostArn;
380 bool m_outpostArnHasBeenSet = false;
381
382 Aws::String m_placementGroupArn;
383 bool m_placementGroupArnHasBeenSet = false;
384
385 Aws::Utils::DateTime m_startDate{};
386 bool m_startDateHasBeenSet = false;
387
388 long long m_commitmentDuration{0};
389 bool m_commitmentDurationHasBeenSet = false;
390
392 bool m_deliveryPreferenceHasBeenSet = false;
393 };
394
395} // namespace Model
396} // namespace EC2
397} // namespace Aws
CreateCapacityReservationRequest & WithInstanceType(InstanceTypeT &&value)
CreateCapacityReservationRequest & WithInstanceCount(int value)
CreateCapacityReservationRequest & WithInstanceMatchCriteria(InstanceMatchCriteria value)
CreateCapacityReservationRequest & WithStartDate(StartDateT &&value)
CreateCapacityReservationRequest & WithEndDateType(EndDateType value)
CreateCapacityReservationRequest & AddTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateCapacityReservationRequest & WithTenancy(CapacityReservationTenancy value)
CreateCapacityReservationRequest & WithEphemeralStorage(bool value)
CapacityReservationInstancePlatform GetInstancePlatform() const
CreateCapacityReservationRequest & WithEbsOptimized(bool value)
CreateCapacityReservationRequest & WithPlacementGroupArn(PlacementGroupArnT &&value)
CreateCapacityReservationRequest & WithClientToken(ClientTokenT &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CreateCapacityReservationRequest & WithCommitmentDuration(long long value)
CapacityReservationDeliveryPreference GetDeliveryPreference() const
CreateCapacityReservationRequest & WithInstancePlatform(CapacityReservationInstancePlatform value)
void SetInstancePlatform(CapacityReservationInstancePlatform value)
CreateCapacityReservationRequest & WithEndDate(EndDateT &&value)
CreateCapacityReservationRequest & WithDeliveryPreference(CapacityReservationDeliveryPreference value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetDeliveryPreference(CapacityReservationDeliveryPreference value)
CreateCapacityReservationRequest & WithOutpostArn(OutpostArnT &&value)
CreateCapacityReservationRequest & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
CreateCapacityReservationRequest & WithTagSpecifications(TagSpecificationsT &&value)
CreateCapacityReservationRequest & WithDryRun(bool value)
CreateCapacityReservationRequest & WithAvailabilityZone(AvailabilityZoneT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector