AWS SDK for C++  1.9.67
AWS SDK for C++
DescribeKeyPairsRequest.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>
10 #include <aws/ec2/model/Filter.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace EC2
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "DescribeKeyPairs"; }
33 
34  Aws::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
54  inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
55 
69  inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
70 
84  inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
85 
99  inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
100 
114  inline DescribeKeyPairsRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
115 
129  inline DescribeKeyPairsRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(std::move(value)); return *this;}
130 
144  inline DescribeKeyPairsRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
145 
159  inline DescribeKeyPairsRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
160 
161 
165  inline const Aws::Vector<Aws::String>& GetKeyNames() const{ return m_keyNames; }
166 
170  inline bool KeyNamesHasBeenSet() const { return m_keyNamesHasBeenSet; }
171 
175  inline void SetKeyNames(const Aws::Vector<Aws::String>& value) { m_keyNamesHasBeenSet = true; m_keyNames = value; }
176 
180  inline void SetKeyNames(Aws::Vector<Aws::String>&& value) { m_keyNamesHasBeenSet = true; m_keyNames = std::move(value); }
181 
185  inline DescribeKeyPairsRequest& WithKeyNames(const Aws::Vector<Aws::String>& value) { SetKeyNames(value); return *this;}
186 
190  inline DescribeKeyPairsRequest& WithKeyNames(Aws::Vector<Aws::String>&& value) { SetKeyNames(std::move(value)); return *this;}
191 
195  inline DescribeKeyPairsRequest& AddKeyNames(const Aws::String& value) { m_keyNamesHasBeenSet = true; m_keyNames.push_back(value); return *this; }
196 
200  inline DescribeKeyPairsRequest& AddKeyNames(Aws::String&& value) { m_keyNamesHasBeenSet = true; m_keyNames.push_back(std::move(value)); return *this; }
201 
205  inline DescribeKeyPairsRequest& AddKeyNames(const char* value) { m_keyNamesHasBeenSet = true; m_keyNames.push_back(value); return *this; }
206 
207 
211  inline const Aws::Vector<Aws::String>& GetKeyPairIds() const{ return m_keyPairIds; }
212 
216  inline bool KeyPairIdsHasBeenSet() const { return m_keyPairIdsHasBeenSet; }
217 
221  inline void SetKeyPairIds(const Aws::Vector<Aws::String>& value) { m_keyPairIdsHasBeenSet = true; m_keyPairIds = value; }
222 
226  inline void SetKeyPairIds(Aws::Vector<Aws::String>&& value) { m_keyPairIdsHasBeenSet = true; m_keyPairIds = std::move(value); }
227 
231  inline DescribeKeyPairsRequest& WithKeyPairIds(const Aws::Vector<Aws::String>& value) { SetKeyPairIds(value); return *this;}
232 
236  inline DescribeKeyPairsRequest& WithKeyPairIds(Aws::Vector<Aws::String>&& value) { SetKeyPairIds(std::move(value)); return *this;}
237 
241  inline DescribeKeyPairsRequest& AddKeyPairIds(const Aws::String& value) { m_keyPairIdsHasBeenSet = true; m_keyPairIds.push_back(value); return *this; }
242 
246  inline DescribeKeyPairsRequest& AddKeyPairIds(Aws::String&& value) { m_keyPairIdsHasBeenSet = true; m_keyPairIds.push_back(std::move(value)); return *this; }
247 
251  inline DescribeKeyPairsRequest& AddKeyPairIds(const char* value) { m_keyPairIdsHasBeenSet = true; m_keyPairIds.push_back(value); return *this; }
252 
253 
260  inline bool GetDryRun() const{ return m_dryRun; }
261 
268  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
269 
276  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
277 
284  inline DescribeKeyPairsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
285 
286  private:
287 
288  Aws::Vector<Filter> m_filters;
289  bool m_filtersHasBeenSet;
290 
291  Aws::Vector<Aws::String> m_keyNames;
292  bool m_keyNamesHasBeenSet;
293 
294  Aws::Vector<Aws::String> m_keyPairIds;
295  bool m_keyPairIdsHasBeenSet;
296 
297  bool m_dryRun;
298  bool m_dryRunHasBeenSet;
299  };
300 
301 } // namespace Model
302 } // namespace EC2
303 } // namespace Aws
Aws::EC2::Model::DescribeKeyPairsRequest::AddFilters
DescribeKeyPairsRequest & AddFilters(const Filter &value)
Definition: DescribeKeyPairsRequest.h:144
Aws::EC2::Model::DescribeKeyPairsRequest::AddKeyNames
DescribeKeyPairsRequest & AddKeyNames(const char *value)
Definition: DescribeKeyPairsRequest.h:205
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::DescribeKeyPairsRequest::GetKeyNames
const Aws::Vector< Aws::String > & GetKeyNames() const
Definition: DescribeKeyPairsRequest.h:165
Aws::EC2::Model::DescribeKeyPairsRequest::WithFilters
DescribeKeyPairsRequest & WithFilters(Aws::Vector< Filter > &&value)
Definition: DescribeKeyPairsRequest.h:129
Aws::EC2::Model::DescribeKeyPairsRequest::FiltersHasBeenSet
bool FiltersHasBeenSet() const
Definition: DescribeKeyPairsRequest.h:69
Aws::EC2::Model::DescribeKeyPairsRequest::KeyPairIdsHasBeenSet
bool KeyPairIdsHasBeenSet() const
Definition: DescribeKeyPairsRequest.h:216
Aws::EC2::Model::DescribeKeyPairsRequest::GetFilters
const Aws::Vector< Filter > & GetFilters() const
Definition: DescribeKeyPairsRequest.h:54
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::DescribeKeyPairsRequest::SetKeyPairIds
void SetKeyPairIds(const Aws::Vector< Aws::String > &value)
Definition: DescribeKeyPairsRequest.h:221
Aws::EC2::Model::DescribeKeyPairsRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: DescribeKeyPairsRequest.h:32
Aws::EC2::Model::DescribeKeyPairsRequest::SetFilters
void SetFilters(const Aws::Vector< Filter > &value)
Definition: DescribeKeyPairsRequest.h:84
Aws::EC2::Model::Filter
Definition: Filter.h:36
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSVector.h
Filter.h
Aws::EC2::Model::DescribeKeyPairsRequest::AddKeyNames
DescribeKeyPairsRequest & AddKeyNames(Aws::String &&value)
Definition: DescribeKeyPairsRequest.h:200
Aws::EC2::Model::DescribeKeyPairsRequest::GetKeyPairIds
const Aws::Vector< Aws::String > & GetKeyPairIds() const
Definition: DescribeKeyPairsRequest.h:211
Aws::EC2::Model::DescribeKeyPairsRequest::DescribeKeyPairsRequest
DescribeKeyPairsRequest()
Aws::EC2::Model::DescribeKeyPairsRequest::WithDryRun
DescribeKeyPairsRequest & WithDryRun(bool value)
Definition: DescribeKeyPairsRequest.h:284
Aws::EC2::Model::DescribeKeyPairsRequest::AddKeyPairIds
DescribeKeyPairsRequest & AddKeyPairIds(Aws::String &&value)
Definition: DescribeKeyPairsRequest.h:246
Aws::EC2::Model::DescribeKeyPairsRequest::AddFilters
DescribeKeyPairsRequest & AddFilters(Filter &&value)
Definition: DescribeKeyPairsRequest.h:159
EC2Request.h
Aws::EC2::Model::DescribeKeyPairsRequest::SetFilters
void SetFilters(Aws::Vector< Filter > &&value)
Definition: DescribeKeyPairsRequest.h:99
Aws::EC2::Model::DescribeKeyPairsRequest::WithKeyNames
DescribeKeyPairsRequest & WithKeyNames(const Aws::Vector< Aws::String > &value)
Definition: DescribeKeyPairsRequest.h:185
Aws::EC2::Model::DescribeKeyPairsRequest::SetDryRun
void SetDryRun(bool value)
Definition: DescribeKeyPairsRequest.h:276
AWSString.h
Aws::EC2::Model::DescribeKeyPairsRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::DescribeKeyPairsRequest::SetKeyNames
void SetKeyNames(const Aws::Vector< Aws::String > &value)
Definition: DescribeKeyPairsRequest.h:175
Aws::EC2::Model::DescribeKeyPairsRequest::SetKeyPairIds
void SetKeyPairIds(Aws::Vector< Aws::String > &&value)
Definition: DescribeKeyPairsRequest.h:226
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::DescribeKeyPairsRequest::GetDryRun
bool GetDryRun() const
Definition: DescribeKeyPairsRequest.h:260
Aws::EC2::Model::DescribeKeyPairsRequest::AddKeyNames
DescribeKeyPairsRequest & AddKeyNames(const Aws::String &value)
Definition: DescribeKeyPairsRequest.h:195
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::DescribeKeyPairsRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: DescribeKeyPairsRequest.h:268
Aws::EC2::Model::DescribeKeyPairsRequest::WithKeyPairIds
DescribeKeyPairsRequest & WithKeyPairIds(Aws::Vector< Aws::String > &&value)
Definition: DescribeKeyPairsRequest.h:236
Aws::EC2::Model::DescribeKeyPairsRequest::WithKeyPairIds
DescribeKeyPairsRequest & WithKeyPairIds(const Aws::Vector< Aws::String > &value)
Definition: DescribeKeyPairsRequest.h:231
Aws::EC2::Model::DescribeKeyPairsRequest::SetKeyNames
void SetKeyNames(Aws::Vector< Aws::String > &&value)
Definition: DescribeKeyPairsRequest.h:180
Aws::EC2::Model::DescribeKeyPairsRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::EC2::Model::DescribeKeyPairsRequest
Definition: DescribeKeyPairsRequest.h:24
EC2_EXPORTS.h
Aws::EC2::Model::DescribeKeyPairsRequest::WithFilters
DescribeKeyPairsRequest & WithFilters(const Aws::Vector< Filter > &value)
Definition: DescribeKeyPairsRequest.h:114
Aws::EC2::Model::DescribeKeyPairsRequest::AddKeyPairIds
DescribeKeyPairsRequest & AddKeyPairIds(const Aws::String &value)
Definition: DescribeKeyPairsRequest.h:241
Aws::EC2::Model::DescribeKeyPairsRequest::WithKeyNames
DescribeKeyPairsRequest & WithKeyNames(Aws::Vector< Aws::String > &&value)
Definition: DescribeKeyPairsRequest.h:190
Aws::EC2::Model::DescribeKeyPairsRequest::KeyNamesHasBeenSet
bool KeyNamesHasBeenSet() const
Definition: DescribeKeyPairsRequest.h:170
Aws::EC2::Model::DescribeKeyPairsRequest::AddKeyPairIds
DescribeKeyPairsRequest & AddKeyPairIds(const char *value)
Definition: DescribeKeyPairsRequest.h:251