AWS SDK for C++

AWS SDK for C++ Version 1.11.632

Loading...
Searching...
No Matches
StopInstancesRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <utility>
12
13namespace Aws
14{
15namespace EC2
16{
17namespace Model
18{
19
23 {
24 public:
25 AWS_EC2_API StopInstancesRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "StopInstances"; }
32
33 AWS_EC2_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
37
38 public:
39
41
44 inline const Aws::Vector<Aws::String>& GetInstanceIds() const { return m_instanceIds; }
45 inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
46 template<typename InstanceIdsT = Aws::Vector<Aws::String>>
47 void SetInstanceIds(InstanceIdsT&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::forward<InstanceIdsT>(value); }
48 template<typename InstanceIdsT = Aws::Vector<Aws::String>>
49 StopInstancesRequest& WithInstanceIds(InstanceIdsT&& value) { SetInstanceIds(std::forward<InstanceIdsT>(value)); return *this;}
50 template<typename InstanceIdsT = Aws::String>
51 StopInstancesRequest& AddInstanceIds(InstanceIdsT&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.emplace_back(std::forward<InstanceIdsT>(value)); return *this; }
53
55
63 inline bool GetHibernate() const { return m_hibernate; }
64 inline bool HibernateHasBeenSet() const { return m_hibernateHasBeenSet; }
65 inline void SetHibernate(bool value) { m_hibernateHasBeenSet = true; m_hibernate = value; }
66 inline StopInstancesRequest& WithHibernate(bool value) { SetHibernate(value); return *this;}
68
70
77 inline bool GetSkipOsShutdown() const { return m_skipOsShutdown; }
78 inline bool SkipOsShutdownHasBeenSet() const { return m_skipOsShutdownHasBeenSet; }
79 inline void SetSkipOsShutdown(bool value) { m_skipOsShutdownHasBeenSet = true; m_skipOsShutdown = value; }
80 inline StopInstancesRequest& WithSkipOsShutdown(bool value) { SetSkipOsShutdown(value); return *this;}
82
84
90 inline bool GetDryRun() const { return m_dryRun; }
91 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
92 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
93 inline StopInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
95
97
109 inline bool GetForce() const { return m_force; }
110 inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; }
111 inline void SetForce(bool value) { m_forceHasBeenSet = true; m_force = value; }
112 inline StopInstancesRequest& WithForce(bool value) { SetForce(value); return *this;}
114 private:
115
116 Aws::Vector<Aws::String> m_instanceIds;
117 bool m_instanceIdsHasBeenSet = false;
118
119 bool m_hibernate{false};
120 bool m_hibernateHasBeenSet = false;
121
122 bool m_skipOsShutdown{false};
123 bool m_skipOsShutdownHasBeenSet = false;
124
125 bool m_dryRun{false};
126 bool m_dryRunHasBeenSet = false;
127
128 bool m_force{false};
129 bool m_forceHasBeenSet = false;
130 };
131
132} // namespace Model
133} // namespace EC2
134} // 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