AWS SDK for C++

AWS SDK for C++ Version 1.11.716

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
83 inline SnapshotLocationEnum GetSnapshotLocation() const { return m_snapshotLocation; }
84 inline bool SnapshotLocationHasBeenSet() const { return m_snapshotLocationHasBeenSet; }
86 m_snapshotLocationHasBeenSet = true;
87 m_snapshotLocation = value;
88 }
91 return *this;
92 }
94
96
102 inline bool GetDryRun() const { return m_dryRun; }
103 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
104 inline void SetDryRun(bool value) {
105 m_dryRunHasBeenSet = true;
106 m_dryRun = value;
107 }
108 inline CreateImageRequest& WithDryRun(bool value) {
109 SetDryRun(value);
110 return *this;
111 }
113
115
118 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
119 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
120 template <typename InstanceIdT = Aws::String>
121 void SetInstanceId(InstanceIdT&& value) {
122 m_instanceIdHasBeenSet = true;
123 m_instanceId = std::forward<InstanceIdT>(value);
124 }
125 template <typename InstanceIdT = Aws::String>
126 CreateImageRequest& WithInstanceId(InstanceIdT&& value) {
127 SetInstanceId(std::forward<InstanceIdT>(value));
128 return *this;
129 }
131
133
138 inline const Aws::String& GetName() const { return m_name; }
139 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
140 template <typename NameT = Aws::String>
141 void SetName(NameT&& value) {
142 m_nameHasBeenSet = true;
143 m_name = std::forward<NameT>(value);
144 }
145 template <typename NameT = Aws::String>
146 CreateImageRequest& WithName(NameT&& value) {
147 SetName(std::forward<NameT>(value));
148 return *this;
149 }
151
153
156 inline const Aws::String& GetDescription() const { return m_description; }
157 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
158 template <typename DescriptionT = Aws::String>
159 void SetDescription(DescriptionT&& value) {
160 m_descriptionHasBeenSet = true;
161 m_description = std::forward<DescriptionT>(value);
162 }
163 template <typename DescriptionT = Aws::String>
164 CreateImageRequest& WithDescription(DescriptionT&& value) {
165 SetDescription(std::forward<DescriptionT>(value));
166 return *this;
167 }
169
171
183 inline bool GetNoReboot() const { return m_noReboot; }
184 inline bool NoRebootHasBeenSet() const { return m_noRebootHasBeenSet; }
185 inline void SetNoReboot(bool value) {
186 m_noRebootHasBeenSet = true;
187 m_noReboot = value;
188 }
189 inline CreateImageRequest& WithNoReboot(bool value) {
190 SetNoReboot(value);
191 return *this;
192 }
194
196
208 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
209 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
210 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
211 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) {
212 m_blockDeviceMappingsHasBeenSet = true;
213 m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value);
214 }
215 template <typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
216 CreateImageRequest& WithBlockDeviceMappings(BlockDeviceMappingsT&& value) {
217 SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value));
218 return *this;
219 }
220 template <typename BlockDeviceMappingsT = BlockDeviceMapping>
221 CreateImageRequest& AddBlockDeviceMappings(BlockDeviceMappingsT&& value) {
222 m_blockDeviceMappingsHasBeenSet = true;
223 m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value));
224 return *this;
225 }
227 private:
228 Aws::Vector<TagSpecification> m_tagSpecifications;
229
231
232 bool m_dryRun{false};
233
234 Aws::String m_instanceId;
235
236 Aws::String m_name;
237
238 Aws::String m_description;
239
240 bool m_noReboot{false};
241
242 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
243 bool m_tagSpecificationsHasBeenSet = false;
244 bool m_snapshotLocationHasBeenSet = false;
245 bool m_dryRunHasBeenSet = false;
246 bool m_instanceIdHasBeenSet = false;
247 bool m_nameHasBeenSet = false;
248 bool m_descriptionHasBeenSet = false;
249 bool m_noRebootHasBeenSet = false;
250 bool m_blockDeviceMappingsHasBeenSet = false;
251};
252
253} // namespace Model
254} // namespace EC2
255} // 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