AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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:
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 inline void SetInstanceNames(const Aws::Vector<Aws::String>& value) { m_instanceNamesHasBeenSet = true; m_instanceNames = value; }
50 inline void SetInstanceNames(Aws::Vector<Aws::String>&& value) { m_instanceNamesHasBeenSet = true; m_instanceNames = std::move(value); }
53 inline CreateInstancesFromSnapshotRequest& AddInstanceNames(const Aws::String& value) { m_instanceNamesHasBeenSet = true; m_instanceNames.push_back(value); return *this; }
54 inline CreateInstancesFromSnapshotRequest& AddInstanceNames(Aws::String&& value) { m_instanceNamesHasBeenSet = true; m_instanceNames.push_back(std::move(value)); return *this; }
55 inline CreateInstancesFromSnapshotRequest& AddInstanceNames(const char* value) { m_instanceNamesHasBeenSet = true; m_instanceNames.push_back(value); return *this; }
57
59
62 inline const Aws::Map<Aws::String, Aws::Vector<DiskMap>>& GetAttachedDiskMapping() const{ return m_attachedDiskMapping; }
63 inline bool AttachedDiskMappingHasBeenSet() const { return m_attachedDiskMappingHasBeenSet; }
64 inline void SetAttachedDiskMapping(const Aws::Map<Aws::String, Aws::Vector<DiskMap>>& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping = value; }
65 inline void SetAttachedDiskMapping(Aws::Map<Aws::String, Aws::Vector<DiskMap>>&& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping = std::move(value); }
68 inline CreateInstancesFromSnapshotRequest& AddAttachedDiskMapping(const Aws::String& key, const Aws::Vector<DiskMap>& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping.emplace(key, value); return *this; }
69 inline CreateInstancesFromSnapshotRequest& AddAttachedDiskMapping(Aws::String&& key, const Aws::Vector<DiskMap>& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping.emplace(std::move(key), value); return *this; }
70 inline CreateInstancesFromSnapshotRequest& AddAttachedDiskMapping(const Aws::String& key, Aws::Vector<DiskMap>&& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping.emplace(key, std::move(value)); return *this; }
71 inline CreateInstancesFromSnapshotRequest& AddAttachedDiskMapping(Aws::String&& key, Aws::Vector<DiskMap>&& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping.emplace(std::move(key), std::move(value)); return *this; }
72 inline CreateInstancesFromSnapshotRequest& AddAttachedDiskMapping(const char* key, Aws::Vector<DiskMap>&& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping.emplace(key, std::move(value)); return *this; }
73 inline CreateInstancesFromSnapshotRequest& AddAttachedDiskMapping(const char* key, const Aws::Vector<DiskMap>& value) { m_attachedDiskMappingHasBeenSet = true; m_attachedDiskMapping.emplace(key, value); return *this; }
75
77
85 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
86 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
87 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
88 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
89 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
92 inline CreateInstancesFromSnapshotRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
94
96
104 inline const Aws::String& GetInstanceSnapshotName() const{ return m_instanceSnapshotName; }
105 inline bool InstanceSnapshotNameHasBeenSet() const { return m_instanceSnapshotNameHasBeenSet; }
106 inline void SetInstanceSnapshotName(const Aws::String& value) { m_instanceSnapshotNameHasBeenSet = true; m_instanceSnapshotName = value; }
107 inline void SetInstanceSnapshotName(Aws::String&& value) { m_instanceSnapshotNameHasBeenSet = true; m_instanceSnapshotName = std::move(value); }
108 inline void SetInstanceSnapshotName(const char* value) { m_instanceSnapshotNameHasBeenSet = true; m_instanceSnapshotName.assign(value); }
113
115
119 inline const Aws::String& GetBundleId() const{ return m_bundleId; }
120 inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; }
121 inline void SetBundleId(const Aws::String& value) { m_bundleIdHasBeenSet = true; m_bundleId = value; }
122 inline void SetBundleId(Aws::String&& value) { m_bundleIdHasBeenSet = true; m_bundleId = std::move(value); }
123 inline void SetBundleId(const char* value) { m_bundleIdHasBeenSet = true; m_bundleId.assign(value); }
124 inline CreateInstancesFromSnapshotRequest& WithBundleId(const Aws::String& value) { SetBundleId(value); return *this;}
125 inline CreateInstancesFromSnapshotRequest& WithBundleId(Aws::String&& value) { SetBundleId(std::move(value)); return *this;}
126 inline CreateInstancesFromSnapshotRequest& WithBundleId(const char* value) { SetBundleId(value); return *this;}
128
130
140 inline const Aws::String& GetUserData() const{ return m_userData; }
141 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
142 inline void SetUserData(const Aws::String& value) { m_userDataHasBeenSet = true; m_userData = value; }
143 inline void SetUserData(Aws::String&& value) { m_userDataHasBeenSet = true; m_userData = std::move(value); }
144 inline void SetUserData(const char* value) { m_userDataHasBeenSet = true; m_userData.assign(value); }
145 inline CreateInstancesFromSnapshotRequest& WithUserData(const Aws::String& value) { SetUserData(value); return *this;}
146 inline CreateInstancesFromSnapshotRequest& WithUserData(Aws::String&& value) { SetUserData(std::move(value)); return *this;}
147 inline CreateInstancesFromSnapshotRequest& WithUserData(const char* value) { SetUserData(value); return *this;}
149
151
154 inline const Aws::String& GetKeyPairName() const{ return m_keyPairName; }
155 inline bool KeyPairNameHasBeenSet() const { return m_keyPairNameHasBeenSet; }
156 inline void SetKeyPairName(const Aws::String& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = value; }
157 inline void SetKeyPairName(Aws::String&& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = std::move(value); }
158 inline void SetKeyPairName(const char* value) { m_keyPairNameHasBeenSet = true; m_keyPairName.assign(value); }
160 inline CreateInstancesFromSnapshotRequest& WithKeyPairName(Aws::String&& value) { SetKeyPairName(std::move(value)); return *this;}
161 inline CreateInstancesFromSnapshotRequest& WithKeyPairName(const char* value) { SetKeyPairName(value); return *this;}
163
165
170 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
171 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
172 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
173 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
174 inline CreateInstancesFromSnapshotRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
175 inline CreateInstancesFromSnapshotRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
176 inline CreateInstancesFromSnapshotRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
177 inline CreateInstancesFromSnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
179
181
185 inline const Aws::Vector<AddOnRequest>& GetAddOns() const{ return m_addOns; }
186 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
187 inline void SetAddOns(const Aws::Vector<AddOnRequest>& value) { m_addOnsHasBeenSet = true; m_addOns = value; }
188 inline void SetAddOns(Aws::Vector<AddOnRequest>&& value) { m_addOnsHasBeenSet = true; m_addOns = std::move(value); }
190 inline CreateInstancesFromSnapshotRequest& WithAddOns(Aws::Vector<AddOnRequest>&& value) { SetAddOns(std::move(value)); return *this;}
191 inline CreateInstancesFromSnapshotRequest& AddAddOns(const AddOnRequest& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(value); return *this; }
192 inline CreateInstancesFromSnapshotRequest& AddAddOns(AddOnRequest&& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(std::move(value)); return *this; }
194
196
202 inline const IpAddressType& GetIpAddressType() const{ return m_ipAddressType; }
203 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
204 inline void SetIpAddressType(const IpAddressType& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; }
205 inline void SetIpAddressType(IpAddressType&& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = std::move(value); }
207 inline CreateInstancesFromSnapshotRequest& WithIpAddressType(IpAddressType&& value) { SetIpAddressType(std::move(value)); return *this;}
209
211
222 inline const Aws::String& GetSourceInstanceName() const{ return m_sourceInstanceName; }
223 inline bool SourceInstanceNameHasBeenSet() const { return m_sourceInstanceNameHasBeenSet; }
224 inline void SetSourceInstanceName(const Aws::String& value) { m_sourceInstanceNameHasBeenSet = true; m_sourceInstanceName = value; }
225 inline void SetSourceInstanceName(Aws::String&& value) { m_sourceInstanceNameHasBeenSet = true; m_sourceInstanceName = std::move(value); }
226 inline void SetSourceInstanceName(const char* value) { m_sourceInstanceNameHasBeenSet = true; m_sourceInstanceName.assign(value); }
229 inline CreateInstancesFromSnapshotRequest& WithSourceInstanceName(const char* value) { SetSourceInstanceName(value); return *this;}
231
233
246 inline const Aws::String& GetRestoreDate() const{ return m_restoreDate; }
247 inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; }
248 inline void SetRestoreDate(const Aws::String& value) { m_restoreDateHasBeenSet = true; m_restoreDate = value; }
249 inline void SetRestoreDate(Aws::String&& value) { m_restoreDateHasBeenSet = true; m_restoreDate = std::move(value); }
250 inline void SetRestoreDate(const char* value) { m_restoreDateHasBeenSet = true; m_restoreDate.assign(value); }
252 inline CreateInstancesFromSnapshotRequest& WithRestoreDate(Aws::String&& value) { SetRestoreDate(std::move(value)); return *this;}
253 inline CreateInstancesFromSnapshotRequest& WithRestoreDate(const char* value) { SetRestoreDate(value); return *this;}
255
257
267 inline bool GetUseLatestRestorableAutoSnapshot() const{ return m_useLatestRestorableAutoSnapshot; }
268 inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; }
269 inline void SetUseLatestRestorableAutoSnapshot(bool value) { m_useLatestRestorableAutoSnapshotHasBeenSet = true; m_useLatestRestorableAutoSnapshot = value; }
272 private:
273
274 Aws::Vector<Aws::String> m_instanceNames;
275 bool m_instanceNamesHasBeenSet = false;
276
277 Aws::Map<Aws::String, Aws::Vector<DiskMap>> m_attachedDiskMapping;
278 bool m_attachedDiskMappingHasBeenSet = false;
279
280 Aws::String m_availabilityZone;
281 bool m_availabilityZoneHasBeenSet = false;
282
283 Aws::String m_instanceSnapshotName;
284 bool m_instanceSnapshotNameHasBeenSet = false;
285
286 Aws::String m_bundleId;
287 bool m_bundleIdHasBeenSet = false;
288
289 Aws::String m_userData;
290 bool m_userDataHasBeenSet = false;
291
292 Aws::String m_keyPairName;
293 bool m_keyPairNameHasBeenSet = false;
294
295 Aws::Vector<Tag> m_tags;
296 bool m_tagsHasBeenSet = false;
297
299 bool m_addOnsHasBeenSet = false;
300
301 IpAddressType m_ipAddressType;
302 bool m_ipAddressTypeHasBeenSet = false;
303
304 Aws::String m_sourceInstanceName;
305 bool m_sourceInstanceNameHasBeenSet = false;
306
307 Aws::String m_restoreDate;
308 bool m_restoreDateHasBeenSet = false;
309
310 bool m_useLatestRestorableAutoSnapshot;
311 bool m_useLatestRestorableAutoSnapshotHasBeenSet = false;
312 };
313
314} // namespace Model
315} // namespace Lightsail
316} // namespace Aws
CreateInstancesFromSnapshotRequest & WithBundleId(const Aws::String &value)
CreateInstancesFromSnapshotRequest & WithKeyPairName(Aws::String &&value)
CreateInstancesFromSnapshotRequest & WithRestoreDate(const char *value)
CreateInstancesFromSnapshotRequest & WithSourceInstanceName(const char *value)
void SetAttachedDiskMapping(Aws::Map< Aws::String, Aws::Vector< DiskMap > > &&value)
CreateInstancesFromSnapshotRequest & WithUserData(Aws::String &&value)
CreateInstancesFromSnapshotRequest & WithAvailabilityZone(const Aws::String &value)
CreateInstancesFromSnapshotRequest & WithInstanceNames(Aws::Vector< Aws::String > &&value)
CreateInstancesFromSnapshotRequest & WithBundleId(const char *value)
CreateInstancesFromSnapshotRequest & WithInstanceSnapshotName(const Aws::String &value)
CreateInstancesFromSnapshotRequest & WithUserData(const char *value)
void SetAttachedDiskMapping(const Aws::Map< Aws::String, Aws::Vector< DiskMap > > &value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateInstancesFromSnapshotRequest & AddAttachedDiskMapping(const Aws::String &key, const Aws::Vector< DiskMap > &value)
CreateInstancesFromSnapshotRequest & WithBundleId(Aws::String &&value)
CreateInstancesFromSnapshotRequest & WithSourceInstanceName(Aws::String &&value)
CreateInstancesFromSnapshotRequest & WithSourceInstanceName(const Aws::String &value)
const Aws::Map< Aws::String, Aws::Vector< DiskMap > > & GetAttachedDiskMapping() const
CreateInstancesFromSnapshotRequest & WithInstanceSnapshotName(const char *value)
CreateInstancesFromSnapshotRequest & WithTags(Aws::Vector< Tag > &&value)
CreateInstancesFromSnapshotRequest & AddAttachedDiskMapping(const char *key, Aws::Vector< DiskMap > &&value)
CreateInstancesFromSnapshotRequest & WithInstanceNames(const Aws::Vector< Aws::String > &value)
CreateInstancesFromSnapshotRequest & WithIpAddressType(IpAddressType &&value)
CreateInstancesFromSnapshotRequest & AddInstanceNames(const char *value)
CreateInstancesFromSnapshotRequest & AddAttachedDiskMapping(Aws::String &&key, const Aws::Vector< DiskMap > &value)
CreateInstancesFromSnapshotRequest & WithAttachedDiskMapping(Aws::Map< Aws::String, Aws::Vector< DiskMap > > &&value)
CreateInstancesFromSnapshotRequest & AddAddOns(AddOnRequest &&value)
CreateInstancesFromSnapshotRequest & WithAddOns(Aws::Vector< AddOnRequest > &&value)
CreateInstancesFromSnapshotRequest & AddInstanceNames(const Aws::String &value)
CreateInstancesFromSnapshotRequest & AddAttachedDiskMapping(const Aws::String &key, Aws::Vector< DiskMap > &&value)
CreateInstancesFromSnapshotRequest & WithInstanceSnapshotName(Aws::String &&value)
CreateInstancesFromSnapshotRequest & WithTags(const Aws::Vector< Tag > &value)
CreateInstancesFromSnapshotRequest & WithUseLatestRestorableAutoSnapshot(bool value)
CreateInstancesFromSnapshotRequest & WithRestoreDate(const Aws::String &value)
CreateInstancesFromSnapshotRequest & AddAttachedDiskMapping(Aws::String &&key, Aws::Vector< DiskMap > &&value)
CreateInstancesFromSnapshotRequest & WithAvailabilityZone(Aws::String &&value)
CreateInstancesFromSnapshotRequest & AddAttachedDiskMapping(const char *key, const Aws::Vector< DiskMap > &value)
CreateInstancesFromSnapshotRequest & AddTags(const Tag &value)
CreateInstancesFromSnapshotRequest & WithKeyPairName(const char *value)
CreateInstancesFromSnapshotRequest & WithKeyPairName(const Aws::String &value)
CreateInstancesFromSnapshotRequest & AddAddOns(const AddOnRequest &value)
CreateInstancesFromSnapshotRequest & AddInstanceNames(Aws::String &&value)
CreateInstancesFromSnapshotRequest & WithAvailabilityZone(const char *value)
CreateInstancesFromSnapshotRequest & WithIpAddressType(const IpAddressType &value)
CreateInstancesFromSnapshotRequest & WithAddOns(const Aws::Vector< AddOnRequest > &value)
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
CreateInstancesFromSnapshotRequest & WithAttachedDiskMapping(const Aws::Map< Aws::String, Aws::Vector< DiskMap > > &value)
CreateInstancesFromSnapshotRequest & WithUserData(const Aws::String &value)
CreateInstancesFromSnapshotRequest & WithRestoreDate(Aws::String &&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