AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateInstancesFromSnapshotRequest.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/lightsail/LightsailRequest.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/lightsail/model/IpAddressType.h>
13#include <aws/lightsail/model/Tag.h>
14#include <aws/lightsail/model/AddOnRequest.h>
15#include <aws/lightsail/model/DiskMap.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Lightsail
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_LIGHTSAIL_API CreateInstancesFromSnapshotRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateInstancesFromSnapshot"; }
37
38 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
39
41
42
44
47 inline const Aws::Vector<Aws::String>& GetInstanceNames() const { return m_instanceNames; }
48 inline bool InstanceNamesHasBeenSet() const { return m_instanceNamesHasBeenSet; }
49 template<typename InstanceNamesT = Aws::Vector<Aws::String>>
50 void SetInstanceNames(InstanceNamesT&& value) { m_instanceNamesHasBeenSet = true; m_instanceNames = std::forward<InstanceNamesT>(value); }
51 template<typename InstanceNamesT = Aws::Vector<Aws::String>>
52 CreateInstancesFromSnapshotRequest& WithInstanceNames(InstanceNamesT&& value) { SetInstanceNames(std::forward<InstanceNamesT>(value)); return *this;}
53 template<typename InstanceNamesT = Aws::String>
54 CreateInstancesFromSnapshotRequest& AddInstanceNames(InstanceNamesT&& value) { m_instanceNamesHasBeenSet = true; m_instanceNames.emplace_back(std::forward<InstanceNamesT>(value)); return *this; }
56
58
61 inline const Aws::Map<Aws::String, Aws::Vector<DiskMap>>& GetAttachedDiskMapping() const { return m_attachedDiskMapping; }
62 inline bool AttachedDiskMappingHasBeenSet() const { return m_attachedDiskMappingHasBeenSet; }
63 template<typename AttachedDiskMappingT = Aws::Map<Aws::String, Aws::Vector<DiskMap>>>
64 void SetAttachedDiskMapping(AttachedDiskMappingT&& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping = std::forward<AttachedDiskMappingT>(value); }
65 template<typename AttachedDiskMappingT = Aws::Map<Aws::String, Aws::Vector<DiskMap>>>
66 CreateInstancesFromSnapshotRequest& WithAttachedDiskMapping(AttachedDiskMappingT&& value) { SetAttachedDiskMapping(std::forward<AttachedDiskMappingT>(value)); return *this;}
67 template<typename AttachedDiskMappingKeyT = Aws::String, typename AttachedDiskMappingValueT = Aws::Vector<DiskMap>>
68 CreateInstancesFromSnapshotRequest& AddAttachedDiskMapping(AttachedDiskMappingKeyT&& key, AttachedDiskMappingValueT&& value) {
69 m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping.emplace(std::forward<AttachedDiskMappingKeyT>(key), std::forward<AttachedDiskMappingValueT>(value)); return *this;
70 }
72
74
82 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
83 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
84 template<typename AvailabilityZoneT = Aws::String>
85 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
86 template<typename AvailabilityZoneT = Aws::String>
87 CreateInstancesFromSnapshotRequest& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
89
91
99 inline const Aws::String& GetInstanceSnapshotName() const { return m_instanceSnapshotName; }
100 inline bool InstanceSnapshotNameHasBeenSet() const { return m_instanceSnapshotNameHasBeenSet; }
101 template<typename InstanceSnapshotNameT = Aws::String>
102 void SetInstanceSnapshotName(InstanceSnapshotNameT&& value) { m_instanceSnapshotNameHasBeenSet = true; m_instanceSnapshotName = std::forward<InstanceSnapshotNameT>(value); }
103 template<typename InstanceSnapshotNameT = Aws::String>
104 CreateInstancesFromSnapshotRequest& WithInstanceSnapshotName(InstanceSnapshotNameT&& value) { SetInstanceSnapshotName(std::forward<InstanceSnapshotNameT>(value)); return *this;}
106
108
112 inline const Aws::String& GetBundleId() const { return m_bundleId; }
113 inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; }
114 template<typename BundleIdT = Aws::String>
115 void SetBundleId(BundleIdT&& value) { m_bundleIdHasBeenSet = true; m_bundleId = std::forward<BundleIdT>(value); }
116 template<typename BundleIdT = Aws::String>
117 CreateInstancesFromSnapshotRequest& WithBundleId(BundleIdT&& value) { SetBundleId(std::forward<BundleIdT>(value)); return *this;}
119
121
131 inline const Aws::String& GetUserData() const { return m_userData; }
132 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
133 template<typename UserDataT = Aws::String>
134 void SetUserData(UserDataT&& value) { m_userDataHasBeenSet = true; m_userData = std::forward<UserDataT>(value); }
135 template<typename UserDataT = Aws::String>
136 CreateInstancesFromSnapshotRequest& WithUserData(UserDataT&& value) { SetUserData(std::forward<UserDataT>(value)); return *this;}
138
140
143 inline const Aws::String& GetKeyPairName() const { return m_keyPairName; }
144 inline bool KeyPairNameHasBeenSet() const { return m_keyPairNameHasBeenSet; }
145 template<typename KeyPairNameT = Aws::String>
146 void SetKeyPairName(KeyPairNameT&& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = std::forward<KeyPairNameT>(value); }
147 template<typename KeyPairNameT = Aws::String>
148 CreateInstancesFromSnapshotRequest& WithKeyPairName(KeyPairNameT&& value) { SetKeyPairName(std::forward<KeyPairNameT>(value)); return *this;}
150
152
157 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
158 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
159 template<typename TagsT = Aws::Vector<Tag>>
160 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
161 template<typename TagsT = Aws::Vector<Tag>>
162 CreateInstancesFromSnapshotRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
163 template<typename TagsT = Tag>
164 CreateInstancesFromSnapshotRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
166
168
172 inline const Aws::Vector<AddOnRequest>& GetAddOns() const { return m_addOns; }
173 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
174 template<typename AddOnsT = Aws::Vector<AddOnRequest>>
175 void SetAddOns(AddOnsT&& value) { m_addOnsHasBeenSet = true; m_addOns = std::forward<AddOnsT>(value); }
176 template<typename AddOnsT = Aws::Vector<AddOnRequest>>
177 CreateInstancesFromSnapshotRequest& WithAddOns(AddOnsT&& value) { SetAddOns(std::forward<AddOnsT>(value)); return *this;}
178 template<typename AddOnsT = AddOnRequest>
179 CreateInstancesFromSnapshotRequest& AddAddOns(AddOnsT&& value) { m_addOnsHasBeenSet = true; m_addOns.emplace_back(std::forward<AddOnsT>(value)); return *this; }
181
183
189 inline IpAddressType GetIpAddressType() const { return m_ipAddressType; }
190 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
191 inline void SetIpAddressType(IpAddressType value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; }
194
196
207 inline const Aws::String& GetSourceInstanceName() const { return m_sourceInstanceName; }
208 inline bool SourceInstanceNameHasBeenSet() const { return m_sourceInstanceNameHasBeenSet; }
209 template<typename SourceInstanceNameT = Aws::String>
210 void SetSourceInstanceName(SourceInstanceNameT&& value) { m_sourceInstanceNameHasBeenSet = true; m_sourceInstanceName = std::forward<SourceInstanceNameT>(value); }
211 template<typename SourceInstanceNameT = Aws::String>
212 CreateInstancesFromSnapshotRequest& WithSourceInstanceName(SourceInstanceNameT&& value) { SetSourceInstanceName(std::forward<SourceInstanceNameT>(value)); return *this;}
214
216
229 inline const Aws::String& GetRestoreDate() const { return m_restoreDate; }
230 inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; }
231 template<typename RestoreDateT = Aws::String>
232 void SetRestoreDate(RestoreDateT&& value) { m_restoreDateHasBeenSet = true; m_restoreDate = std::forward<RestoreDateT>(value); }
233 template<typename RestoreDateT = Aws::String>
234 CreateInstancesFromSnapshotRequest& WithRestoreDate(RestoreDateT&& value) { SetRestoreDate(std::forward<RestoreDateT>(value)); return *this;}
236
238
248 inline bool GetUseLatestRestorableAutoSnapshot() const { return m_useLatestRestorableAutoSnapshot; }
249 inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; }
250 inline void SetUseLatestRestorableAutoSnapshot(bool value) { m_useLatestRestorableAutoSnapshotHasBeenSet = true; m_useLatestRestorableAutoSnapshot = value; }
253 private:
254
255 Aws::Vector<Aws::String> m_instanceNames;
256 bool m_instanceNamesHasBeenSet = false;
257
258 Aws::Map<Aws::String, Aws::Vector<DiskMap>> m_attachedDiskMapping;
259 bool m_attachedDiskMappingHasBeenSet = false;
260
261 Aws::String m_availabilityZone;
262 bool m_availabilityZoneHasBeenSet = false;
263
264 Aws::String m_instanceSnapshotName;
265 bool m_instanceSnapshotNameHasBeenSet = false;
266
267 Aws::String m_bundleId;
268 bool m_bundleIdHasBeenSet = false;
269
270 Aws::String m_userData;
271 bool m_userDataHasBeenSet = false;
272
273 Aws::String m_keyPairName;
274 bool m_keyPairNameHasBeenSet = false;
275
276 Aws::Vector<Tag> m_tags;
277 bool m_tagsHasBeenSet = false;
278
280 bool m_addOnsHasBeenSet = false;
281
282 IpAddressType m_ipAddressType{IpAddressType::NOT_SET};
283 bool m_ipAddressTypeHasBeenSet = false;
284
285 Aws::String m_sourceInstanceName;
286 bool m_sourceInstanceNameHasBeenSet = false;
287
288 Aws::String m_restoreDate;
289 bool m_restoreDateHasBeenSet = false;
290
291 bool m_useLatestRestorableAutoSnapshot{false};
292 bool m_useLatestRestorableAutoSnapshotHasBeenSet = false;
293 };
294
295} // namespace Model
296} // namespace Lightsail
297} // 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