AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
StopInstancesRequest.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 StopInstancesRequest() = 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 "StopInstances"; }
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
40 inline const Aws::Vector<Aws::String>& GetInstanceIds() const { return m_instanceIds; }
41 inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
42 template <typename InstanceIdsT = Aws::Vector<Aws::String>>
43 void SetInstanceIds(InstanceIdsT&& value) {
44 m_instanceIdsHasBeenSet = true;
45 m_instanceIds = std::forward<InstanceIdsT>(value);
46 }
47 template <typename InstanceIdsT = Aws::Vector<Aws::String>>
48 StopInstancesRequest& WithInstanceIds(InstanceIdsT&& value) {
49 SetInstanceIds(std::forward<InstanceIdsT>(value));
50 return *this;
51 }
52 template <typename InstanceIdsT = Aws::String>
53 StopInstancesRequest& AddInstanceIds(InstanceIdsT&& value) {
54 m_instanceIdsHasBeenSet = true;
55 m_instanceIds.emplace_back(std::forward<InstanceIdsT>(value));
56 return *this;
57 }
59
61
69 inline bool GetHibernate() const { return m_hibernate; }
70 inline bool HibernateHasBeenSet() const { return m_hibernateHasBeenSet; }
71 inline void SetHibernate(bool value) {
72 m_hibernateHasBeenSet = true;
73 m_hibernate = value;
74 }
75 inline StopInstancesRequest& WithHibernate(bool value) {
76 SetHibernate(value);
77 return *this;
78 }
80
82
89 inline bool GetSkipOsShutdown() const { return m_skipOsShutdown; }
90 inline bool SkipOsShutdownHasBeenSet() const { return m_skipOsShutdownHasBeenSet; }
91 inline void SetSkipOsShutdown(bool value) {
92 m_skipOsShutdownHasBeenSet = true;
93 m_skipOsShutdown = value;
94 }
96 SetSkipOsShutdown(value);
97 return *this;
98 }
100
102
108 inline bool GetDryRun() const { return m_dryRun; }
109 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
110 inline void SetDryRun(bool value) {
111 m_dryRunHasBeenSet = true;
112 m_dryRun = value;
113 }
114 inline StopInstancesRequest& WithDryRun(bool value) {
115 SetDryRun(value);
116 return *this;
117 }
119
121
133 inline bool GetForce() const { return m_force; }
134 inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; }
135 inline void SetForce(bool value) {
136 m_forceHasBeenSet = true;
137 m_force = value;
138 }
139 inline StopInstancesRequest& WithForce(bool value) {
140 SetForce(value);
141 return *this;
142 }
144 private:
145 Aws::Vector<Aws::String> m_instanceIds;
146
147 bool m_hibernate{false};
148
149 bool m_skipOsShutdown{false};
150
151 bool m_dryRun{false};
152
153 bool m_force{false};
154 bool m_instanceIdsHasBeenSet = false;
155 bool m_hibernateHasBeenSet = false;
156 bool m_skipOsShutdownHasBeenSet = false;
157 bool m_dryRunHasBeenSet = false;
158 bool m_forceHasBeenSet = false;
159};
160
161} // namespace Model
162} // namespace EC2
163} // namespace Aws
const Aws::Vector< Aws::String > & GetInstanceIds() const
virtual const char * GetServiceRequestName() const override
StopInstancesRequest & AddInstanceIds(InstanceIdsT &&value)
void SetInstanceIds(InstanceIdsT &&value)
StopInstancesRequest & WithDryRun(bool value)
StopInstancesRequest & WithHibernate(bool value)
StopInstancesRequest & WithSkipOsShutdown(bool value)
AWS_EC2_API Aws::String SerializePayload() const override
StopInstancesRequest & WithInstanceIds(InstanceIdsT &&value)
AWS_EC2_API StopInstancesRequest()=default
StopInstancesRequest & 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