AWS SDK for C++

AWS SDK for C++ Version 1.11.906

Loading...
Searching...
No Matches
CreateImageRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/BlockDeviceMapping.h>
12#include <aws/ec2/model/BootModeOverrideValues.h>
13#include <aws/ec2/model/SnapshotLocationEnum.h>
14#include <aws/ec2/model/TagSpecification.h>
15
16#include <utility>
17
18namespace Aws {
19namespace EC2 {
20namespace Model {
21
25 public:
26 AWS_EC2_API CreateImageRequest() = 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 "CreateImage"; }
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
54 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
55 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
56 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
57 void SetTagSpecifications(TagSpecificationsT&& value) {
58 m_tagSpecificationsHasBeenSet = true;
59 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
60 }
61 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
62 CreateImageRequest& WithTagSpecifications(TagSpecificationsT&& value) {
63 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
64 return *this;
65 }
66 template <typename TagSpecificationsT = TagSpecification>
67 CreateImageRequest& AddTagSpecifications(TagSpecificationsT&& value) {
68 m_tagSpecificationsHasBeenSet = true;
69 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
70 return *this;
71 }
73
75
90 inline SnapshotLocationEnum GetSnapshotLocation() const { return m_snapshotLocation; }
91 inline bool SnapshotLocationHasBeenSet() const { return m_snapshotLocationHasBeenSet; }
93 m_snapshotLocationHasBeenSet = true;
94 m_snapshotLocation = value;
95 }
98 return *this;
99 }
101
103
118 inline BootModeOverrideValues GetBootModeOverride() const { return m_bootModeOverride; }
119 inline bool BootModeOverrideHasBeenSet() const { return m_bootModeOverrideHasBeenSet; }
121 m_bootModeOverrideHasBeenSet = true;
122 m_bootModeOverride = value;
123 }
125 SetBootModeOverride(value);
126 return *this;
127 }
129
131
137 inline bool GetDryRun() const { return m_dryRun; }
138 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
139 inline void SetDryRun(bool value) {
140 m_dryRunHasBeenSet = true;
141 m_dryRun = value;
142 }
143 inline CreateImageRequest& WithDryRun(bool value) {
144 SetDryRun(value);
145 return *this;
146 }
148
150
153 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
154 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
155 template <typename InstanceIdT = Aws::String>
156 void SetInstanceId(InstanceIdT&& value) {
157 m_instanceIdHasBeenSet = true;
158 m_instanceId = std::forward<InstanceIdT>(value);
159 }
160 template <typename InstanceIdT = Aws::String>
161 CreateImageRequest& WithInstanceId(InstanceIdT&& value) {
162 SetInstanceId(std::forward<InstanceIdT>(value));
163 return *this;
164 }
166
168
173 inline const Aws::String& GetName() const { return m_name; }
174 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
175 template <typename NameT = Aws::String>
176 void SetName(NameT&& value) {
177 m_nameHasBeenSet = true;
178 m_name = std::forward<NameT>(value);
179 }
180 template <typename NameT = Aws::String>
181 CreateImageRequest& WithName(NameT&& value) {
182 SetName(std::forward<NameT>(value));
183 return *this;
184 }
186
188
191 inline const Aws::String& GetDescription() const { return m_description; }
192 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
193 template <typename DescriptionT = Aws::String>
194 void SetDescription(DescriptionT&& value) {
195 m_descriptionHasBeenSet = true;
196 m_description = std::forward<DescriptionT>(value);
197 }
198 template <typename DescriptionT = Aws::String>
199 CreateImageRequest& WithDescription(DescriptionT&& value) {
200 SetDescription(std::forward<DescriptionT>(value));
201 return *this;
202 }
204
206
218 inline bool GetNoReboot() const { return m_noReboot; }
219 inline bool NoRebootHasBeenSet() const { return m_noRebootHasBeenSet; }
220 inline void SetNoReboot(bool value) {
221 m_noRebootHasBeenSet = true;
222 m_noReboot = value;
223 }
224 inline CreateImageRequest& WithNoReboot(bool value) {
225 SetNoReboot(value);
226 return *this;
227 }
229
231
243 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
244 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
245 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
246 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) {
247 m_blockDeviceMappingsHasBeenSet = true;
248 m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value);
249 }
250 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
251 CreateImageRequest& WithBlockDeviceMappings(BlockDeviceMappingsT&& value) {
252 SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value));
253 return *this;
254 }
255 template <typename BlockDeviceMappingsT = BlockDeviceMapping>
256 CreateImageRequest& AddBlockDeviceMappings(BlockDeviceMappingsT&& value) {
257 m_blockDeviceMappingsHasBeenSet = true;
258 m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value));
259 return *this;
260 }
262 private:
263 Aws::Vector<TagSpecification> m_tagSpecifications;
264
266
268
269 bool m_dryRun{false};
270
271 Aws::String m_instanceId;
272
273 Aws::String m_name;
274
275 Aws::String m_description;
276
277 bool m_noReboot{false};
278
279 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
280 bool m_tagSpecificationsHasBeenSet = false;
281 bool m_snapshotLocationHasBeenSet = false;
282 bool m_bootModeOverrideHasBeenSet = false;
283 bool m_dryRunHasBeenSet = false;
284 bool m_instanceIdHasBeenSet = false;
285 bool m_nameHasBeenSet = false;
286 bool m_descriptionHasBeenSet = false;
287 bool m_noRebootHasBeenSet = false;
288 bool m_blockDeviceMappingsHasBeenSet = false;
289};
290
291} // namespace Model
292} // namespace EC2
293} // namespace Aws
CreateImageRequest & WithSnapshotLocation(SnapshotLocationEnum value)
CreateImageRequest & AddBlockDeviceMappings(BlockDeviceMappingsT &&value)
CreateImageRequest & WithTagSpecifications(TagSpecificationsT &&value)
CreateImageRequest & WithInstanceId(InstanceIdT &&value)
void SetInstanceId(InstanceIdT &&value)
CreateImageRequest & WithName(NameT &&value)
CreateImageRequest & WithDescription(DescriptionT &&value)
AWS_EC2_API CreateImageRequest()=default
CreateImageRequest & AddTagSpecifications(TagSpecificationsT &&value)
SnapshotLocationEnum GetSnapshotLocation() const
virtual const char * GetServiceRequestName() const override
const Aws::String & GetDescription() const
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
CreateImageRequest & WithBootModeOverride(BootModeOverrideValues value)
CreateImageRequest & WithNoReboot(bool value)
void SetBootModeOverride(BootModeOverrideValues value)
CreateImageRequest & WithBlockDeviceMappings(BlockDeviceMappingsT &&value)
const Aws::String & GetName() const
CreateImageRequest & WithDryRun(bool value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetSnapshotLocation(SnapshotLocationEnum value)
void SetBlockDeviceMappings(BlockDeviceMappingsT &&value)
void SetDescription(DescriptionT &&value)
void SetTagSpecifications(TagSpecificationsT &&value)
BootModeOverrideValues GetBootModeOverride() const
AWS_EC2_API Aws::String SerializePayload() const override
const Aws::String & GetInstanceId() const
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector