AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateVolumeRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.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/OperatorRequest.h>
13#include <aws/ec2/model/TagSpecification.h>
14#include <aws/ec2/model/VolumeType.h>
15
16#include <utility>
17
18namespace Aws {
19namespace EC2 {
20namespace Model {
21
25 public:
26 AWS_EC2_API CreateVolumeRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateVolume"; }
33
34 AWS_EC2_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
38
39 public:
41
46 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
47 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
48 template <typename AvailabilityZoneT = Aws::String>
49 void SetAvailabilityZone(AvailabilityZoneT&& value) {
50 m_availabilityZoneHasBeenSet = true;
51 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
52 }
53 template <typename AvailabilityZoneT = Aws::String>
54 CreateVolumeRequest& WithAvailabilityZone(AvailabilityZoneT&& value) {
55 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
56 return *this;
57 }
59
61
66 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
67 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
68 template <typename AvailabilityZoneIdT = Aws::String>
69 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
70 m_availabilityZoneIdHasBeenSet = true;
71 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
72 }
73 template <typename AvailabilityZoneIdT = Aws::String>
74 CreateVolumeRequest& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
75 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
76 return *this;
77 }
79
81
93 inline bool GetEncrypted() const { return m_encrypted; }
94 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
95 inline void SetEncrypted(bool value) {
96 m_encryptedHasBeenSet = true;
97 m_encrypted = value;
98 }
99 inline CreateVolumeRequest& WithEncrypted(bool value) {
100 SetEncrypted(value);
101 return *this;
102 }
104
106
117 inline int GetIops() const { return m_iops; }
118 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
119 inline void SetIops(int value) {
120 m_iopsHasBeenSet = true;
121 m_iops = value;
122 }
123 inline CreateVolumeRequest& WithIops(int value) {
124 SetIops(value);
125 return *this;
126 }
128
130
145 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
146 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
147 template <typename KmsKeyIdT = Aws::String>
148 void SetKmsKeyId(KmsKeyIdT&& value) {
149 m_kmsKeyIdHasBeenSet = true;
150 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
151 }
152 template <typename KmsKeyIdT = Aws::String>
153 CreateVolumeRequest& WithKmsKeyId(KmsKeyIdT&& value) {
154 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
155 return *this;
156 }
158
160
167 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
168 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
169 template <typename OutpostArnT = Aws::String>
170 void SetOutpostArn(OutpostArnT&& value) {
171 m_outpostArnHasBeenSet = true;
172 m_outpostArn = std::forward<OutpostArnT>(value);
173 }
174 template <typename OutpostArnT = Aws::String>
175 CreateVolumeRequest& WithOutpostArn(OutpostArnT&& value) {
176 SetOutpostArn(std::forward<OutpostArnT>(value));
177 return *this;
178 }
180
182
192 inline int GetSize() const { return m_size; }
193 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
194 inline void SetSize(int value) {
195 m_sizeHasBeenSet = true;
196 m_size = value;
197 }
198 inline CreateVolumeRequest& WithSize(int value) {
199 SetSize(value);
200 return *this;
201 }
203
205
209 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
210 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
211 template <typename SnapshotIdT = Aws::String>
212 void SetSnapshotId(SnapshotIdT&& value) {
213 m_snapshotIdHasBeenSet = true;
214 m_snapshotId = std::forward<SnapshotIdT>(value);
215 }
216 template <typename SnapshotIdT = Aws::String>
217 CreateVolumeRequest& WithSnapshotId(SnapshotIdT&& value) {
218 SetSnapshotId(std::forward<SnapshotIdT>(value));
219 return *this;
220 }
222
224
237 inline VolumeType GetVolumeType() const { return m_volumeType; }
238 inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
239 inline void SetVolumeType(VolumeType value) {
240 m_volumeTypeHasBeenSet = true;
241 m_volumeType = value;
242 }
244 SetVolumeType(value);
245 return *this;
246 }
248
250
253 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
254 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
255 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
256 void SetTagSpecifications(TagSpecificationsT&& value) {
257 m_tagSpecificationsHasBeenSet = true;
258 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
259 }
260 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
261 CreateVolumeRequest& WithTagSpecifications(TagSpecificationsT&& value) {
262 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
263 return *this;
264 }
265 template <typename TagSpecificationsT = TagSpecification>
266 CreateVolumeRequest& AddTagSpecifications(TagSpecificationsT&& value) {
267 m_tagSpecificationsHasBeenSet = true;
268 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
269 return *this;
270 }
272
274
284 inline bool GetMultiAttachEnabled() const { return m_multiAttachEnabled; }
285 inline bool MultiAttachEnabledHasBeenSet() const { return m_multiAttachEnabledHasBeenSet; }
286 inline void SetMultiAttachEnabled(bool value) {
287 m_multiAttachEnabledHasBeenSet = true;
288 m_multiAttachEnabled = value;
289 }
292 return *this;
293 }
295
297
302 inline int GetThroughput() const { return m_throughput; }
303 inline bool ThroughputHasBeenSet() const { return m_throughputHasBeenSet; }
304 inline void SetThroughput(int value) {
305 m_throughputHasBeenSet = true;
306 m_throughput = value;
307 }
309 SetThroughput(value);
310 return *this;
311 }
313
315
321 inline const Aws::String& GetClientToken() const { return m_clientToken; }
322 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
323 template <typename ClientTokenT = Aws::String>
324 void SetClientToken(ClientTokenT&& value) {
325 m_clientTokenHasBeenSet = true;
326 m_clientToken = std::forward<ClientTokenT>(value);
327 }
328 template <typename ClientTokenT = Aws::String>
329 CreateVolumeRequest& WithClientToken(ClientTokenT&& value) {
330 SetClientToken(std::forward<ClientTokenT>(value));
331 return *this;
332 }
334
336
354 inline int GetVolumeInitializationRate() const { return m_volumeInitializationRate; }
355 inline bool VolumeInitializationRateHasBeenSet() const { return m_volumeInitializationRateHasBeenSet; }
356 inline void SetVolumeInitializationRate(int value) {
357 m_volumeInitializationRateHasBeenSet = true;
358 m_volumeInitializationRate = value;
359 }
362 return *this;
363 }
365
367
370 inline const OperatorRequest& GetOperator() const { return m_operator; }
371 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
372 template <typename OperatorT = OperatorRequest>
373 void SetOperator(OperatorT&& value) {
374 m_operatorHasBeenSet = true;
375 m_operator = std::forward<OperatorT>(value);
376 }
377 template <typename OperatorT = OperatorRequest>
378 CreateVolumeRequest& WithOperator(OperatorT&& value) {
379 SetOperator(std::forward<OperatorT>(value));
380 return *this;
381 }
383
385
391 inline bool GetDryRun() const { return m_dryRun; }
392 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
393 inline void SetDryRun(bool value) {
394 m_dryRunHasBeenSet = true;
395 m_dryRun = value;
396 }
397 inline CreateVolumeRequest& WithDryRun(bool value) {
398 SetDryRun(value);
399 return *this;
400 }
402 private:
403 Aws::String m_availabilityZone;
404
405 Aws::String m_availabilityZoneId;
406
407 bool m_encrypted{false};
408
409 int m_iops{0};
410
411 Aws::String m_kmsKeyId;
412
413 Aws::String m_outpostArn;
414
415 int m_size{0};
416
417 Aws::String m_snapshotId;
418
419 VolumeType m_volumeType{VolumeType::NOT_SET};
420
421 Aws::Vector<TagSpecification> m_tagSpecifications;
422
423 bool m_multiAttachEnabled{false};
424
425 int m_throughput{0};
426
428
429 int m_volumeInitializationRate{0};
430
431 OperatorRequest m_operator;
432
433 bool m_dryRun{false};
434 bool m_availabilityZoneHasBeenSet = false;
435 bool m_availabilityZoneIdHasBeenSet = false;
436 bool m_encryptedHasBeenSet = false;
437 bool m_iopsHasBeenSet = false;
438 bool m_kmsKeyIdHasBeenSet = false;
439 bool m_outpostArnHasBeenSet = false;
440 bool m_sizeHasBeenSet = false;
441 bool m_snapshotIdHasBeenSet = false;
442 bool m_volumeTypeHasBeenSet = false;
443 bool m_tagSpecificationsHasBeenSet = false;
444 bool m_multiAttachEnabledHasBeenSet = false;
445 bool m_throughputHasBeenSet = false;
446 bool m_clientTokenHasBeenSet = true;
447 bool m_volumeInitializationRateHasBeenSet = false;
448 bool m_operatorHasBeenSet = false;
449 bool m_dryRunHasBeenSet = false;
450};
451
452} // namespace Model
453} // namespace EC2
454} // namespace Aws
const Aws::String & GetKmsKeyId() const
CreateVolumeRequest & WithClientToken(ClientTokenT &&value)
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
const Aws::String & GetAvailabilityZoneId() const
CreateVolumeRequest & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
const Aws::String & GetOutpostArn() const
CreateVolumeRequest & WithVolumeType(VolumeType value)
CreateVolumeRequest & WithVolumeInitializationRate(int value)
CreateVolumeRequest & WithDryRun(bool value)
const Aws::String & GetAvailabilityZone() const
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
void SetAvailabilityZone(AvailabilityZoneT &&value)
CreateVolumeRequest & AddTagSpecifications(TagSpecificationsT &&value)
void SetClientToken(ClientTokenT &&value)
CreateVolumeRequest & WithKmsKeyId(KmsKeyIdT &&value)
CreateVolumeRequest & WithEncrypted(bool value)
AWS_EC2_API Aws::String SerializePayload() const override
const Aws::String & GetSnapshotId() const
void SetTagSpecifications(TagSpecificationsT &&value)
CreateVolumeRequest & WithOutpostArn(OutpostArnT &&value)
CreateVolumeRequest & WithSnapshotId(SnapshotIdT &&value)
CreateVolumeRequest & WithSize(int value)
virtual const char * GetServiceRequestName() const override
CreateVolumeRequest & WithAvailabilityZone(AvailabilityZoneT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateVolumeRequest & WithTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API CreateVolumeRequest()=default
const OperatorRequest & GetOperator() const
CreateVolumeRequest & WithIops(int value)
CreateVolumeRequest & WithThroughput(int value)
const Aws::String & GetClientToken() const
CreateVolumeRequest & WithMultiAttachEnabled(bool value)
CreateVolumeRequest & WithOperator(OperatorT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector