AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CreateSecretRequest.h
1
6#pragma once
7#include <aws/core/utils/Array.h>
8#include <aws/core/utils/UUID.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/secretsmanager/SecretsManagerRequest.h>
12#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
13#include <aws/secretsmanager/model/ReplicaRegionType.h>
14#include <aws/secretsmanager/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace SecretsManager {
20namespace Model {
21
25 public:
26 AWS_SECRETSMANAGER_API CreateSecretRequest() = default;
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 "CreateSecret"; }
33
34 AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
35
36 AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37
39
47 inline const Aws::String& GetName() const { return m_name; }
48 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
49 template <typename NameT = Aws::String>
50 void SetName(NameT&& value) {
51 m_nameHasBeenSet = true;
52 m_name = std::forward<NameT>(value);
53 }
54 template <typename NameT = Aws::String>
55 CreateSecretRequest& WithName(NameT&& value) {
56 SetName(std::forward<NameT>(value));
57 return *this;
58 }
60
62
89 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
90 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
91 template <typename ClientRequestTokenT = Aws::String>
92 void SetClientRequestToken(ClientRequestTokenT&& value) {
93 m_clientRequestTokenHasBeenSet = true;
94 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
95 }
96 template <typename ClientRequestTokenT = Aws::String>
97 CreateSecretRequest& WithClientRequestToken(ClientRequestTokenT&& value) {
98 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
99 return *this;
100 }
102
104
107 inline const Aws::String& GetDescription() const { return m_description; }
108 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
109 template <typename DescriptionT = Aws::String>
110 void SetDescription(DescriptionT&& value) {
111 m_descriptionHasBeenSet = true;
112 m_description = std::forward<DescriptionT>(value);
113 }
114 template <typename DescriptionT = Aws::String>
115 CreateSecretRequest& WithDescription(DescriptionT&& value) {
116 SetDescription(std::forward<DescriptionT>(value));
117 return *this;
118 }
120
122
137 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
138 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
139 template <typename KmsKeyIdT = Aws::String>
140 void SetKmsKeyId(KmsKeyIdT&& value) {
141 m_kmsKeyIdHasBeenSet = true;
142 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
143 }
144 template <typename KmsKeyIdT = Aws::String>
145 CreateSecretRequest& WithKmsKeyId(KmsKeyIdT&& value) {
146 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
147 return *this;
148 }
150
152
162 inline const Aws::Utils::CryptoBuffer& GetSecretBinary() const { return m_secretBinary; }
163 inline bool SecretBinaryHasBeenSet() const { return m_secretBinaryHasBeenSet; }
164 template <typename SecretBinaryT = Aws::Utils::CryptoBuffer>
165 void SetSecretBinary(SecretBinaryT&& value) {
166 m_secretBinaryHasBeenSet = true;
167 m_secretBinary = std::forward<SecretBinaryT>(value);
168 }
169 template <typename SecretBinaryT = Aws::Utils::CryptoBuffer>
170 CreateSecretRequest& WithSecretBinary(SecretBinaryT&& value) {
171 SetSecretBinary(std::forward<SecretBinaryT>(value));
172 return *this;
173 }
175
177
189 inline const Aws::String& GetSecretString() const { return m_secretString; }
190 inline bool SecretStringHasBeenSet() const { return m_secretStringHasBeenSet; }
191 template <typename SecretStringT = Aws::String>
192 void SetSecretString(SecretStringT&& value) {
193 m_secretStringHasBeenSet = true;
194 m_secretString = std::forward<SecretStringT>(value);
195 }
196 template <typename SecretStringT = Aws::String>
197 CreateSecretRequest& WithSecretString(SecretStringT&& value) {
198 SetSecretString(std::forward<SecretStringT>(value));
199 return *this;
200 }
202
204
230 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
231 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
232 template <typename TagsT = Aws::Vector<Tag>>
233 void SetTags(TagsT&& value) {
234 m_tagsHasBeenSet = true;
235 m_tags = std::forward<TagsT>(value);
236 }
237 template <typename TagsT = Aws::Vector<Tag>>
239 SetTags(std::forward<TagsT>(value));
240 return *this;
241 }
242 template <typename TagsT = Tag>
243 CreateSecretRequest& AddTags(TagsT&& value) {
244 m_tagsHasBeenSet = true;
245 m_tags.emplace_back(std::forward<TagsT>(value));
246 return *this;
247 }
249
251
254 inline const Aws::Vector<ReplicaRegionType>& GetAddReplicaRegions() const { return m_addReplicaRegions; }
255 inline bool AddReplicaRegionsHasBeenSet() const { return m_addReplicaRegionsHasBeenSet; }
256 template <typename AddReplicaRegionsT = Aws::Vector<ReplicaRegionType>>
257 void SetAddReplicaRegions(AddReplicaRegionsT&& value) {
258 m_addReplicaRegionsHasBeenSet = true;
259 m_addReplicaRegions = std::forward<AddReplicaRegionsT>(value);
260 }
261 template <typename AddReplicaRegionsT = Aws::Vector<ReplicaRegionType>>
262 CreateSecretRequest& WithAddReplicaRegions(AddReplicaRegionsT&& value) {
263 SetAddReplicaRegions(std::forward<AddReplicaRegionsT>(value));
264 return *this;
265 }
266 template <typename AddReplicaRegionsT = ReplicaRegionType>
267 CreateSecretRequest& AddAddReplicaRegions(AddReplicaRegionsT&& value) {
268 m_addReplicaRegionsHasBeenSet = true;
269 m_addReplicaRegions.emplace_back(std::forward<AddReplicaRegionsT>(value));
270 return *this;
271 }
273
275
279 inline bool GetForceOverwriteReplicaSecret() const { return m_forceOverwriteReplicaSecret; }
280 inline bool ForceOverwriteReplicaSecretHasBeenSet() const { return m_forceOverwriteReplicaSecretHasBeenSet; }
281 inline void SetForceOverwriteReplicaSecret(bool value) {
282 m_forceOverwriteReplicaSecretHasBeenSet = true;
283 m_forceOverwriteReplicaSecret = value;
284 }
287 return *this;
288 }
290
292
298 inline const Aws::String& GetType() const { return m_type; }
299 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
300 template <typename TypeT = Aws::String>
301 void SetType(TypeT&& value) {
302 m_typeHasBeenSet = true;
303 m_type = std::forward<TypeT>(value);
304 }
305 template <typename TypeT = Aws::String>
307 SetType(std::forward<TypeT>(value));
308 return *this;
309 }
311 private:
312 Aws::String m_name;
313
314 Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
315
316 Aws::String m_description;
317
318 Aws::String m_kmsKeyId;
319
320 Aws::Utils::CryptoBuffer m_secretBinary{};
321
322 Aws::String m_secretString;
323
324 Aws::Vector<Tag> m_tags;
325
326 Aws::Vector<ReplicaRegionType> m_addReplicaRegions;
327
328 bool m_forceOverwriteReplicaSecret{false};
329
330 Aws::String m_type;
331 bool m_nameHasBeenSet = false;
332 bool m_clientRequestTokenHasBeenSet = true;
333 bool m_descriptionHasBeenSet = false;
334 bool m_kmsKeyIdHasBeenSet = false;
335 bool m_secretBinaryHasBeenSet = false;
336 bool m_secretStringHasBeenSet = false;
337 bool m_tagsHasBeenSet = false;
338 bool m_addReplicaRegionsHasBeenSet = false;
339 bool m_forceOverwriteReplicaSecretHasBeenSet = false;
340 bool m_typeHasBeenSet = false;
341};
342
343} // namespace Model
344} // namespace SecretsManager
345} // namespace Aws
CreateSecretRequest & WithKmsKeyId(KmsKeyIdT &&value)
CreateSecretRequest & WithTags(TagsT &&value)
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateSecretRequest & WithAddReplicaRegions(AddReplicaRegionsT &&value)
AWS_SECRETSMANAGER_API CreateSecretRequest()=default
CreateSecretRequest & WithSecretBinary(SecretBinaryT &&value)
CreateSecretRequest & WithClientRequestToken(ClientRequestTokenT &&value)
CreateSecretRequest & WithDescription(DescriptionT &&value)
CreateSecretRequest & WithSecretString(SecretStringT &&value)
const Aws::Utils::CryptoBuffer & GetSecretBinary() const
const Aws::Vector< ReplicaRegionType > & GetAddReplicaRegions() const
CreateSecretRequest & AddTags(TagsT &&value)
CreateSecretRequest & WithType(TypeT &&value)
virtual const char * GetServiceRequestName() const override
void SetAddReplicaRegions(AddReplicaRegionsT &&value)
void SetClientRequestToken(ClientRequestTokenT &&value)
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override
CreateSecretRequest & WithForceOverwriteReplicaSecret(bool value)
CreateSecretRequest & WithName(NameT &&value)
CreateSecretRequest & AddAddReplicaRegions(AddReplicaRegionsT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector