AWS SDK for C++

AWS SDK for C++ Version 1.11.874

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/SnapshotLocationEnum.h>
13#include <aws/ec2/model/TagSpecification.h>
14
15#include <utility>
16
17namespace Aws {
18namespace EC2 {
19namespace Model {
20
24 public:
25 AWS_EC2_API CreateImageRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "CreateImage"; }
32
33 AWS_EC2_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
37
38 public:
40
53 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
54 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
55 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
56 void SetTagSpecifications(TagSpecificationsT&& value) {
57 m_tagSpecificationsHasBeenSet = true;
58 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
59 }
60 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
61 CreateImageRequest& WithTagSpecifications(TagSpecificationsT&& value) {
62 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
63 return *this;
64 }
65 template <typename TagSpecificationsT = TagSpecification>
66 CreateImageRequest& AddTagSpecifications(TagSpecificationsT&& value) {
67 m_tagSpecificationsHasBeenSet = true;
68 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
69 return *this;
70 }
72
74
89 inline SnapshotLocationEnum GetSnapshotLocation() const { return m_snapshotLocation; }
90 inline bool SnapshotLocationHasBeenSet() const { return m_snapshotLocationHasBeenSet; }
92 m_snapshotLocationHasBeenSet = true;
93 m_snapshotLocation = value;
94 }
97 return *this;
98 }
100
102
108 inline bool GetDryRun() const { return m_dryRun; }
109 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
110 inline void SetDryRun(bool value) {
111 m_dryRunHasBeenSet = true;
112 m_dryRun = value;
113 }
114 inline CreateImageRequest& WithDryRun(bool value) {
115 SetDryRun(value);
116 return *this;
117 }
119
121
124 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
125 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
126 template <typename InstanceIdT = Aws::String>
127 void SetInstanceId(InstanceIdT&& value) {
128 m_instanceIdHasBeenSet = true;
129 m_instanceId = std::forward<InstanceIdT>(value);
130 }
131 template <typename InstanceIdT = Aws::String>
132 CreateImageRequest& WithInstanceId(InstanceIdT&& value) {
133 SetInstanceId(std::forward<InstanceIdT>(value));
134 return *this;
135 }
137
139
144 inline const Aws::String& GetName() const { return m_name; }
145 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
146 template <typename NameT = Aws::String>
147 void SetName(NameT&& value) {
148 m_nameHasBeenSet = true;
149 m_name = std::forward<NameT>(value);
150 }
151 template <typename NameT = Aws::String>
152 CreateImageRequest& WithName(NameT&& value) {
153 SetName(std::forward<NameT>(value));
154 return *this;
155 }
157
159
162 inline const Aws::String& GetDescription() const { return m_description; }
163 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
164 template <typename DescriptionT = Aws::String>
165 void SetDescription(DescriptionT&& value) {
166 m_descriptionHasBeenSet = true;
167 m_description = std::forward<DescriptionT>(value);
168 }
169 template <typename DescriptionT = Aws::String>
170 CreateImageRequest& WithDescription(DescriptionT&& value) {
171 SetDescription(std::forward<DescriptionT>(value));
172 return *this;
173 }
175
177
189 inline bool GetNoReboot() const { return m_noReboot; }
190 inline bool NoRebootHasBeenSet() const { return m_noRebootHasBeenSet; }
191 inline void SetNoReboot(bool value) {
192 m_noRebootHasBeenSet = true;
193 m_noReboot = value;
194 }
195 inline CreateImageRequest& WithNoReboot(bool value) {
196 SetNoReboot(value);
197 return *this;
198 }
200
202
214 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
215 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
216 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
217 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) {
218 m_blockDeviceMappingsHasBeenSet = true;
219 m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value);
220 }
221 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
222 CreateImageRequest& WithBlockDeviceMappings(BlockDeviceMappingsT&& value) {
223 SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value));
224 return *this;
225 }
226 template <typename BlockDeviceMappingsT = BlockDeviceMapping>
227 CreateImageRequest& AddBlockDeviceMappings(BlockDeviceMappingsT&& value) {
228 m_blockDeviceMappingsHasBeenSet = true;
229 m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value));
230 return *this;
231 }
233 private:
234 Aws::Vector<TagSpecification> m_tagSpecifications;
235
237
238 bool m_dryRun{false};
239
240 Aws::String m_instanceId;
241
242 Aws::String m_name;
243
244 Aws::String m_description;
245
246 bool m_noReboot{false};
247
248 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
249 bool m_tagSpecificationsHasBeenSet = false;
250 bool m_snapshotLocationHasBeenSet = false;
251 bool m_dryRunHasBeenSet = false;
252 bool m_instanceIdHasBeenSet = false;
253 bool m_nameHasBeenSet = false;
254 bool m_descriptionHasBeenSet = false;
255 bool m_noRebootHasBeenSet = false;
256 bool m_blockDeviceMappingsHasBeenSet = false;
257};
258
259} // namespace Model
260} // namespace EC2
261} // 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 & WithNoReboot(bool 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)
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