AWS SDK for C++  1.9.66
AWS SDK for C++
TerminateInstancesRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace EC2
16 {
17 namespace Model
18 {
19 
23  {
24  public:
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 "TerminateInstances"; }
32 
33  Aws::String SerializePayload() const override;
34 
35  protected:
36  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
37 
38  public:
39 
44  inline const Aws::Vector<Aws::String>& GetInstanceIds() const{ return m_instanceIds; }
45 
50  inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
51 
56  inline void SetInstanceIds(const Aws::Vector<Aws::String>& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
57 
62  inline void SetInstanceIds(Aws::Vector<Aws::String>&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); }
63 
68  inline TerminateInstancesRequest& WithInstanceIds(const Aws::Vector<Aws::String>& value) { SetInstanceIds(value); return *this;}
69 
74  inline TerminateInstancesRequest& WithInstanceIds(Aws::Vector<Aws::String>&& value) { SetInstanceIds(std::move(value)); return *this;}
75 
80  inline TerminateInstancesRequest& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
81 
86  inline TerminateInstancesRequest& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; }
87 
92  inline TerminateInstancesRequest& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
93 
94 
101  inline bool GetDryRun() const{ return m_dryRun; }
102 
109  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
110 
117  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
118 
125  inline TerminateInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
126 
127  private:
128 
129  Aws::Vector<Aws::String> m_instanceIds;
130  bool m_instanceIdsHasBeenSet;
131 
132  bool m_dryRun;
133  bool m_dryRunHasBeenSet;
134  };
135 
136 } // namespace Model
137 } // namespace EC2
138 } // namespace Aws
Aws::EC2::Model::TerminateInstancesRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: TerminateInstancesRequest.h:109
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::TerminateInstancesRequest::WithDryRun
TerminateInstancesRequest & WithDryRun(bool value)
Definition: TerminateInstancesRequest.h:125
Aws::EC2::Model::TerminateInstancesRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::TerminateInstancesRequest
Definition: TerminateInstancesRequest.h:23
Aws::EC2::Model::TerminateInstancesRequest::GetInstanceIds
const Aws::Vector< Aws::String > & GetInstanceIds() const
Definition: TerminateInstancesRequest.h:44
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::TerminateInstancesRequest::WithInstanceIds
TerminateInstancesRequest & WithInstanceIds(Aws::Vector< Aws::String > &&value)
Definition: TerminateInstancesRequest.h:74
AWSVector.h
Aws::EC2::Model::TerminateInstancesRequest::AddInstanceIds
TerminateInstancesRequest & AddInstanceIds(const Aws::String &value)
Definition: TerminateInstancesRequest.h:80
Aws::EC2::Model::TerminateInstancesRequest::TerminateInstancesRequest
TerminateInstancesRequest()
EC2Request.h
Aws::EC2::Model::TerminateInstancesRequest::GetDryRun
bool GetDryRun() const
Definition: TerminateInstancesRequest.h:101
AWSString.h
Aws::EC2::Model::TerminateInstancesRequest::AddInstanceIds
TerminateInstancesRequest & AddInstanceIds(Aws::String &&value)
Definition: TerminateInstancesRequest.h:86
Aws::EC2::Model::TerminateInstancesRequest::SetInstanceIds
void SetInstanceIds(const Aws::Vector< Aws::String > &value)
Definition: TerminateInstancesRequest.h:56
Aws::EC2::Model::TerminateInstancesRequest::InstanceIdsHasBeenSet
bool InstanceIdsHasBeenSet() const
Definition: TerminateInstancesRequest.h:50
Aws::EC2::Model::TerminateInstancesRequest::WithInstanceIds
TerminateInstancesRequest & WithInstanceIds(const Aws::Vector< Aws::String > &value)
Definition: TerminateInstancesRequest.h:68
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::TerminateInstancesRequest::AddInstanceIds
TerminateInstancesRequest & AddInstanceIds(const char *value)
Definition: TerminateInstancesRequest.h:92
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::TerminateInstancesRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TerminateInstancesRequest.h:31
Aws::EC2::Model::TerminateInstancesRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
EC2_EXPORTS.h
Aws::EC2::Model::TerminateInstancesRequest::SetDryRun
void SetDryRun(bool value)
Definition: TerminateInstancesRequest.h:117
Aws::EC2::Model::TerminateInstancesRequest::SetInstanceIds
void SetInstanceIds(Aws::Vector< Aws::String > &&value)
Definition: TerminateInstancesRequest.h:62