AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CreateKeyPairRequest.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/AWSString.h>
10#include <aws/ec2/model/KeyType.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/ec2/model/KeyFormat.h>
13#include <aws/ec2/model/TagSpecification.h>
14#include <utility>
15
16namespace Aws
17{
18namespace EC2
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_EC2_API CreateKeyPairRequest();
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateKeyPair"; }
35
36 AWS_EC2_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40
41 public:
42
44
48 inline const Aws::String& GetKeyName() const{ return m_keyName; }
49 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
50 inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; }
51 inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); }
52 inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); }
53 inline CreateKeyPairRequest& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;}
54 inline CreateKeyPairRequest& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;}
55 inline CreateKeyPairRequest& WithKeyName(const char* value) { SetKeyName(value); return *this;}
57
59
63 inline const KeyType& GetKeyType() const{ return m_keyType; }
64 inline bool KeyTypeHasBeenSet() const { return m_keyTypeHasBeenSet; }
65 inline void SetKeyType(const KeyType& value) { m_keyTypeHasBeenSet = true; m_keyType = value; }
66 inline void SetKeyType(KeyType&& value) { m_keyTypeHasBeenSet = true; m_keyType = std::move(value); }
67 inline CreateKeyPairRequest& WithKeyType(const KeyType& value) { SetKeyType(value); return *this;}
68 inline CreateKeyPairRequest& WithKeyType(KeyType&& value) { SetKeyType(std::move(value)); return *this;}
70
72
75 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
76 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
77 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
78 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
81 inline CreateKeyPairRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
82 inline CreateKeyPairRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
84
86
89 inline const KeyFormat& GetKeyFormat() const{ return m_keyFormat; }
90 inline bool KeyFormatHasBeenSet() const { return m_keyFormatHasBeenSet; }
91 inline void SetKeyFormat(const KeyFormat& value) { m_keyFormatHasBeenSet = true; m_keyFormat = value; }
92 inline void SetKeyFormat(KeyFormat&& value) { m_keyFormatHasBeenSet = true; m_keyFormat = std::move(value); }
93 inline CreateKeyPairRequest& WithKeyFormat(const KeyFormat& value) { SetKeyFormat(value); return *this;}
94 inline CreateKeyPairRequest& WithKeyFormat(KeyFormat&& value) { SetKeyFormat(std::move(value)); return *this;}
96
98
104 inline bool GetDryRun() const{ return m_dryRun; }
105 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
106 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
107 inline CreateKeyPairRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
109 private:
110
111 Aws::String m_keyName;
112 bool m_keyNameHasBeenSet = false;
113
114 KeyType m_keyType;
115 bool m_keyTypeHasBeenSet = false;
116
117 Aws::Vector<TagSpecification> m_tagSpecifications;
118 bool m_tagSpecificationsHasBeenSet = false;
119
120 KeyFormat m_keyFormat;
121 bool m_keyFormatHasBeenSet = false;
122
123 bool m_dryRun;
124 bool m_dryRunHasBeenSet = false;
125 };
126
127} // namespace Model
128} // namespace EC2
129} // namespace Aws
CreateKeyPairRequest & AddTagSpecifications(TagSpecification &&value)
void SetKeyFormat(const KeyFormat &value)
CreateKeyPairRequest & WithKeyType(KeyType &&value)
CreateKeyPairRequest & WithKeyName(const Aws::String &value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
virtual const char * GetServiceRequestName() const override
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateKeyPairRequest & WithKeyFormat(KeyFormat &&value)
CreateKeyPairRequest & WithKeyName(Aws::String &&value)
void SetKeyName(const Aws::String &value)
CreateKeyPairRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
CreateKeyPairRequest & AddTagSpecifications(const TagSpecification &value)
CreateKeyPairRequest & WithKeyType(const KeyType &value)
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
CreateKeyPairRequest & WithDryRun(bool value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateKeyPairRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateKeyPairRequest & WithKeyName(const char *value)
CreateKeyPairRequest & WithKeyFormat(const KeyFormat &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector