AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
CreateInstanceRequest.h
1
6#pragma once
7#include <aws/opsworks/OpsWorks_EXPORTS.h>
8#include <aws/opsworks/OpsWorksRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/opsworks/model/AutoScalingType.h>
12#include <aws/opsworks/model/Architecture.h>
13#include <aws/opsworks/model/RootDeviceType.h>
14#include <aws/opsworks/model/BlockDeviceMapping.h>
15#include <utility>
16
17namespace Aws
18{
19namespace OpsWorks
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_OPSWORKS_API CreateInstanceRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateInstance"; }
36
37 AWS_OPSWORKS_API Aws::String SerializePayload() const override;
38
40
41
43
46 inline const Aws::String& GetStackId() const { return m_stackId; }
47 inline bool StackIdHasBeenSet() const { return m_stackIdHasBeenSet; }
48 template<typename StackIdT = Aws::String>
49 void SetStackId(StackIdT&& value) { m_stackIdHasBeenSet = true; m_stackId = std::forward<StackIdT>(value); }
50 template<typename StackIdT = Aws::String>
51 CreateInstanceRequest& WithStackId(StackIdT&& value) { SetStackId(std::forward<StackIdT>(value)); return *this;}
53
55
58 inline const Aws::Vector<Aws::String>& GetLayerIds() const { return m_layerIds; }
59 inline bool LayerIdsHasBeenSet() const { return m_layerIdsHasBeenSet; }
60 template<typename LayerIdsT = Aws::Vector<Aws::String>>
61 void SetLayerIds(LayerIdsT&& value) { m_layerIdsHasBeenSet = true; m_layerIds = std::forward<LayerIdsT>(value); }
62 template<typename LayerIdsT = Aws::Vector<Aws::String>>
63 CreateInstanceRequest& WithLayerIds(LayerIdsT&& value) { SetLayerIds(std::forward<LayerIdsT>(value)); return *this;}
64 template<typename LayerIdsT = Aws::String>
65 CreateInstanceRequest& AddLayerIds(LayerIdsT&& value) { m_layerIdsHasBeenSet = true; m_layerIds.emplace_back(std::forward<LayerIdsT>(value)); return *this; }
67
69
79 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
80 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
81 template<typename InstanceTypeT = Aws::String>
82 void SetInstanceType(InstanceTypeT&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::forward<InstanceTypeT>(value); }
83 template<typename InstanceTypeT = Aws::String>
84 CreateInstanceRequest& WithInstanceType(InstanceTypeT&& value) { SetInstanceType(std::forward<InstanceTypeT>(value)); return *this;}
86
88
92 inline AutoScalingType GetAutoScalingType() const { return m_autoScalingType; }
93 inline bool AutoScalingTypeHasBeenSet() const { return m_autoScalingTypeHasBeenSet; }
94 inline void SetAutoScalingType(AutoScalingType value) { m_autoScalingTypeHasBeenSet = true; m_autoScalingType = value; }
97
99
104 inline const Aws::String& GetHostname() const { return m_hostname; }
105 inline bool HostnameHasBeenSet() const { return m_hostnameHasBeenSet; }
106 template<typename HostnameT = Aws::String>
107 void SetHostname(HostnameT&& value) { m_hostnameHasBeenSet = true; m_hostname = std::forward<HostnameT>(value); }
108 template<typename HostnameT = Aws::String>
109 CreateInstanceRequest& WithHostname(HostnameT&& value) { SetHostname(std::forward<HostnameT>(value)); return *this;}
111
113
141 inline const Aws::String& GetOs() const { return m_os; }
142 inline bool OsHasBeenSet() const { return m_osHasBeenSet; }
143 template<typename OsT = Aws::String>
144 void SetOs(OsT&& value) { m_osHasBeenSet = true; m_os = std::forward<OsT>(value); }
145 template<typename OsT = Aws::String>
146 CreateInstanceRequest& WithOs(OsT&& value) { SetOs(std::forward<OsT>(value)); return *this;}
148
150
157 inline const Aws::String& GetAmiId() const { return m_amiId; }
158 inline bool AmiIdHasBeenSet() const { return m_amiIdHasBeenSet; }
159 template<typename AmiIdT = Aws::String>
160 void SetAmiId(AmiIdT&& value) { m_amiIdHasBeenSet = true; m_amiId = std::forward<AmiIdT>(value); }
161 template<typename AmiIdT = Aws::String>
162 CreateInstanceRequest& WithAmiId(AmiIdT&& value) { SetAmiId(std::forward<AmiIdT>(value)); return *this;}
164
166
169 inline const Aws::String& GetSshKeyName() const { return m_sshKeyName; }
170 inline bool SshKeyNameHasBeenSet() const { return m_sshKeyNameHasBeenSet; }
171 template<typename SshKeyNameT = Aws::String>
172 void SetSshKeyName(SshKeyNameT&& value) { m_sshKeyNameHasBeenSet = true; m_sshKeyName = std::forward<SshKeyNameT>(value); }
173 template<typename SshKeyNameT = Aws::String>
174 CreateInstanceRequest& WithSshKeyName(SshKeyNameT&& value) { SetSshKeyName(std::forward<SshKeyNameT>(value)); return *this;}
176
178
183 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
184 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
185 template<typename AvailabilityZoneT = Aws::String>
186 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
187 template<typename AvailabilityZoneT = Aws::String>
188 CreateInstanceRequest& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
190
192
196 inline const Aws::String& GetVirtualizationType() const { return m_virtualizationType; }
197 inline bool VirtualizationTypeHasBeenSet() const { return m_virtualizationTypeHasBeenSet; }
198 template<typename VirtualizationTypeT = Aws::String>
199 void SetVirtualizationType(VirtualizationTypeT&& value) { m_virtualizationTypeHasBeenSet = true; m_virtualizationType = std::forward<VirtualizationTypeT>(value); }
200 template<typename VirtualizationTypeT = Aws::String>
201 CreateInstanceRequest& WithVirtualizationType(VirtualizationTypeT&& value) { SetVirtualizationType(std::forward<VirtualizationTypeT>(value)); return *this;}
203
205
210 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
211 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
212 template<typename SubnetIdT = Aws::String>
213 void SetSubnetId(SubnetIdT&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::forward<SubnetIdT>(value); }
214 template<typename SubnetIdT = Aws::String>
215 CreateInstanceRequest& WithSubnetId(SubnetIdT&& value) { SetSubnetId(std::forward<SubnetIdT>(value)); return *this;}
217
219
226 inline Architecture GetArchitecture() const { return m_architecture; }
227 inline bool ArchitectureHasBeenSet() const { return m_architectureHasBeenSet; }
228 inline void SetArchitecture(Architecture value) { m_architectureHasBeenSet = true; m_architecture = value; }
231
233
238 inline RootDeviceType GetRootDeviceType() const { return m_rootDeviceType; }
239 inline bool RootDeviceTypeHasBeenSet() const { return m_rootDeviceTypeHasBeenSet; }
240 inline void SetRootDeviceType(RootDeviceType value) { m_rootDeviceTypeHasBeenSet = true; m_rootDeviceType = value; }
243
245
252 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
253 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
254 template<typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
255 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value); }
256 template<typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
257 CreateInstanceRequest& WithBlockDeviceMappings(BlockDeviceMappingsT&& value) { SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value)); return *this;}
258 template<typename BlockDeviceMappingsT = BlockDeviceMapping>
259 CreateInstanceRequest& AddBlockDeviceMappings(BlockDeviceMappingsT&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value)); return *this; }
261
263
274 inline bool GetInstallUpdatesOnBoot() const { return m_installUpdatesOnBoot; }
275 inline bool InstallUpdatesOnBootHasBeenSet() const { return m_installUpdatesOnBootHasBeenSet; }
276 inline void SetInstallUpdatesOnBoot(bool value) { m_installUpdatesOnBootHasBeenSet = true; m_installUpdatesOnBoot = value; }
277 inline CreateInstanceRequest& WithInstallUpdatesOnBoot(bool value) { SetInstallUpdatesOnBoot(value); return *this;}
279
281
284 inline bool GetEbsOptimized() const { return m_ebsOptimized; }
285 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
286 inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; }
287 inline CreateInstanceRequest& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;}
289
291
303 inline const Aws::String& GetAgentVersion() const { return m_agentVersion; }
304 inline bool AgentVersionHasBeenSet() const { return m_agentVersionHasBeenSet; }
305 template<typename AgentVersionT = Aws::String>
306 void SetAgentVersion(AgentVersionT&& value) { m_agentVersionHasBeenSet = true; m_agentVersion = std::forward<AgentVersionT>(value); }
307 template<typename AgentVersionT = Aws::String>
308 CreateInstanceRequest& WithAgentVersion(AgentVersionT&& value) { SetAgentVersion(std::forward<AgentVersionT>(value)); return *this;}
310
312
327 inline const Aws::String& GetTenancy() const { return m_tenancy; }
328 inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; }
329 template<typename TenancyT = Aws::String>
330 void SetTenancy(TenancyT&& value) { m_tenancyHasBeenSet = true; m_tenancy = std::forward<TenancyT>(value); }
331 template<typename TenancyT = Aws::String>
332 CreateInstanceRequest& WithTenancy(TenancyT&& value) { SetTenancy(std::forward<TenancyT>(value)); return *this;}
334 private:
335
336 Aws::String m_stackId;
337 bool m_stackIdHasBeenSet = false;
338
339 Aws::Vector<Aws::String> m_layerIds;
340 bool m_layerIdsHasBeenSet = false;
341
342 Aws::String m_instanceType;
343 bool m_instanceTypeHasBeenSet = false;
344
345 AutoScalingType m_autoScalingType{AutoScalingType::NOT_SET};
346 bool m_autoScalingTypeHasBeenSet = false;
347
348 Aws::String m_hostname;
349 bool m_hostnameHasBeenSet = false;
350
351 Aws::String m_os;
352 bool m_osHasBeenSet = false;
353
354 Aws::String m_amiId;
355 bool m_amiIdHasBeenSet = false;
356
357 Aws::String m_sshKeyName;
358 bool m_sshKeyNameHasBeenSet = false;
359
360 Aws::String m_availabilityZone;
361 bool m_availabilityZoneHasBeenSet = false;
362
363 Aws::String m_virtualizationType;
364 bool m_virtualizationTypeHasBeenSet = false;
365
366 Aws::String m_subnetId;
367 bool m_subnetIdHasBeenSet = false;
368
369 Architecture m_architecture{Architecture::NOT_SET};
370 bool m_architectureHasBeenSet = false;
371
372 RootDeviceType m_rootDeviceType{RootDeviceType::NOT_SET};
373 bool m_rootDeviceTypeHasBeenSet = false;
374
375 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
376 bool m_blockDeviceMappingsHasBeenSet = false;
377
378 bool m_installUpdatesOnBoot{false};
379 bool m_installUpdatesOnBootHasBeenSet = false;
380
381 bool m_ebsOptimized{false};
382 bool m_ebsOptimizedHasBeenSet = false;
383
384 Aws::String m_agentVersion;
385 bool m_agentVersionHasBeenSet = false;
386
387 Aws::String m_tenancy;
388 bool m_tenancyHasBeenSet = false;
389 };
390
391} // namespace Model
392} // namespace OpsWorks
393} // namespace Aws
void SetVirtualizationType(VirtualizationTypeT &&value)
CreateInstanceRequest & WithStackId(StackIdT &&value)
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
AWS_OPSWORKS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateInstanceRequest & WithOs(OsT &&value)
CreateInstanceRequest & WithVirtualizationType(VirtualizationTypeT &&value)
CreateInstanceRequest & WithAvailabilityZone(AvailabilityZoneT &&value)
CreateInstanceRequest & WithSubnetId(SubnetIdT &&value)
CreateInstanceRequest & AddBlockDeviceMappings(BlockDeviceMappingsT &&value)
CreateInstanceRequest & WithAutoScalingType(AutoScalingType value)
void SetBlockDeviceMappings(BlockDeviceMappingsT &&value)
CreateInstanceRequest & WithLayerIds(LayerIdsT &&value)
CreateInstanceRequest & WithAgentVersion(AgentVersionT &&value)
AWS_OPSWORKS_API CreateInstanceRequest()=default
CreateInstanceRequest & WithInstanceType(InstanceTypeT &&value)
void SetAvailabilityZone(AvailabilityZoneT &&value)
AWS_OPSWORKS_API Aws::String SerializePayload() const override
CreateInstanceRequest & WithTenancy(TenancyT &&value)
CreateInstanceRequest & WithRootDeviceType(RootDeviceType value)
CreateInstanceRequest & WithAmiId(AmiIdT &&value)
CreateInstanceRequest & WithInstallUpdatesOnBoot(bool value)
CreateInstanceRequest & WithHostname(HostnameT &&value)
CreateInstanceRequest & WithSshKeyName(SshKeyNameT &&value)
virtual const char * GetServiceRequestName() const override
CreateInstanceRequest & WithEbsOptimized(bool value)
CreateInstanceRequest & AddLayerIds(LayerIdsT &&value)
CreateInstanceRequest & WithBlockDeviceMappings(BlockDeviceMappingsT &&value)
const Aws::Vector< Aws::String > & GetLayerIds() const
CreateInstanceRequest & WithArchitecture(Architecture value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector