AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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
49 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
50 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
51 template<typename AvailabilityZoneT = Aws::String>
52 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
53 template<typename AvailabilityZoneT = Aws::String>
54 CreateVolumeRequest& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
56
58
70 inline bool GetEncrypted() const { return m_encrypted; }
71 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
72 inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
73 inline CreateVolumeRequest& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
75
77
94 inline int GetIops() const { return m_iops; }
95 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
96 inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }
97 inline CreateVolumeRequest& WithIops(int value) { SetIops(value); return *this;}
99
101
116 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
117 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
118 template<typename KmsKeyIdT = Aws::String>
119 void SetKmsKeyId(KmsKeyIdT&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::forward<KmsKeyIdT>(value); }
120 template<typename KmsKeyIdT = Aws::String>
121 CreateVolumeRequest& WithKmsKeyId(KmsKeyIdT&& value) { SetKmsKeyId(std::forward<KmsKeyIdT>(value)); return *this;}
123
125
132 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
133 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
134 template<typename OutpostArnT = Aws::String>
135 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
136 template<typename OutpostArnT = Aws::String>
137 CreateVolumeRequest& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
139
141
152 inline int GetSize() const { return m_size; }
153 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
154 inline void SetSize(int value) { m_sizeHasBeenSet = true; m_size = value; }
155 inline CreateVolumeRequest& WithSize(int value) { SetSize(value); return *this;}
157
159
163 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
164 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
165 template<typename SnapshotIdT = Aws::String>
166 void SetSnapshotId(SnapshotIdT&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::forward<SnapshotIdT>(value); }
167 template<typename SnapshotIdT = Aws::String>
168 CreateVolumeRequest& WithSnapshotId(SnapshotIdT&& value) { SetSnapshotId(std::forward<SnapshotIdT>(value)); return *this;}
170
172
185 inline VolumeType GetVolumeType() const { return m_volumeType; }
186 inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
187 inline void SetVolumeType(VolumeType value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
188 inline CreateVolumeRequest& WithVolumeType(VolumeType value) { SetVolumeType(value); return *this;}
190
192
195 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
196 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
197 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
198 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
199 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
200 CreateVolumeRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
201 template<typename TagSpecificationsT = TagSpecification>
202 CreateVolumeRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
204
206
216 inline bool GetMultiAttachEnabled() const { return m_multiAttachEnabled; }
217 inline bool MultiAttachEnabledHasBeenSet() const { return m_multiAttachEnabledHasBeenSet; }
218 inline void SetMultiAttachEnabled(bool value) { m_multiAttachEnabledHasBeenSet = true; m_multiAttachEnabled = value; }
219 inline CreateVolumeRequest& WithMultiAttachEnabled(bool value) { SetMultiAttachEnabled(value); return *this;}
221
223
228 inline int GetThroughput() const { return m_throughput; }
229 inline bool ThroughputHasBeenSet() const { return m_throughputHasBeenSet; }
230 inline void SetThroughput(int value) { m_throughputHasBeenSet = true; m_throughput = value; }
231 inline CreateVolumeRequest& WithThroughput(int value) { SetThroughput(value); return *this;}
233
235
241 inline const Aws::String& GetClientToken() const { return m_clientToken; }
242 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
243 template<typename ClientTokenT = Aws::String>
244 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
245 template<typename ClientTokenT = Aws::String>
246 CreateVolumeRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
248
250
268 inline int GetVolumeInitializationRate() const { return m_volumeInitializationRate; }
269 inline bool VolumeInitializationRateHasBeenSet() const { return m_volumeInitializationRateHasBeenSet; }
270 inline void SetVolumeInitializationRate(int value) { m_volumeInitializationRateHasBeenSet = true; m_volumeInitializationRate = value; }
273
275
278 inline const OperatorRequest& GetOperator() const { return m_operator; }
279 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
280 template<typename OperatorT = OperatorRequest>
281 void SetOperator(OperatorT&& value) { m_operatorHasBeenSet = true; m_operator = std::forward<OperatorT>(value); }
282 template<typename OperatorT = OperatorRequest>
283 CreateVolumeRequest& WithOperator(OperatorT&& value) { SetOperator(std::forward<OperatorT>(value)); return *this;}
285
287
293 inline bool GetDryRun() const { return m_dryRun; }
294 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
295 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
296 inline CreateVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
298 private:
299
300 Aws::String m_availabilityZone;
301 bool m_availabilityZoneHasBeenSet = false;
302
303 bool m_encrypted{false};
304 bool m_encryptedHasBeenSet = false;
305
306 int m_iops{0};
307 bool m_iopsHasBeenSet = false;
308
309 Aws::String m_kmsKeyId;
310 bool m_kmsKeyIdHasBeenSet = false;
311
312 Aws::String m_outpostArn;
313 bool m_outpostArnHasBeenSet = false;
314
315 int m_size{0};
316 bool m_sizeHasBeenSet = false;
317
318 Aws::String m_snapshotId;
319 bool m_snapshotIdHasBeenSet = false;
320
321 VolumeType m_volumeType{VolumeType::NOT_SET};
322 bool m_volumeTypeHasBeenSet = false;
323
324 Aws::Vector<TagSpecification> m_tagSpecifications;
325 bool m_tagSpecificationsHasBeenSet = false;
326
327 bool m_multiAttachEnabled{false};
328 bool m_multiAttachEnabledHasBeenSet = false;
329
330 int m_throughput{0};
331 bool m_throughputHasBeenSet = false;
332
334 bool m_clientTokenHasBeenSet = true;
335
336 int m_volumeInitializationRate{0};
337 bool m_volumeInitializationRateHasBeenSet = false;
338
339 OperatorRequest m_operator;
340 bool m_operatorHasBeenSet = false;
341
342 bool m_dryRun{false};
343 bool m_dryRunHasBeenSet = false;
344 };
345
346} // namespace Model
347} // namespace EC2
348} // namespace Aws
const Aws::String & GetKmsKeyId() const
CreateVolumeRequest & WithClientToken(ClientTokenT &&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