AWS SDK for C++  1.9.67
AWS SDK for C++
CreateKeyPairRequest.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>
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 "CreateKeyPair"; }
33 
34  Aws::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
45  inline const Aws::String& GetKeyName() const{ return m_keyName; }
46 
51  inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
52 
57  inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; }
58 
63  inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); }
64 
69  inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); }
70 
75  inline CreateKeyPairRequest& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;}
76 
81  inline CreateKeyPairRequest& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;}
82 
87  inline CreateKeyPairRequest& WithKeyName(const char* value) { SetKeyName(value); return *this;}
88 
89 
96  inline bool GetDryRun() const{ return m_dryRun; }
97 
104  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
105 
112  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
113 
120  inline CreateKeyPairRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
121 
122 
126  inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
127 
131  inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
132 
136  inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
137 
141  inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
142 
146  inline CreateKeyPairRequest& WithTagSpecifications(const Aws::Vector<TagSpecification>& value) { SetTagSpecifications(value); return *this;}
147 
151  inline CreateKeyPairRequest& WithTagSpecifications(Aws::Vector<TagSpecification>&& value) { SetTagSpecifications(std::move(value)); return *this;}
152 
156  inline CreateKeyPairRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
157 
161  inline CreateKeyPairRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
162 
163  private:
164 
165  Aws::String m_keyName;
166  bool m_keyNameHasBeenSet;
167 
168  bool m_dryRun;
169  bool m_dryRunHasBeenSet;
170 
171  Aws::Vector<TagSpecification> m_tagSpecifications;
172  bool m_tagSpecificationsHasBeenSet;
173  };
174 
175 } // namespace Model
176 } // namespace EC2
177 } // namespace Aws
Aws::EC2::Model::CreateKeyPairRequest::TagSpecificationsHasBeenSet
bool TagSpecificationsHasBeenSet() const
Definition: CreateKeyPairRequest.h:131
TagSpecification.h
Aws::EC2::Model::CreateKeyPairRequest::SetTagSpecifications
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: CreateKeyPairRequest.h:136
Aws::EC2::Model::CreateKeyPairRequest::CreateKeyPairRequest
CreateKeyPairRequest()
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::CreateKeyPairRequest::WithKeyName
CreateKeyPairRequest & WithKeyName(Aws::String &&value)
Definition: CreateKeyPairRequest.h:81
Aws::EC2::Model::CreateKeyPairRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::CreateKeyPairRequest::WithKeyName
CreateKeyPairRequest & WithKeyName(const char *value)
Definition: CreateKeyPairRequest.h:87
Aws::EC2::Model::CreateKeyPairRequest::WithKeyName
CreateKeyPairRequest & WithKeyName(const Aws::String &value)
Definition: CreateKeyPairRequest.h:75
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::CreateKeyPairRequest
Definition: CreateKeyPairRequest.h:24
Aws::EC2::Model::CreateKeyPairRequest::WithDryRun
CreateKeyPairRequest & WithDryRun(bool value)
Definition: CreateKeyPairRequest.h:120
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::CreateKeyPairRequest::WithTagSpecifications
CreateKeyPairRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: CreateKeyPairRequest.h:151
Aws::EC2::Model::CreateKeyPairRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWSVector.h
Aws::EC2::Model::CreateKeyPairRequest::GetDryRun
bool GetDryRun() const
Definition: CreateKeyPairRequest.h:96
Aws::EC2::Model::CreateKeyPairRequest::AddTagSpecifications
CreateKeyPairRequest & AddTagSpecifications(TagSpecification &&value)
Definition: CreateKeyPairRequest.h:161
Aws::EC2::Model::CreateKeyPairRequest::GetTagSpecifications
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
Definition: CreateKeyPairRequest.h:126
Aws::EC2::Model::CreateKeyPairRequest::SetDryRun
void SetDryRun(bool value)
Definition: CreateKeyPairRequest.h:112
EC2Request.h
Aws::EC2::Model::CreateKeyPairRequest::SetKeyName
void SetKeyName(const Aws::String &value)
Definition: CreateKeyPairRequest.h:57
AWSString.h
Aws::EC2::Model::CreateKeyPairRequest::SetKeyName
void SetKeyName(Aws::String &&value)
Definition: CreateKeyPairRequest.h:63
Aws::EC2::Model::CreateKeyPairRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: CreateKeyPairRequest.h:104
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::CreateKeyPairRequest::SetTagSpecifications
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: CreateKeyPairRequest.h:141
Aws::EC2::Model::CreateKeyPairRequest::KeyNameHasBeenSet
bool KeyNameHasBeenSet() const
Definition: CreateKeyPairRequest.h:51
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::CreateKeyPairRequest::AddTagSpecifications
CreateKeyPairRequest & AddTagSpecifications(const TagSpecification &value)
Definition: CreateKeyPairRequest.h:156
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::CreateKeyPairRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateKeyPairRequest.h:32
Aws::EC2::Model::CreateKeyPairRequest::SetKeyName
void SetKeyName(const char *value)
Definition: CreateKeyPairRequest.h:69
Aws::EC2::Model::CreateKeyPairRequest::WithTagSpecifications
CreateKeyPairRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: CreateKeyPairRequest.h:146
Aws::EC2::Model::TagSpecification
Definition: TagSpecification.h:35
EC2_EXPORTS.h
Aws::EC2::Model::CreateKeyPairRequest::GetKeyName
const Aws::String & GetKeyName() const
Definition: CreateKeyPairRequest.h:45