AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CreateInstancesFromSnapshotRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/lightsail/LightsailRequest.h>
11#include <aws/lightsail/Lightsail_EXPORTS.h>
12#include <aws/lightsail/model/AddOnRequest.h>
13#include <aws/lightsail/model/DiskMap.h>
14#include <aws/lightsail/model/IpAddressType.h>
15#include <aws/lightsail/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Lightsail {
21namespace Model {
22
26 public:
27 AWS_LIGHTSAIL_API CreateInstancesFromSnapshotRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateInstancesFromSnapshot"; }
34
35 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
36
38
40
43 inline const Aws::Vector<Aws::String>& GetInstanceNames() const { return m_instanceNames; }
44 inline bool InstanceNamesHasBeenSet() const { return m_instanceNamesHasBeenSet; }
45 template <typename InstanceNamesT = Aws::Vector<Aws::String>>
46 void SetInstanceNames(InstanceNamesT&& value) {
47 m_instanceNamesHasBeenSet = true;
48 m_instanceNames = std::forward<InstanceNamesT>(value);
49 }
50 template <typename InstanceNamesT = Aws::Vector<Aws::String>>
52 SetInstanceNames(std::forward<InstanceNamesT>(value));
53 return *this;
54 }
55 template <typename InstanceNamesT = Aws::String>
57 m_instanceNamesHasBeenSet = true;
58 m_instanceNames.emplace_back(std::forward<InstanceNamesT>(value));
59 return *this;
60 }
62
64
67 inline const Aws::Map<Aws::String, Aws::Vector<DiskMap>>& GetAttachedDiskMapping() const { return m_attachedDiskMapping; }
68 inline bool AttachedDiskMappingHasBeenSet() const { return m_attachedDiskMappingHasBeenSet; }
69 template <typename AttachedDiskMappingT = Aws::Map<Aws::String, Aws::Vector<DiskMap>>>
70 void SetAttachedDiskMapping(AttachedDiskMappingT&& value) {
71 m_attachedDiskMappingHasBeenSet = true;
72 m_attachedDiskMapping = std::forward<AttachedDiskMappingT>(value);
73 }
74 template <typename AttachedDiskMappingT = Aws::Map<Aws::String, Aws::Vector<DiskMap>>>
76 SetAttachedDiskMapping(std::forward<AttachedDiskMappingT>(value));
77 return *this;
78 }
79 template <typename AttachedDiskMappingKeyT = Aws::String, typename AttachedDiskMappingValueT = Aws::Vector<DiskMap>>
80 CreateInstancesFromSnapshotRequest& AddAttachedDiskMapping(AttachedDiskMappingKeyT&& key, AttachedDiskMappingValueT&& value) {
81 m_attachedDiskMappingHasBeenSet = true;
82 m_attachedDiskMapping.emplace(std::forward<AttachedDiskMappingKeyT>(key), std::forward<AttachedDiskMappingValueT>(value));
83 return *this;
84 }
86
88
96 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
97 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
98 template <typename AvailabilityZoneT = Aws::String>
99 void SetAvailabilityZone(AvailabilityZoneT&& value) {
100 m_availabilityZoneHasBeenSet = true;
101 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
102 }
103 template <typename AvailabilityZoneT = Aws::String>
105 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
106 return *this;
107 }
109
111
119 inline const Aws::String& GetInstanceSnapshotName() const { return m_instanceSnapshotName; }
120 inline bool InstanceSnapshotNameHasBeenSet() const { return m_instanceSnapshotNameHasBeenSet; }
121 template <typename InstanceSnapshotNameT = Aws::String>
122 void SetInstanceSnapshotName(InstanceSnapshotNameT&& value) {
123 m_instanceSnapshotNameHasBeenSet = true;
124 m_instanceSnapshotName = std::forward<InstanceSnapshotNameT>(value);
125 }
126 template <typename InstanceSnapshotNameT = Aws::String>
128 SetInstanceSnapshotName(std::forward<InstanceSnapshotNameT>(value));
129 return *this;
130 }
132
134
138 inline const Aws::String& GetBundleId() const { return m_bundleId; }
139 inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; }
140 template <typename BundleIdT = Aws::String>
141 void SetBundleId(BundleIdT&& value) {
142 m_bundleIdHasBeenSet = true;
143 m_bundleId = std::forward<BundleIdT>(value);
144 }
145 template <typename BundleIdT = Aws::String>
147 SetBundleId(std::forward<BundleIdT>(value));
148 return *this;
149 }
151
153
163 inline const Aws::String& GetUserData() const { return m_userData; }
164 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
165 template <typename UserDataT = Aws::String>
166 void SetUserData(UserDataT&& value) {
167 m_userDataHasBeenSet = true;
168 m_userData = std::forward<UserDataT>(value);
169 }
170 template <typename UserDataT = Aws::String>
172 SetUserData(std::forward<UserDataT>(value));
173 return *this;
174 }
176
178
181 inline const Aws::String& GetKeyPairName() const { return m_keyPairName; }
182 inline bool KeyPairNameHasBeenSet() const { return m_keyPairNameHasBeenSet; }
183 template <typename KeyPairNameT = Aws::String>
184 void SetKeyPairName(KeyPairNameT&& value) {
185 m_keyPairNameHasBeenSet = true;
186 m_keyPairName = std::forward<KeyPairNameT>(value);
187 }
188 template <typename KeyPairNameT = Aws::String>
190 SetKeyPairName(std::forward<KeyPairNameT>(value));
191 return *this;
192 }
194
196
201 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
202 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
203 template <typename TagsT = Aws::Vector<Tag>>
204 void SetTags(TagsT&& value) {
205 m_tagsHasBeenSet = true;
206 m_tags = std::forward<TagsT>(value);
207 }
208 template <typename TagsT = Aws::Vector<Tag>>
210 SetTags(std::forward<TagsT>(value));
211 return *this;
212 }
213 template <typename TagsT = Tag>
215 m_tagsHasBeenSet = true;
216 m_tags.emplace_back(std::forward<TagsT>(value));
217 return *this;
218 }
220
222
226 inline const Aws::Vector<AddOnRequest>& GetAddOns() const { return m_addOns; }
227 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
228 template <typename AddOnsT = Aws::Vector<AddOnRequest>>
229 void SetAddOns(AddOnsT&& value) {
230 m_addOnsHasBeenSet = true;
231 m_addOns = std::forward<AddOnsT>(value);
232 }
233 template <typename AddOnsT = Aws::Vector<AddOnRequest>>
235 SetAddOns(std::forward<AddOnsT>(value));
236 return *this;
237 }
238 template <typename AddOnsT = AddOnRequest>
240 m_addOnsHasBeenSet = true;
241 m_addOns.emplace_back(std::forward<AddOnsT>(value));
242 return *this;
243 }
245
247
253 inline IpAddressType GetIpAddressType() const { return m_ipAddressType; }
254 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
255 inline void SetIpAddressType(IpAddressType value) {
256 m_ipAddressTypeHasBeenSet = true;
257 m_ipAddressType = value;
258 }
260 SetIpAddressType(value);
261 return *this;
262 }
264
266
277 inline const Aws::String& GetSourceInstanceName() const { return m_sourceInstanceName; }
278 inline bool SourceInstanceNameHasBeenSet() const { return m_sourceInstanceNameHasBeenSet; }
279 template <typename SourceInstanceNameT = Aws::String>
280 void SetSourceInstanceName(SourceInstanceNameT&& value) {
281 m_sourceInstanceNameHasBeenSet = true;
282 m_sourceInstanceName = std::forward<SourceInstanceNameT>(value);
283 }
284 template <typename SourceInstanceNameT = Aws::String>
286 SetSourceInstanceName(std::forward<SourceInstanceNameT>(value));
287 return *this;
288 }
290
292
305 inline const Aws::String& GetRestoreDate() const { return m_restoreDate; }
306 inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; }
307 template <typename RestoreDateT = Aws::String>
308 void SetRestoreDate(RestoreDateT&& value) {
309 m_restoreDateHasBeenSet = true;
310 m_restoreDate = std::forward<RestoreDateT>(value);
311 }
312 template <typename RestoreDateT = Aws::String>
314 SetRestoreDate(std::forward<RestoreDateT>(value));
315 return *this;
316 }
318
320
330 inline bool GetUseLatestRestorableAutoSnapshot() const { return m_useLatestRestorableAutoSnapshot; }
331 inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; }
332 inline void SetUseLatestRestorableAutoSnapshot(bool value) {
333 m_useLatestRestorableAutoSnapshotHasBeenSet = true;
334 m_useLatestRestorableAutoSnapshot = value;
335 }
338 return *this;
339 }
341 private:
342 Aws::Vector<Aws::String> m_instanceNames;
343
344 Aws::Map<Aws::String, Aws::Vector<DiskMap>> m_attachedDiskMapping;
345
346 Aws::String m_availabilityZone;
347
348 Aws::String m_instanceSnapshotName;
349
350 Aws::String m_bundleId;
351
352 Aws::String m_userData;
353
354 Aws::String m_keyPairName;
355
356 Aws::Vector<Tag> m_tags;
357
359
360 IpAddressType m_ipAddressType{IpAddressType::NOT_SET};
361
362 Aws::String m_sourceInstanceName;
363
364 Aws::String m_restoreDate;
365
366 bool m_useLatestRestorableAutoSnapshot{false};
367 bool m_instanceNamesHasBeenSet = false;
368 bool m_attachedDiskMappingHasBeenSet = false;
369 bool m_availabilityZoneHasBeenSet = false;
370 bool m_instanceSnapshotNameHasBeenSet = false;
371 bool m_bundleIdHasBeenSet = false;
372 bool m_userDataHasBeenSet = false;
373 bool m_keyPairNameHasBeenSet = false;
374 bool m_tagsHasBeenSet = false;
375 bool m_addOnsHasBeenSet = false;
376 bool m_ipAddressTypeHasBeenSet = false;
377 bool m_sourceInstanceNameHasBeenSet = false;
378 bool m_restoreDateHasBeenSet = false;
379 bool m_useLatestRestorableAutoSnapshotHasBeenSet = false;
380};
381
382} // namespace Model
383} // namespace Lightsail
384} // namespace Aws
CreateInstancesFromSnapshotRequest & WithInstanceNames(InstanceNamesT &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateInstancesFromSnapshotRequest & WithIpAddressType(IpAddressType value)
CreateInstancesFromSnapshotRequest & WithAvailabilityZone(AvailabilityZoneT &&value)
CreateInstancesFromSnapshotRequest & WithAttachedDiskMapping(AttachedDiskMappingT &&value)
CreateInstancesFromSnapshotRequest & WithKeyPairName(KeyPairNameT &&value)
CreateInstancesFromSnapshotRequest & WithRestoreDate(RestoreDateT &&value)
const Aws::Map< Aws::String, Aws::Vector< DiskMap > > & GetAttachedDiskMapping() const
CreateInstancesFromSnapshotRequest & WithInstanceSnapshotName(InstanceSnapshotNameT &&value)
CreateInstancesFromSnapshotRequest & AddAddOns(AddOnsT &&value)
CreateInstancesFromSnapshotRequest & WithAddOns(AddOnsT &&value)
CreateInstancesFromSnapshotRequest & WithUserData(UserDataT &&value)
CreateInstancesFromSnapshotRequest & WithUseLatestRestorableAutoSnapshot(bool value)
CreateInstancesFromSnapshotRequest & WithBundleId(BundleIdT &&value)
AWS_LIGHTSAIL_API CreateInstancesFromSnapshotRequest()=default
CreateInstancesFromSnapshotRequest & WithSourceInstanceName(SourceInstanceNameT &&value)
CreateInstancesFromSnapshotRequest & AddAttachedDiskMapping(AttachedDiskMappingKeyT &&key, AttachedDiskMappingValueT &&value)
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
CreateInstancesFromSnapshotRequest & AddInstanceNames(InstanceNamesT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector