AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
TerminateInstancesRequest.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
12#include <utility>
13
14namespace Aws {
15namespace EC2 {
16namespace Model {
17
21 public:
22 AWS_EC2_API TerminateInstancesRequest() = default;
23
24 // Service request name is the Operation name which will send this request out,
25 // each operation should has unique request name, so that we can get operation's name from this request.
26 // Note: this is not true for response, multiple operations may have the same response name,
27 // so we can not get operation's name from response.
28 inline virtual const char* GetServiceRequestName() const override { return "TerminateInstances"; }
29
30 AWS_EC2_API Aws::String SerializePayload() const override;
31
32 protected:
33 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
34
35 public:
37
41 inline const Aws::Vector<Aws::String>& GetInstanceIds() const { return m_instanceIds; }
42 inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
43 template <typename InstanceIdsT = Aws::Vector<Aws::String>>
44 void SetInstanceIds(InstanceIdsT&& value) {
45 m_instanceIdsHasBeenSet = true;
46 m_instanceIds = std::forward<InstanceIdsT>(value);
47 }
48 template <typename InstanceIdsT = Aws::Vector<Aws::String>>
50 SetInstanceIds(std::forward<InstanceIdsT>(value));
51 return *this;
52 }
53 template <typename InstanceIdsT = Aws::String>
55 m_instanceIdsHasBeenSet = true;
56 m_instanceIds.emplace_back(std::forward<InstanceIdsT>(value));
57 return *this;
58 }
60
62
68 inline bool GetForce() const { return m_force; }
69 inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; }
70 inline void SetForce(bool value) {
71 m_forceHasBeenSet = true;
72 m_force = value;
73 }
75 SetForce(value);
76 return *this;
77 }
79
81
85 inline bool GetSkipOsShutdown() const { return m_skipOsShutdown; }
86 inline bool SkipOsShutdownHasBeenSet() const { return m_skipOsShutdownHasBeenSet; }
87 inline void SetSkipOsShutdown(bool value) {
88 m_skipOsShutdownHasBeenSet = true;
89 m_skipOsShutdown = value;
90 }
92 SetSkipOsShutdown(value);
93 return *this;
94 }
96
98
104 inline bool GetDryRun() const { return m_dryRun; }
105 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
106 inline void SetDryRun(bool value) {
107 m_dryRunHasBeenSet = true;
108 m_dryRun = value;
109 }
111 SetDryRun(value);
112 return *this;
113 }
115 private:
116 Aws::Vector<Aws::String> m_instanceIds;
117
118 bool m_force{false};
119
120 bool m_skipOsShutdown{false};
121
122 bool m_dryRun{false};
123 bool m_instanceIdsHasBeenSet = false;
124 bool m_forceHasBeenSet = false;
125 bool m_skipOsShutdownHasBeenSet = false;
126 bool m_dryRunHasBeenSet = false;
127};
128
129} // namespace Model
130} // namespace EC2
131} // namespace Aws
const Aws::Vector< Aws::String > & GetInstanceIds() const
virtual const char * GetServiceRequestName() const override
TerminateInstancesRequest & WithInstanceIds(InstanceIdsT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
TerminateInstancesRequest & AddInstanceIds(InstanceIdsT &&value)
TerminateInstancesRequest & WithSkipOsShutdown(bool value)
TerminateInstancesRequest & WithDryRun(bool value)
AWS_EC2_API TerminateInstancesRequest()=default
TerminateInstancesRequest & WithForce(bool value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector