AWS SDK for C++

AWS SDK for C++ Version 1.11.632

Loading...
Searching...
No Matches
CreateVolumeRequest.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/VolumeType.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/ec2/model/OperatorRequest.h>
13#include <aws/ec2/model/TagSpecification.h>
14#include <utility>
15#include <aws/core/utils/UUID.h>
16
17namespace Aws
18{
19namespace EC2
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_EC2_API CreateVolumeRequest() = 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 "CreateVolume"; }
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
50 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
51 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
52 template<typename AvailabilityZoneT = Aws::String>
53 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
54 template<typename AvailabilityZoneT = Aws::String>
55 CreateVolumeRequest& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
57
59
64 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
65 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
66 template<typename AvailabilityZoneIdT = Aws::String>
67 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value); }
68 template<typename AvailabilityZoneIdT = Aws::String>
69 CreateVolumeRequest& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) { SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value)); return *this;}
71
73
85 inline bool GetEncrypted() const { return m_encrypted; }
86 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
87 inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
88 inline CreateVolumeRequest& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
90
92
109 inline int GetIops() const { return m_iops; }
110 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
111 inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }
112 inline CreateVolumeRequest& WithIops(int value) { SetIops(value); return *this;}
114
116
131 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
132 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
133 template<typename KmsKeyIdT = Aws::String>
134 void SetKmsKeyId(KmsKeyIdT&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::forward<KmsKeyIdT>(value); }
135 template<typename KmsKeyIdT = Aws::String>
136 CreateVolumeRequest& WithKmsKeyId(KmsKeyIdT&& value) { SetKmsKeyId(std::forward<KmsKeyIdT>(value)); return *this;}
138
140
147 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
148 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
149 template<typename OutpostArnT = Aws::String>
150 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
151 template<typename OutpostArnT = Aws::String>
152 CreateVolumeRequest& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
154
156
167 inline int GetSize() const { return m_size; }
168 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
169 inline void SetSize(int value) { m_sizeHasBeenSet = true; m_size = value; }
170 inline CreateVolumeRequest& WithSize(int value) { SetSize(value); return *this;}
172
174
178 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
179 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
180 template<typename SnapshotIdT = Aws::String>
181 void SetSnapshotId(SnapshotIdT&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::forward<SnapshotIdT>(value); }
182 template<typename SnapshotIdT = Aws::String>
183 CreateVolumeRequest& WithSnapshotId(SnapshotIdT&& value) { SetSnapshotId(std::forward<SnapshotIdT>(value)); return *this;}
185
187
200 inline VolumeType GetVolumeType() const { return m_volumeType; }
201 inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
202 inline void SetVolumeType(VolumeType value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
203 inline CreateVolumeRequest& WithVolumeType(VolumeType value) { SetVolumeType(value); return *this;}
205
207
210 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
211 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
212 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
213 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
214 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
215 CreateVolumeRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
216 template<typename TagSpecificationsT = TagSpecification>
217 CreateVolumeRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
219
221
231 inline bool GetMultiAttachEnabled() const { return m_multiAttachEnabled; }
232 inline bool MultiAttachEnabledHasBeenSet() const { return m_multiAttachEnabledHasBeenSet; }
233 inline void SetMultiAttachEnabled(bool value) { m_multiAttachEnabledHasBeenSet = true; m_multiAttachEnabled = value; }
234 inline CreateVolumeRequest& WithMultiAttachEnabled(bool value) { SetMultiAttachEnabled(value); return *this;}
236
238
243 inline int GetThroughput() const { return m_throughput; }
244 inline bool ThroughputHasBeenSet() const { return m_throughputHasBeenSet; }
245 inline void SetThroughput(int value) { m_throughputHasBeenSet = true; m_throughput = value; }
246 inline CreateVolumeRequest& WithThroughput(int value) { SetThroughput(value); return *this;}
248
250
256 inline const Aws::String& GetClientToken() const { return m_clientToken; }
257 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
258 template<typename ClientTokenT = Aws::String>
259 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
260 template<typename ClientTokenT = Aws::String>
261 CreateVolumeRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
263
265
283 inline int GetVolumeInitializationRate() const { return m_volumeInitializationRate; }
284 inline bool VolumeInitializationRateHasBeenSet() const { return m_volumeInitializationRateHasBeenSet; }
285 inline void SetVolumeInitializationRate(int value) { m_volumeInitializationRateHasBeenSet = true; m_volumeInitializationRate = value; }
288
290
293 inline const OperatorRequest& GetOperator() const { return m_operator; }
294 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
295 template<typename OperatorT = OperatorRequest>
296 void SetOperator(OperatorT&& value) { m_operatorHasBeenSet = true; m_operator = std::forward<OperatorT>(value); }
297 template<typename OperatorT = OperatorRequest>
298 CreateVolumeRequest& WithOperator(OperatorT&& value) { SetOperator(std::forward<OperatorT>(value)); return *this;}
300
302
308 inline bool GetDryRun() const { return m_dryRun; }
309 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
310 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
311 inline CreateVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
313 private:
314
315 Aws::String m_availabilityZone;
316 bool m_availabilityZoneHasBeenSet = false;
317
318 Aws::String m_availabilityZoneId;
319 bool m_availabilityZoneIdHasBeenSet = false;
320
321 bool m_encrypted{false};
322 bool m_encryptedHasBeenSet = false;
323
324 int m_iops{0};
325 bool m_iopsHasBeenSet = false;
326
327 Aws::String m_kmsKeyId;
328 bool m_kmsKeyIdHasBeenSet = false;
329
330 Aws::String m_outpostArn;
331 bool m_outpostArnHasBeenSet = false;
332
333 int m_size{0};
334 bool m_sizeHasBeenSet = false;
335
336 Aws::String m_snapshotId;
337 bool m_snapshotIdHasBeenSet = false;
338
339 VolumeType m_volumeType{VolumeType::NOT_SET};
340 bool m_volumeTypeHasBeenSet = false;
341
342 Aws::Vector<TagSpecification> m_tagSpecifications;
343 bool m_tagSpecificationsHasBeenSet = false;
344
345 bool m_multiAttachEnabled{false};
346 bool m_multiAttachEnabledHasBeenSet = false;
347
348 int m_throughput{0};
349 bool m_throughputHasBeenSet = false;
350
352 bool m_clientTokenHasBeenSet = true;
353
354 int m_volumeInitializationRate{0};
355 bool m_volumeInitializationRateHasBeenSet = false;
356
357 OperatorRequest m_operator;
358 bool m_operatorHasBeenSet = false;
359
360 bool m_dryRun{false};
361 bool m_dryRunHasBeenSet = false;
362 };
363
364} // namespace Model
365} // namespace EC2
366} // 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