AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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/TagSpecification.h>
13#include <utility>
14#include <aws/core/utils/UUID.h>
15
16namespace Aws
17{
18namespace EC2
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_EC2_API CreateVolumeRequest();
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateVolume"; }
35
36 AWS_EC2_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40
41 public:
42
44
48 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
49 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
50 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
51 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
52 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
53 inline CreateVolumeRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
54 inline CreateVolumeRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
55 inline CreateVolumeRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
57
59
71 inline bool GetEncrypted() const{ return m_encrypted; }
72 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
73 inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
74 inline CreateVolumeRequest& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
76
78
95 inline int GetIops() const{ return m_iops; }
96 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
97 inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }
98 inline CreateVolumeRequest& WithIops(int value) { SetIops(value); return *this;}
100
102
117 inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
118 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
119 inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
120 inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }
121 inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
122 inline CreateVolumeRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
123 inline CreateVolumeRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
124 inline CreateVolumeRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
126
128
135 inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; }
136 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
137 inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; }
138 inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); }
139 inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); }
140 inline CreateVolumeRequest& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;}
141 inline CreateVolumeRequest& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;}
142 inline CreateVolumeRequest& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;}
144
146
157 inline int GetSize() const{ return m_size; }
158 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
159 inline void SetSize(int value) { m_sizeHasBeenSet = true; m_size = value; }
160 inline CreateVolumeRequest& WithSize(int value) { SetSize(value); return *this;}
162
164
168 inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
169 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
170 inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
171 inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); }
172 inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
173 inline CreateVolumeRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
174 inline CreateVolumeRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;}
175 inline CreateVolumeRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
177
179
192 inline const VolumeType& GetVolumeType() const{ return m_volumeType; }
193 inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
194 inline void SetVolumeType(const VolumeType& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
195 inline void SetVolumeType(VolumeType&& value) { m_volumeTypeHasBeenSet = true; m_volumeType = std::move(value); }
196 inline CreateVolumeRequest& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;}
197 inline CreateVolumeRequest& WithVolumeType(VolumeType&& value) { SetVolumeType(std::move(value)); return *this;}
199
201
204 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
205 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
206 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
207 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
210 inline CreateVolumeRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
211 inline CreateVolumeRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
213
215
225 inline bool GetMultiAttachEnabled() const{ return m_multiAttachEnabled; }
226 inline bool MultiAttachEnabledHasBeenSet() const { return m_multiAttachEnabledHasBeenSet; }
227 inline void SetMultiAttachEnabled(bool value) { m_multiAttachEnabledHasBeenSet = true; m_multiAttachEnabled = value; }
228 inline CreateVolumeRequest& WithMultiAttachEnabled(bool value) { SetMultiAttachEnabled(value); return *this;}
230
232
237 inline int GetThroughput() const{ return m_throughput; }
238 inline bool ThroughputHasBeenSet() const { return m_throughputHasBeenSet; }
239 inline void SetThroughput(int value) { m_throughputHasBeenSet = true; m_throughput = value; }
240 inline CreateVolumeRequest& WithThroughput(int value) { SetThroughput(value); return *this;}
242
244
250 inline const Aws::String& GetClientToken() const{ return m_clientToken; }
251 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
252 inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
253 inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
254 inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
255 inline CreateVolumeRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
256 inline CreateVolumeRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
257 inline CreateVolumeRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
259
261
267 inline bool GetDryRun() const{ return m_dryRun; }
268 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
269 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
270 inline CreateVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
272 private:
273
274 Aws::String m_availabilityZone;
275 bool m_availabilityZoneHasBeenSet = false;
276
277 bool m_encrypted;
278 bool m_encryptedHasBeenSet = false;
279
280 int m_iops;
281 bool m_iopsHasBeenSet = false;
282
283 Aws::String m_kmsKeyId;
284 bool m_kmsKeyIdHasBeenSet = false;
285
286 Aws::String m_outpostArn;
287 bool m_outpostArnHasBeenSet = false;
288
289 int m_size;
290 bool m_sizeHasBeenSet = false;
291
292 Aws::String m_snapshotId;
293 bool m_snapshotIdHasBeenSet = false;
294
295 VolumeType m_volumeType;
296 bool m_volumeTypeHasBeenSet = false;
297
298 Aws::Vector<TagSpecification> m_tagSpecifications;
299 bool m_tagSpecificationsHasBeenSet = false;
300
301 bool m_multiAttachEnabled;
302 bool m_multiAttachEnabledHasBeenSet = false;
303
304 int m_throughput;
305 bool m_throughputHasBeenSet = false;
306
307 Aws::String m_clientToken;
308 bool m_clientTokenHasBeenSet = false;
309
310 bool m_dryRun;
311 bool m_dryRunHasBeenSet = false;
312 };
313
314} // namespace Model
315} // namespace EC2
316} // namespace Aws
const Aws::String & GetKmsKeyId() const
void SetClientToken(const Aws::String &value)
void SetVolumeType(const VolumeType &value)
CreateVolumeRequest & AddTagSpecifications(const TagSpecification &value)
CreateVolumeRequest & WithSnapshotId(Aws::String &&value)
CreateVolumeRequest & WithOutpostArn(const Aws::String &value)
CreateVolumeRequest & WithClientToken(Aws::String &&value)
void SetAvailabilityZone(const Aws::String &value)
const Aws::String & GetOutpostArn() const
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateVolumeRequest & WithDryRun(bool value)
const Aws::String & GetAvailabilityZone() const
void SetAvailabilityZone(const char *value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CreateVolumeRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
CreateVolumeRequest & WithAvailabilityZone(const char *value)
CreateVolumeRequest & WithOutpostArn(Aws::String &&value)
CreateVolumeRequest & WithKmsKeyId(Aws::String &&value)
CreateVolumeRequest & WithOutpostArn(const char *value)
CreateVolumeRequest & AddTagSpecifications(TagSpecification &&value)
CreateVolumeRequest & WithClientToken(const char *value)
CreateVolumeRequest & WithSnapshotId(const Aws::String &value)
void SetAvailabilityZone(Aws::String &&value)
void SetOutpostArn(const Aws::String &value)
CreateVolumeRequest & WithAvailabilityZone(const Aws::String &value)
CreateVolumeRequest & WithKmsKeyId(const Aws::String &value)
CreateVolumeRequest & WithAvailabilityZone(Aws::String &&value)
CreateVolumeRequest & WithEncrypted(bool value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateVolumeRequest & WithClientToken(const Aws::String &value)
const Aws::String & GetSnapshotId() const
CreateVolumeRequest & WithVolumeType(VolumeType &&value)
CreateVolumeRequest & WithKmsKeyId(const char *value)
CreateVolumeRequest & WithSize(int value)
const VolumeType & GetVolumeType() const
virtual const char * GetServiceRequestName() const override
void SetSnapshotId(const Aws::String &value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateVolumeRequest & WithVolumeType(const VolumeType &value)
CreateVolumeRequest & WithSnapshotId(const char *value)
CreateVolumeRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateVolumeRequest & WithIops(int value)
CreateVolumeRequest & WithThroughput(int value)
const Aws::String & GetClientToken() const
CreateVolumeRequest & WithMultiAttachEnabled(bool value)
void SetKmsKeyId(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector