AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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/TagSpecification.h>
17#include <utility>
18
19namespace Aws
20{
21namespace EC2
22{
23namespace Model
24{
25
29 {
30 public:
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "CreateCapacityReservation"; }
38
39 AWS_EC2_API Aws::String SerializePayload() const override;
40
41 protected:
42 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
43
44 public:
45
47
53 inline const Aws::String& GetClientToken() const{ return m_clientToken; }
54 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
55 inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
56 inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
57 inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
58 inline CreateCapacityReservationRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
59 inline CreateCapacityReservationRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
60 inline CreateCapacityReservationRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
62
64
69 inline const Aws::String& GetInstanceType() const{ return m_instanceType; }
70 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
71 inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
72 inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
73 inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); }
75 inline CreateCapacityReservationRequest& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;}
76 inline CreateCapacityReservationRequest& WithInstanceType(const char* value) { SetInstanceType(value); return *this;}
78
80
83 inline const CapacityReservationInstancePlatform& GetInstancePlatform() const{ return m_instancePlatform; }
84 inline bool InstancePlatformHasBeenSet() const { return m_instancePlatformHasBeenSet; }
85 inline void SetInstancePlatform(const CapacityReservationInstancePlatform& value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = value; }
86 inline void SetInstancePlatform(CapacityReservationInstancePlatform&& value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = std::move(value); }
90
92
95 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
96 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
97 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
98 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
99 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
102 inline CreateCapacityReservationRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
104
106
110 inline const Aws::String& GetAvailabilityZoneId() const{ return m_availabilityZoneId; }
111 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
112 inline void SetAvailabilityZoneId(const Aws::String& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = value; }
113 inline void SetAvailabilityZoneId(Aws::String&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::move(value); }
114 inline void SetAvailabilityZoneId(const char* value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId.assign(value); }
117 inline CreateCapacityReservationRequest& WithAvailabilityZoneId(const char* value) { SetAvailabilityZoneId(value); return *this;}
119
121
130 inline const CapacityReservationTenancy& GetTenancy() const{ return m_tenancy; }
131 inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; }
132 inline void SetTenancy(const CapacityReservationTenancy& value) { m_tenancyHasBeenSet = true; m_tenancy = value; }
133 inline void SetTenancy(CapacityReservationTenancy&& value) { m_tenancyHasBeenSet = true; m_tenancy = std::move(value); }
135 inline CreateCapacityReservationRequest& WithTenancy(CapacityReservationTenancy&& value) { SetTenancy(std::move(value)); return *this;}
137
139
143 inline int GetInstanceCount() const{ return m_instanceCount; }
144 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
145 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
146 inline CreateCapacityReservationRequest& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
148
150
157 inline bool GetEbsOptimized() const{ return m_ebsOptimized; }
158 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
159 inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; }
160 inline CreateCapacityReservationRequest& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;}
162
164
167 inline bool GetEphemeralStorage() const{ return m_ephemeralStorage; }
168 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
169 inline void SetEphemeralStorage(bool value) { m_ephemeralStorageHasBeenSet = true; m_ephemeralStorage = value; }
172
174
187 inline const Aws::Utils::DateTime& GetEndDate() const{ return m_endDate; }
188 inline bool EndDateHasBeenSet() const { return m_endDateHasBeenSet; }
189 inline void SetEndDate(const Aws::Utils::DateTime& value) { m_endDateHasBeenSet = true; m_endDate = value; }
190 inline void SetEndDate(Aws::Utils::DateTime&& value) { m_endDateHasBeenSet = true; m_endDate = std::move(value); }
192 inline CreateCapacityReservationRequest& WithEndDate(Aws::Utils::DateTime&& value) { SetEndDate(std::move(value)); return *this;}
194
196
206 inline const EndDateType& GetEndDateType() const{ return m_endDateType; }
207 inline bool EndDateTypeHasBeenSet() const { return m_endDateTypeHasBeenSet; }
208 inline void SetEndDateType(const EndDateType& value) { m_endDateTypeHasBeenSet = true; m_endDateType = value; }
209 inline void SetEndDateType(EndDateType&& value) { m_endDateTypeHasBeenSet = true; m_endDateType = std::move(value); }
210 inline CreateCapacityReservationRequest& WithEndDateType(const EndDateType& value) { SetEndDateType(value); return *this;}
211 inline CreateCapacityReservationRequest& WithEndDateType(EndDateType&& value) { SetEndDateType(std::move(value)); return *this;}
213
215
227 inline const InstanceMatchCriteria& GetInstanceMatchCriteria() const{ return m_instanceMatchCriteria; }
228 inline bool InstanceMatchCriteriaHasBeenSet() const { return m_instanceMatchCriteriaHasBeenSet; }
229 inline void SetInstanceMatchCriteria(const InstanceMatchCriteria& value) { m_instanceMatchCriteriaHasBeenSet = true; m_instanceMatchCriteria = value; }
230 inline void SetInstanceMatchCriteria(InstanceMatchCriteria&& value) { m_instanceMatchCriteriaHasBeenSet = true; m_instanceMatchCriteria = std::move(value); }
234
236
239 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
240 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
241 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
242 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
245 inline CreateCapacityReservationRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
246 inline CreateCapacityReservationRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
248
250
256 inline bool GetDryRun() const{ return m_dryRun; }
257 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
258 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
259 inline CreateCapacityReservationRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
261
263
267 inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; }
268 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
269 inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; }
270 inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); }
271 inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); }
272 inline CreateCapacityReservationRequest& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;}
273 inline CreateCapacityReservationRequest& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;}
274 inline CreateCapacityReservationRequest& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;}
276
278
285 inline const Aws::String& GetPlacementGroupArn() const{ return m_placementGroupArn; }
286 inline bool PlacementGroupArnHasBeenSet() const { return m_placementGroupArnHasBeenSet; }
287 inline void SetPlacementGroupArn(const Aws::String& value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn = value; }
288 inline void SetPlacementGroupArn(Aws::String&& value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn = std::move(value); }
289 inline void SetPlacementGroupArn(const char* value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn.assign(value); }
292 inline CreateCapacityReservationRequest& WithPlacementGroupArn(const char* value) { SetPlacementGroupArn(value); return *this;}
294 private:
295
296 Aws::String m_clientToken;
297 bool m_clientTokenHasBeenSet = false;
298
299 Aws::String m_instanceType;
300 bool m_instanceTypeHasBeenSet = false;
301
302 CapacityReservationInstancePlatform m_instancePlatform;
303 bool m_instancePlatformHasBeenSet = false;
304
305 Aws::String m_availabilityZone;
306 bool m_availabilityZoneHasBeenSet = false;
307
308 Aws::String m_availabilityZoneId;
309 bool m_availabilityZoneIdHasBeenSet = false;
310
312 bool m_tenancyHasBeenSet = false;
313
314 int m_instanceCount;
315 bool m_instanceCountHasBeenSet = false;
316
317 bool m_ebsOptimized;
318 bool m_ebsOptimizedHasBeenSet = false;
319
320 bool m_ephemeralStorage;
321 bool m_ephemeralStorageHasBeenSet = false;
322
323 Aws::Utils::DateTime m_endDate;
324 bool m_endDateHasBeenSet = false;
325
326 EndDateType m_endDateType;
327 bool m_endDateTypeHasBeenSet = false;
328
329 InstanceMatchCriteria m_instanceMatchCriteria;
330 bool m_instanceMatchCriteriaHasBeenSet = false;
331
332 Aws::Vector<TagSpecification> m_tagSpecifications;
333 bool m_tagSpecificationsHasBeenSet = false;
334
335 bool m_dryRun;
336 bool m_dryRunHasBeenSet = false;
337
338 Aws::String m_outpostArn;
339 bool m_outpostArnHasBeenSet = false;
340
341 Aws::String m_placementGroupArn;
342 bool m_placementGroupArnHasBeenSet = false;
343 };
344
345} // namespace Model
346} // namespace EC2
347} // namespace Aws
CreateCapacityReservationRequest & WithOutpostArn(const Aws::String &value)
CreateCapacityReservationRequest & WithInstanceCount(int value)
CreateCapacityReservationRequest & WithClientToken(const Aws::String &value)
CreateCapacityReservationRequest & WithAvailabilityZoneId(const Aws::String &value)
CreateCapacityReservationRequest & WithInstanceType(const char *value)
CreateCapacityReservationRequest & WithInstanceMatchCriteria(const InstanceMatchCriteria &value)
CreateCapacityReservationRequest & WithAvailabilityZone(Aws::String &&value)
CreateCapacityReservationRequest & WithInstancePlatform(CapacityReservationInstancePlatform &&value)
CreateCapacityReservationRequest & AddTagSpecifications(TagSpecification &&value)
CreateCapacityReservationRequest & WithEndDateType(const EndDateType &value)
void SetInstancePlatform(CapacityReservationInstancePlatform &&value)
CreateCapacityReservationRequest & WithEndDate(const Aws::Utils::DateTime &value)
CreateCapacityReservationRequest & WithAvailabilityZoneId(Aws::String &&value)
CreateCapacityReservationRequest & WithAvailabilityZone(const Aws::String &value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateCapacityReservationRequest & WithOutpostArn(const char *value)
CreateCapacityReservationRequest & WithPlacementGroupArn(const char *value)
void SetTenancy(const CapacityReservationTenancy &value)
void SetInstanceMatchCriteria(const InstanceMatchCriteria &value)
CreateCapacityReservationRequest & WithEphemeralStorage(bool value)
CreateCapacityReservationRequest & WithEbsOptimized(bool value)
CreateCapacityReservationRequest & WithAvailabilityZoneId(const char *value)
CreateCapacityReservationRequest & WithInstanceType(const Aws::String &value)
CreateCapacityReservationRequest & WithClientToken(const char *value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CreateCapacityReservationRequest & WithOutpostArn(Aws::String &&value)
CreateCapacityReservationRequest & WithTenancy(const CapacityReservationTenancy &value)
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateCapacityReservationRequest & WithPlacementGroupArn(Aws::String &&value)
CreateCapacityReservationRequest & WithEndDateType(EndDateType &&value)
CreateCapacityReservationRequest & WithInstanceType(Aws::String &&value)
const CapacityReservationInstancePlatform & GetInstancePlatform() const
CreateCapacityReservationRequest & WithInstancePlatform(const CapacityReservationInstancePlatform &value)
CreateCapacityReservationRequest & WithClientToken(Aws::String &&value)
CreateCapacityReservationRequest & WithPlacementGroupArn(const Aws::String &value)
CreateCapacityReservationRequest & WithInstanceMatchCriteria(InstanceMatchCriteria &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateCapacityReservationRequest & AddTagSpecifications(const TagSpecification &value)
void SetInstancePlatform(const CapacityReservationInstancePlatform &value)
CreateCapacityReservationRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateCapacityReservationRequest & WithAvailabilityZone(const char *value)
CreateCapacityReservationRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
CreateCapacityReservationRequest & WithDryRun(bool value)
CreateCapacityReservationRequest & WithEndDate(Aws::Utils::DateTime &&value)
CreateCapacityReservationRequest & WithTenancy(CapacityReservationTenancy &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector