AWS SDK for C++  1.9.129
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>
10 #include <aws/ec2/model/KeyType.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace EC2
18 {
19 namespace Model
20 {
21 
25  {
26  public:
28 
29  // Service request name is the Operation name which will send this request out,
30  // each operation should has unique request name, so that we can get operation's name from this request.
31  // Note: this is not true for response, multiple operations may have the same response name,
32  // so we can not get operation's name from response.
33  inline virtual const char* GetServiceRequestName() const override { return "CreateKeyPair"; }
34 
35  Aws::String SerializePayload() const override;
36 
37  protected:
38  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
39 
40  public:
41 
46  inline const Aws::String& GetKeyName() const{ return m_keyName; }
47 
52  inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
53 
58  inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; }
59 
64  inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); }
65 
70  inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); }
71 
76  inline CreateKeyPairRequest& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;}
77 
82  inline CreateKeyPairRequest& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;}
83 
88  inline CreateKeyPairRequest& WithKeyName(const char* value) { SetKeyName(value); return *this;}
89 
90 
97  inline bool GetDryRun() const{ return m_dryRun; }
98 
105  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
106 
113  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
114 
121  inline CreateKeyPairRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
122 
123 
129  inline const KeyType& GetKeyType() const{ return m_keyType; }
130 
136  inline bool KeyTypeHasBeenSet() const { return m_keyTypeHasBeenSet; }
137 
143  inline void SetKeyType(const KeyType& value) { m_keyTypeHasBeenSet = true; m_keyType = value; }
144 
150  inline void SetKeyType(KeyType&& value) { m_keyTypeHasBeenSet = true; m_keyType = std::move(value); }
151 
157  inline CreateKeyPairRequest& WithKeyType(const KeyType& value) { SetKeyType(value); return *this;}
158 
164  inline CreateKeyPairRequest& WithKeyType(KeyType&& value) { SetKeyType(std::move(value)); return *this;}
165 
166 
170  inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
171 
175  inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
176 
180  inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
181 
185  inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
186 
190  inline CreateKeyPairRequest& WithTagSpecifications(const Aws::Vector<TagSpecification>& value) { SetTagSpecifications(value); return *this;}
191 
195  inline CreateKeyPairRequest& WithTagSpecifications(Aws::Vector<TagSpecification>&& value) { SetTagSpecifications(std::move(value)); return *this;}
196 
200  inline CreateKeyPairRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
201 
205  inline CreateKeyPairRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
206 
207  private:
208 
209  Aws::String m_keyName;
210  bool m_keyNameHasBeenSet;
211 
212  bool m_dryRun;
213  bool m_dryRunHasBeenSet;
214 
215  KeyType m_keyType;
216  bool m_keyTypeHasBeenSet;
217 
218  Aws::Vector<TagSpecification> m_tagSpecifications;
219  bool m_tagSpecificationsHasBeenSet;
220  };
221 
222 } // namespace Model
223 } // namespace EC2
224 } // namespace Aws
Aws::EC2::Model::CreateKeyPairRequest::TagSpecificationsHasBeenSet
bool TagSpecificationsHasBeenSet() const
Definition: CreateKeyPairRequest.h:175
KeyType.h
TagSpecification.h
Aws::EC2::Model::CreateKeyPairRequest::SetTagSpecifications
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: CreateKeyPairRequest.h:180
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:82
Aws::EC2::Model::CreateKeyPairRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::CreateKeyPairRequest::WithKeyName
CreateKeyPairRequest & WithKeyName(const char *value)
Definition: CreateKeyPairRequest.h:88
Aws::EC2::Model::CreateKeyPairRequest::WithKeyName
CreateKeyPairRequest & WithKeyName(const Aws::String &value)
Definition: CreateKeyPairRequest.h:76
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::CreateKeyPairRequest::SetKeyType
void SetKeyType(KeyType &&value)
Definition: CreateKeyPairRequest.h:150
Aws::EC2::Model::KeyType
KeyType
Definition: KeyType.h:17
Aws::EC2::Model::CreateKeyPairRequest
Definition: CreateKeyPairRequest.h:25
Aws::EC2::Model::CreateKeyPairRequest::WithDryRun
CreateKeyPairRequest & WithDryRun(bool value)
Definition: CreateKeyPairRequest.h:121
Aws::EC2::Model::CreateKeyPairRequest::WithKeyType
CreateKeyPairRequest & WithKeyType(KeyType &&value)
Definition: CreateKeyPairRequest.h:164
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:195
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:97
Aws::EC2::Model::CreateKeyPairRequest::AddTagSpecifications
CreateKeyPairRequest & AddTagSpecifications(TagSpecification &&value)
Definition: CreateKeyPairRequest.h:205
Aws::EC2::Model::CreateKeyPairRequest::GetTagSpecifications
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
Definition: CreateKeyPairRequest.h:170
Aws::EC2::Model::CreateKeyPairRequest::SetKeyType
void SetKeyType(const KeyType &value)
Definition: CreateKeyPairRequest.h:143
Aws::EC2::Model::CreateKeyPairRequest::SetDryRun
void SetDryRun(bool value)
Definition: CreateKeyPairRequest.h:113
EC2Request.h
Aws::EC2::Model::CreateKeyPairRequest::KeyTypeHasBeenSet
bool KeyTypeHasBeenSet() const
Definition: CreateKeyPairRequest.h:136
Aws::EC2::Model::CreateKeyPairRequest::SetKeyName
void SetKeyName(const Aws::String &value)
Definition: CreateKeyPairRequest.h:58
AWSString.h
Aws::EC2::Model::CreateKeyPairRequest::SetKeyName
void SetKeyName(Aws::String &&value)
Definition: CreateKeyPairRequest.h:64
Aws::EC2::Model::CreateKeyPairRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: CreateKeyPairRequest.h:105
Aws::EC2::Model::CreateKeyPairRequest::GetKeyType
const KeyType & GetKeyType() const
Definition: CreateKeyPairRequest.h:129
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::CreateKeyPairRequest::SetTagSpecifications
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: CreateKeyPairRequest.h:185
Aws::EC2::Model::CreateKeyPairRequest::KeyNameHasBeenSet
bool KeyNameHasBeenSet() const
Definition: CreateKeyPairRequest.h:52
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:200
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::CreateKeyPairRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateKeyPairRequest.h:33
Aws::EC2::Model::CreateKeyPairRequest::SetKeyName
void SetKeyName(const char *value)
Definition: CreateKeyPairRequest.h:70
Aws::EC2::Model::CreateKeyPairRequest::WithTagSpecifications
CreateKeyPairRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: CreateKeyPairRequest.h:190
Aws::EC2::Model::CreateKeyPairRequest::WithKeyType
CreateKeyPairRequest & WithKeyType(const KeyType &value)
Definition: CreateKeyPairRequest.h:157
Aws::EC2::Model::TagSpecification
Definition: TagSpecification.h:35
EC2_EXPORTS.h
Aws::EC2::Model::CreateKeyPairRequest::GetKeyName
const Aws::String & GetKeyName() const
Definition: CreateKeyPairRequest.h:46