AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateCapacityReservationRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2Request.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/CapacityReservationDeliveryPreference.h>
13#include <aws/ec2/model/CapacityReservationInstancePlatform.h>
14#include <aws/ec2/model/CapacityReservationTenancy.h>
15#include <aws/ec2/model/EndDateType.h>
16#include <aws/ec2/model/InstanceMatchCriteria.h>
17#include <aws/ec2/model/TagSpecification.h>
18
19#include <utility>
20
21namespace Aws {
22namespace EC2 {
23namespace Model {
24
28 public:
29 AWS_EC2_API CreateCapacityReservationRequest() = 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 "CreateCapacityReservation"; }
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:
44
50 inline const Aws::String& GetClientToken() const { return m_clientToken; }
51 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
52 template <typename ClientTokenT = Aws::String>
53 void SetClientToken(ClientTokenT&& value) {
54 m_clientTokenHasBeenSet = true;
55 m_clientToken = std::forward<ClientTokenT>(value);
56 }
57 template <typename ClientTokenT = Aws::String>
59 SetClientToken(std::forward<ClientTokenT>(value));
60 return *this;
61 }
63
65
72 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
73 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
74 template <typename InstanceTypeT = Aws::String>
75 void SetInstanceType(InstanceTypeT&& value) {
76 m_instanceTypeHasBeenSet = true;
77 m_instanceType = std::forward<InstanceTypeT>(value);
78 }
79 template <typename InstanceTypeT = Aws::String>
81 SetInstanceType(std::forward<InstanceTypeT>(value));
82 return *this;
83 }
85
87
90 inline CapacityReservationInstancePlatform GetInstancePlatform() const { return m_instancePlatform; }
91 inline bool InstancePlatformHasBeenSet() const { return m_instancePlatformHasBeenSet; }
93 m_instancePlatformHasBeenSet = true;
94 m_instancePlatform = value;
95 }
98 return *this;
99 }
101
103
106 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
107 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
108 template <typename AvailabilityZoneT = Aws::String>
109 void SetAvailabilityZone(AvailabilityZoneT&& value) {
110 m_availabilityZoneHasBeenSet = true;
111 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
112 }
113 template <typename AvailabilityZoneT = Aws::String>
115 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
116 return *this;
117 }
119
121
125 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
126 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
127 template <typename AvailabilityZoneIdT = Aws::String>
128 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
129 m_availabilityZoneIdHasBeenSet = true;
130 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
131 }
132 template <typename AvailabilityZoneIdT = Aws::String>
134 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
135 return *this;
136 }
138
140
149 inline CapacityReservationTenancy GetTenancy() const { return m_tenancy; }
150 inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; }
152 m_tenancyHasBeenSet = true;
153 m_tenancy = value;
154 }
156 SetTenancy(value);
157 return *this;
158 }
160
162
169 inline int GetInstanceCount() const { return m_instanceCount; }
170 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
171 inline void SetInstanceCount(int value) {
172 m_instanceCountHasBeenSet = true;
173 m_instanceCount = value;
174 }
176 SetInstanceCount(value);
177 return *this;
178 }
180
182
189 inline bool GetEbsOptimized() const { return m_ebsOptimized; }
190 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
191 inline void SetEbsOptimized(bool value) {
192 m_ebsOptimizedHasBeenSet = true;
193 m_ebsOptimized = value;
194 }
196 SetEbsOptimized(value);
197 return *this;
198 }
200
202
205 inline bool GetEphemeralStorage() const { return m_ephemeralStorage; }
206 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
207 inline void SetEphemeralStorage(bool value) {
208 m_ephemeralStorageHasBeenSet = true;
209 m_ephemeralStorage = value;
210 }
212 SetEphemeralStorage(value);
213 return *this;
214 }
216
218
232 inline const Aws::Utils::DateTime& GetEndDate() const { return m_endDate; }
233 inline bool EndDateHasBeenSet() const { return m_endDateHasBeenSet; }
234 template <typename EndDateT = Aws::Utils::DateTime>
235 void SetEndDate(EndDateT&& value) {
236 m_endDateHasBeenSet = true;
237 m_endDate = std::forward<EndDateT>(value);
238 }
239 template <typename EndDateT = Aws::Utils::DateTime>
241 SetEndDate(std::forward<EndDateT>(value));
242 return *this;
243 }
245
247
257 inline EndDateType GetEndDateType() const { return m_endDateType; }
258 inline bool EndDateTypeHasBeenSet() const { return m_endDateTypeHasBeenSet; }
259 inline void SetEndDateType(EndDateType value) {
260 m_endDateTypeHasBeenSet = true;
261 m_endDateType = value;
262 }
264 SetEndDateType(value);
265 return *this;
266 }
268
270
284 inline InstanceMatchCriteria GetInstanceMatchCriteria() const { return m_instanceMatchCriteria; }
285 inline bool InstanceMatchCriteriaHasBeenSet() const { return m_instanceMatchCriteriaHasBeenSet; }
287 m_instanceMatchCriteriaHasBeenSet = true;
288 m_instanceMatchCriteria = value;
289 }
292 return *this;
293 }
295
297
300 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
301 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
302 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
303 void SetTagSpecifications(TagSpecificationsT&& value) {
304 m_tagSpecificationsHasBeenSet = true;
305 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
306 }
307 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
309 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
310 return *this;
311 }
312 template <typename TagSpecificationsT = TagSpecification>
314 m_tagSpecificationsHasBeenSet = true;
315 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
316 return *this;
317 }
319
321
327 inline bool GetDryRun() const { return m_dryRun; }
328 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
329 inline void SetDryRun(bool value) {
330 m_dryRunHasBeenSet = true;
331 m_dryRun = value;
332 }
334 SetDryRun(value);
335 return *this;
336 }
338
340
345 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
346 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
347 template <typename OutpostArnT = Aws::String>
348 void SetOutpostArn(OutpostArnT&& value) {
349 m_outpostArnHasBeenSet = true;
350 m_outpostArn = std::forward<OutpostArnT>(value);
351 }
352 template <typename OutpostArnT = Aws::String>
354 SetOutpostArn(std::forward<OutpostArnT>(value));
355 return *this;
356 }
358
360
368 inline const Aws::String& GetPlacementGroupArn() const { return m_placementGroupArn; }
369 inline bool PlacementGroupArnHasBeenSet() const { return m_placementGroupArnHasBeenSet; }
370 template <typename PlacementGroupArnT = Aws::String>
371 void SetPlacementGroupArn(PlacementGroupArnT&& value) {
372 m_placementGroupArnHasBeenSet = true;
373 m_placementGroupArn = std::forward<PlacementGroupArnT>(value);
374 }
375 template <typename PlacementGroupArnT = Aws::String>
377 SetPlacementGroupArn(std::forward<PlacementGroupArnT>(value));
378 return *this;
379 }
381
383
391 inline const Aws::Utils::DateTime& GetStartDate() const { return m_startDate; }
392 inline bool StartDateHasBeenSet() const { return m_startDateHasBeenSet; }
393 template <typename StartDateT = Aws::Utils::DateTime>
394 void SetStartDate(StartDateT&& value) {
395 m_startDateHasBeenSet = true;
396 m_startDate = std::forward<StartDateT>(value);
397 }
398 template <typename StartDateT = Aws::Utils::DateTime>
400 SetStartDate(std::forward<StartDateT>(value));
401 return *this;
402 }
404
406
417 inline long long GetCommitmentDuration() const { return m_commitmentDuration; }
418 inline bool CommitmentDurationHasBeenSet() const { return m_commitmentDurationHasBeenSet; }
419 inline void SetCommitmentDuration(long long value) {
420 m_commitmentDurationHasBeenSet = true;
421 m_commitmentDuration = value;
422 }
425 return *this;
426 }
428
430
438 inline CapacityReservationDeliveryPreference GetDeliveryPreference() const { return m_deliveryPreference; }
439 inline bool DeliveryPreferenceHasBeenSet() const { return m_deliveryPreferenceHasBeenSet; }
441 m_deliveryPreferenceHasBeenSet = true;
442 m_deliveryPreference = value;
443 }
446 return *this;
447 }
449 private:
450 Aws::String m_clientToken;
451
452 Aws::String m_instanceType;
453
455
456 Aws::String m_availabilityZone;
457
458 Aws::String m_availabilityZoneId;
459
461
462 int m_instanceCount{0};
463
464 bool m_ebsOptimized{false};
465
466 bool m_ephemeralStorage{false};
467
468 Aws::Utils::DateTime m_endDate{};
469
470 EndDateType m_endDateType{EndDateType::NOT_SET};
471
473
474 Aws::Vector<TagSpecification> m_tagSpecifications;
475
476 bool m_dryRun{false};
477
478 Aws::String m_outpostArn;
479
480 Aws::String m_placementGroupArn;
481
482 Aws::Utils::DateTime m_startDate{};
483
484 long long m_commitmentDuration{0};
485
487 bool m_clientTokenHasBeenSet = false;
488 bool m_instanceTypeHasBeenSet = false;
489 bool m_instancePlatformHasBeenSet = false;
490 bool m_availabilityZoneHasBeenSet = false;
491 bool m_availabilityZoneIdHasBeenSet = false;
492 bool m_tenancyHasBeenSet = false;
493 bool m_instanceCountHasBeenSet = false;
494 bool m_ebsOptimizedHasBeenSet = false;
495 bool m_ephemeralStorageHasBeenSet = false;
496 bool m_endDateHasBeenSet = false;
497 bool m_endDateTypeHasBeenSet = false;
498 bool m_instanceMatchCriteriaHasBeenSet = false;
499 bool m_tagSpecificationsHasBeenSet = false;
500 bool m_dryRunHasBeenSet = false;
501 bool m_outpostArnHasBeenSet = false;
502 bool m_placementGroupArnHasBeenSet = false;
503 bool m_startDateHasBeenSet = false;
504 bool m_commitmentDurationHasBeenSet = false;
505 bool m_deliveryPreferenceHasBeenSet = false;
506};
507
508} // namespace Model
509} // namespace EC2
510} // 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