AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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() = default;
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 template<typename KeyNameT = Aws::String>
51 void SetKeyName(KeyNameT&& value) { m_keyNameHasBeenSet = true; m_keyName = std::forward<KeyNameT>(value); }
52 template<typename KeyNameT = Aws::String>
53 CreateKeyPairRequest& WithKeyName(KeyNameT&& value) { SetKeyName(std::forward<KeyNameT>(value)); return *this;}
55
57
61 inline KeyType GetKeyType() const { return m_keyType; }
62 inline bool KeyTypeHasBeenSet() const { return m_keyTypeHasBeenSet; }
63 inline void SetKeyType(KeyType value) { m_keyTypeHasBeenSet = true; m_keyType = value; }
64 inline CreateKeyPairRequest& WithKeyType(KeyType value) { SetKeyType(value); return *this;}
66
68
71 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
72 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
73 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
74 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
75 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
76 CreateKeyPairRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
77 template<typename TagSpecificationsT = TagSpecification>
78 CreateKeyPairRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
80
82
85 inline KeyFormat GetKeyFormat() const { return m_keyFormat; }
86 inline bool KeyFormatHasBeenSet() const { return m_keyFormatHasBeenSet; }
87 inline void SetKeyFormat(KeyFormat value) { m_keyFormatHasBeenSet = true; m_keyFormat = value; }
88 inline CreateKeyPairRequest& WithKeyFormat(KeyFormat value) { SetKeyFormat(value); return *this;}
90
92
98 inline bool GetDryRun() const { return m_dryRun; }
99 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
100 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
101 inline CreateKeyPairRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
103 private:
104
105 Aws::String m_keyName;
106 bool m_keyNameHasBeenSet = false;
107
108 KeyType m_keyType{KeyType::NOT_SET};
109 bool m_keyTypeHasBeenSet = false;
110
111 Aws::Vector<TagSpecification> m_tagSpecifications;
112 bool m_tagSpecificationsHasBeenSet = false;
113
114 KeyFormat m_keyFormat{KeyFormat::NOT_SET};
115 bool m_keyFormatHasBeenSet = false;
116
117 bool m_dryRun{false};
118 bool m_dryRunHasBeenSet = false;
119 };
120
121} // namespace Model
122} // namespace EC2
123} // namespace Aws
CreateKeyPairRequest & WithKeyType(KeyType value)
CreateKeyPairRequest & WithKeyFormat(KeyFormat value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CreateKeyPairRequest & AddTagSpecifications(TagSpecificationsT &&value)
virtual const char * GetServiceRequestName() const override
void SetTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateKeyPairRequest & WithTagSpecifications(TagSpecificationsT &&value)
CreateKeyPairRequest & WithDryRun(bool value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateKeyPairRequest & WithKeyName(KeyNameT &&value)
AWS_EC2_API CreateKeyPairRequest()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector