AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ModifyInstanceAttributeRequest.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/AttributeBooleanValue.h>
12#include <aws/ec2/model/AttributeValue.h>
13#include <aws/ec2/model/BlobAttributeValue.h>
14#include <aws/ec2/model/InstanceAttributeName.h>
15#include <aws/ec2/model/InstanceBlockDeviceMappingSpecification.h>
16
17#include <utility>
18
19namespace Aws {
20namespace EC2 {
21namespace Model {
22
26 public:
27 AWS_EC2_API ModifyInstanceAttributeRequest() = 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 "ModifyInstanceAttribute"; }
34
35 AWS_EC2_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
39
40 public:
42
50 inline const AttributeBooleanValue& GetSourceDestCheck() const { return m_sourceDestCheck; }
51 inline bool SourceDestCheckHasBeenSet() const { return m_sourceDestCheckHasBeenSet; }
52 template <typename SourceDestCheckT = AttributeBooleanValue>
53 void SetSourceDestCheck(SourceDestCheckT&& value) {
54 m_sourceDestCheckHasBeenSet = true;
55 m_sourceDestCheck = std::forward<SourceDestCheckT>(value);
56 }
57 template <typename SourceDestCheckT = AttributeBooleanValue>
59 SetSourceDestCheck(std::forward<SourceDestCheckT>(value));
60 return *this;
61 }
63
65
71 inline const AttributeBooleanValue& GetDisableApiStop() const { return m_disableApiStop; }
72 inline bool DisableApiStopHasBeenSet() const { return m_disableApiStopHasBeenSet; }
73 template <typename DisableApiStopT = AttributeBooleanValue>
74 void SetDisableApiStop(DisableApiStopT&& value) {
75 m_disableApiStopHasBeenSet = true;
76 m_disableApiStop = std::forward<DisableApiStopT>(value);
77 }
78 template <typename DisableApiStopT = AttributeBooleanValue>
80 SetDisableApiStop(std::forward<DisableApiStopT>(value));
81 return *this;
82 }
84
86
92 inline bool GetDryRun() const { return m_dryRun; }
93 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
94 inline void SetDryRun(bool value) {
95 m_dryRunHasBeenSet = true;
96 m_dryRun = value;
97 }
99 SetDryRun(value);
100 return *this;
101 }
103
105
108 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
109 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
110 template <typename InstanceIdT = Aws::String>
111 void SetInstanceId(InstanceIdT&& value) {
112 m_instanceIdHasBeenSet = true;
113 m_instanceId = std::forward<InstanceIdT>(value);
114 }
115 template <typename InstanceIdT = Aws::String>
117 SetInstanceId(std::forward<InstanceIdT>(value));
118 return *this;
119 }
121
123
138 inline InstanceAttributeName GetAttribute() const { return m_attribute; }
139 inline bool AttributeHasBeenSet() const { return m_attributeHasBeenSet; }
141 m_attributeHasBeenSet = true;
142 m_attribute = value;
143 }
145 SetAttribute(value);
146 return *this;
147 }
149
151
156 inline const Aws::String& GetValue() const { return m_value; }
157 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
158 template <typename ValueT = Aws::String>
159 void SetValue(ValueT&& value) {
160 m_valueHasBeenSet = true;
161 m_value = std::forward<ValueT>(value);
162 }
163 template <typename ValueT = Aws::String>
165 SetValue(std::forward<ValueT>(value));
166 return *this;
167 }
169
171
184 inline const Aws::Vector<InstanceBlockDeviceMappingSpecification>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
185 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
186 template <typename BlockDeviceMappingsT = Aws::Vector<InstanceBlockDeviceMappingSpecification>>
187 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) {
188 m_blockDeviceMappingsHasBeenSet = true;
189 m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value);
190 }
191 template <typename BlockDeviceMappingsT = Aws::Vector<InstanceBlockDeviceMappingSpecification>>
193 SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value));
194 return *this;
195 }
196 template <typename BlockDeviceMappingsT = InstanceBlockDeviceMappingSpecification>
198 m_blockDeviceMappingsHasBeenSet = true;
199 m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value));
200 return *this;
201 }
203
205
211 inline const AttributeBooleanValue& GetDisableApiTermination() const { return m_disableApiTermination; }
212 inline bool DisableApiTerminationHasBeenSet() const { return m_disableApiTerminationHasBeenSet; }
213 template <typename DisableApiTerminationT = AttributeBooleanValue>
214 void SetDisableApiTermination(DisableApiTerminationT&& value) {
215 m_disableApiTerminationHasBeenSet = true;
216 m_disableApiTermination = std::forward<DisableApiTerminationT>(value);
217 }
218 template <typename DisableApiTerminationT = AttributeBooleanValue>
220 SetDisableApiTermination(std::forward<DisableApiTerminationT>(value));
221 return *this;
222 }
224
226
233 inline const AttributeValue& GetInstanceType() const { return m_instanceType; }
234 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
235 template <typename InstanceTypeT = AttributeValue>
236 void SetInstanceType(InstanceTypeT&& value) {
237 m_instanceTypeHasBeenSet = true;
238 m_instanceType = std::forward<InstanceTypeT>(value);
239 }
240 template <typename InstanceTypeT = AttributeValue>
242 SetInstanceType(std::forward<InstanceTypeT>(value));
243 return *this;
244 }
246
248
253 inline const AttributeValue& GetKernel() const { return m_kernel; }
254 inline bool KernelHasBeenSet() const { return m_kernelHasBeenSet; }
255 template <typename KernelT = AttributeValue>
256 void SetKernel(KernelT&& value) {
257 m_kernelHasBeenSet = true;
258 m_kernel = std::forward<KernelT>(value);
259 }
260 template <typename KernelT = AttributeValue>
262 SetKernel(std::forward<KernelT>(value));
263 return *this;
264 }
266
268
273 inline const AttributeValue& GetRamdisk() const { return m_ramdisk; }
274 inline bool RamdiskHasBeenSet() const { return m_ramdiskHasBeenSet; }
275 template <typename RamdiskT = AttributeValue>
276 void SetRamdisk(RamdiskT&& value) {
277 m_ramdiskHasBeenSet = true;
278 m_ramdisk = std::forward<RamdiskT>(value);
279 }
280 template <typename RamdiskT = AttributeValue>
282 SetRamdisk(std::forward<RamdiskT>(value));
283 return *this;
284 }
286
288
295 inline const BlobAttributeValue& GetUserData() const { return m_userData; }
296 inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
297 template <typename UserDataT = BlobAttributeValue>
298 void SetUserData(UserDataT&& value) {
299 m_userDataHasBeenSet = true;
300 m_userData = std::forward<UserDataT>(value);
301 }
302 template <typename UserDataT = BlobAttributeValue>
304 SetUserData(std::forward<UserDataT>(value));
305 return *this;
306 }
308
310
314 inline const AttributeValue& GetInstanceInitiatedShutdownBehavior() const { return m_instanceInitiatedShutdownBehavior; }
315 inline bool InstanceInitiatedShutdownBehaviorHasBeenSet() const { return m_instanceInitiatedShutdownBehaviorHasBeenSet; }
316 template <typename InstanceInitiatedShutdownBehaviorT = AttributeValue>
317 void SetInstanceInitiatedShutdownBehavior(InstanceInitiatedShutdownBehaviorT&& value) {
318 m_instanceInitiatedShutdownBehaviorHasBeenSet = true;
319 m_instanceInitiatedShutdownBehavior = std::forward<InstanceInitiatedShutdownBehaviorT>(value);
320 }
321 template <typename InstanceInitiatedShutdownBehaviorT = AttributeValue>
322 ModifyInstanceAttributeRequest& WithInstanceInitiatedShutdownBehavior(InstanceInitiatedShutdownBehaviorT&& value) {
323 SetInstanceInitiatedShutdownBehavior(std::forward<InstanceInitiatedShutdownBehaviorT>(value));
324 return *this;
325 }
327
329
334 inline const Aws::Vector<Aws::String>& GetGroups() const { return m_groups; }
335 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
336 template <typename GroupsT = Aws::Vector<Aws::String>>
337 void SetGroups(GroupsT&& value) {
338 m_groupsHasBeenSet = true;
339 m_groups = std::forward<GroupsT>(value);
340 }
341 template <typename GroupsT = Aws::Vector<Aws::String>>
343 SetGroups(std::forward<GroupsT>(value));
344 return *this;
345 }
346 template <typename GroupsT = Aws::String>
348 m_groupsHasBeenSet = true;
349 m_groups.emplace_back(std::forward<GroupsT>(value));
350 return *this;
351 }
353
355
362 inline const AttributeBooleanValue& GetEbsOptimized() const { return m_ebsOptimized; }
363 inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; }
364 template <typename EbsOptimizedT = AttributeBooleanValue>
365 void SetEbsOptimized(EbsOptimizedT&& value) {
366 m_ebsOptimizedHasBeenSet = true;
367 m_ebsOptimized = std::forward<EbsOptimizedT>(value);
368 }
369 template <typename EbsOptimizedT = AttributeBooleanValue>
371 SetEbsOptimized(std::forward<EbsOptimizedT>(value));
372 return *this;
373 }
375
377
384 inline const AttributeValue& GetSriovNetSupport() const { return m_sriovNetSupport; }
385 inline bool SriovNetSupportHasBeenSet() const { return m_sriovNetSupportHasBeenSet; }
386 template <typename SriovNetSupportT = AttributeValue>
387 void SetSriovNetSupport(SriovNetSupportT&& value) {
388 m_sriovNetSupportHasBeenSet = true;
389 m_sriovNetSupport = std::forward<SriovNetSupportT>(value);
390 }
391 template <typename SriovNetSupportT = AttributeValue>
393 SetSriovNetSupport(std::forward<SriovNetSupportT>(value));
394 return *this;
395 }
397
399
404 inline const AttributeBooleanValue& GetEnaSupport() const { return m_enaSupport; }
405 inline bool EnaSupportHasBeenSet() const { return m_enaSupportHasBeenSet; }
406 template <typename EnaSupportT = AttributeBooleanValue>
407 void SetEnaSupport(EnaSupportT&& value) {
408 m_enaSupportHasBeenSet = true;
409 m_enaSupport = std::forward<EnaSupportT>(value);
410 }
411 template <typename EnaSupportT = AttributeBooleanValue>
413 SetEnaSupport(std::forward<EnaSupportT>(value));
414 return *this;
415 }
417 private:
418 AttributeBooleanValue m_sourceDestCheck;
419
420 AttributeBooleanValue m_disableApiStop;
421
422 bool m_dryRun{false};
423
424 Aws::String m_instanceId;
425
427
428 Aws::String m_value;
429
431
432 AttributeBooleanValue m_disableApiTermination;
433
434 AttributeValue m_instanceType;
435
436 AttributeValue m_kernel;
437
438 AttributeValue m_ramdisk;
439
440 BlobAttributeValue m_userData;
441
442 AttributeValue m_instanceInitiatedShutdownBehavior;
443
445
446 AttributeBooleanValue m_ebsOptimized;
447
448 AttributeValue m_sriovNetSupport;
449
450 AttributeBooleanValue m_enaSupport;
451 bool m_sourceDestCheckHasBeenSet = false;
452 bool m_disableApiStopHasBeenSet = false;
453 bool m_dryRunHasBeenSet = false;
454 bool m_instanceIdHasBeenSet = false;
455 bool m_attributeHasBeenSet = false;
456 bool m_valueHasBeenSet = false;
457 bool m_blockDeviceMappingsHasBeenSet = false;
458 bool m_disableApiTerminationHasBeenSet = false;
459 bool m_instanceTypeHasBeenSet = false;
460 bool m_kernelHasBeenSet = false;
461 bool m_ramdiskHasBeenSet = false;
462 bool m_userDataHasBeenSet = false;
463 bool m_instanceInitiatedShutdownBehaviorHasBeenSet = false;
464 bool m_groupsHasBeenSet = false;
465 bool m_ebsOptimizedHasBeenSet = false;
466 bool m_sriovNetSupportHasBeenSet = false;
467 bool m_enaSupportHasBeenSet = false;
468};
469
470} // namespace Model
471} // namespace EC2
472} // namespace Aws
const Aws::Vector< Aws::String > & GetGroups() const
ModifyInstanceAttributeRequest & WithInstanceId(InstanceIdT &&value)
ModifyInstanceAttributeRequest & WithBlockDeviceMappings(BlockDeviceMappingsT &&value)
ModifyInstanceAttributeRequest & WithDisableApiTermination(DisableApiTerminationT &&value)
ModifyInstanceAttributeRequest & WithInstanceType(InstanceTypeT &&value)
ModifyInstanceAttributeRequest & WithSriovNetSupport(SriovNetSupportT &&value)
ModifyInstanceAttributeRequest & WithKernel(KernelT &&value)
ModifyInstanceAttributeRequest & WithDisableApiStop(DisableApiStopT &&value)
ModifyInstanceAttributeRequest & WithInstanceInitiatedShutdownBehavior(InstanceInitiatedShutdownBehaviorT &&value)
virtual const char * GetServiceRequestName() const override
void SetInstanceInitiatedShutdownBehavior(InstanceInitiatedShutdownBehaviorT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
ModifyInstanceAttributeRequest & WithUserData(UserDataT &&value)
ModifyInstanceAttributeRequest & WithRamdisk(RamdiskT &&value)
ModifyInstanceAttributeRequest & WithEnaSupport(EnaSupportT &&value)
ModifyInstanceAttributeRequest & WithSourceDestCheck(SourceDestCheckT &&value)
ModifyInstanceAttributeRequest & WithAttribute(InstanceAttributeName value)
AWS_EC2_API Aws::String SerializePayload() const override
ModifyInstanceAttributeRequest & WithValue(ValueT &&value)
ModifyInstanceAttributeRequest & AddBlockDeviceMappings(BlockDeviceMappingsT &&value)
ModifyInstanceAttributeRequest & WithDryRun(bool value)
const Aws::Vector< InstanceBlockDeviceMappingSpecification > & GetBlockDeviceMappings() const
ModifyInstanceAttributeRequest & WithEbsOptimized(EbsOptimizedT &&value)
ModifyInstanceAttributeRequest & AddGroups(GroupsT &&value)
ModifyInstanceAttributeRequest & WithGroups(GroupsT &&value)
const AttributeBooleanValue & GetDisableApiTermination() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector