AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CreateKeyRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/kms/KMSRequest.h>
10#include <aws/kms/KMS_EXPORTS.h>
11#include <aws/kms/model/KeySpec.h>
12#include <aws/kms/model/KeyUsageType.h>
13#include <aws/kms/model/OriginType.h>
14#include <aws/kms/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace KMS {
20namespace Model {
21
25 public:
26 AWS_KMS_API CreateKeyRequest() = 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 "CreateKey"; }
33
34 AWS_KMS_API Aws::String SerializePayload() const override;
35
37
39
75 inline const Aws::String& GetPolicy() const { return m_policy; }
76 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
77 template <typename PolicyT = Aws::String>
78 void SetPolicy(PolicyT&& value) {
79 m_policyHasBeenSet = true;
80 m_policy = std::forward<PolicyT>(value);
81 }
82 template <typename PolicyT = Aws::String>
83 CreateKeyRequest& WithPolicy(PolicyT&& value) {
84 SetPolicy(std::forward<PolicyT>(value));
85 return *this;
86 }
88
90
98 inline const Aws::String& GetDescription() const { return m_description; }
99 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
100 template <typename DescriptionT = Aws::String>
101 void SetDescription(DescriptionT&& value) {
102 m_descriptionHasBeenSet = true;
103 m_description = std::forward<DescriptionT>(value);
104 }
105 template <typename DescriptionT = Aws::String>
106 CreateKeyRequest& WithDescription(DescriptionT&& value) {
107 SetDescription(std::forward<DescriptionT>(value));
108 return *this;
109 }
111
113
138 inline KeyUsageType GetKeyUsage() const { return m_keyUsage; }
139 inline bool KeyUsageHasBeenSet() const { return m_keyUsageHasBeenSet; }
140 inline void SetKeyUsage(KeyUsageType value) {
141 m_keyUsageHasBeenSet = true;
142 m_keyUsage = value;
143 }
145 SetKeyUsage(value);
146 return *this;
147 }
149
151
206 inline KeySpec GetKeySpec() const { return m_keySpec; }
207 inline bool KeySpecHasBeenSet() const { return m_keySpecHasBeenSet; }
208 inline void SetKeySpec(KeySpec value) {
209 m_keySpecHasBeenSet = true;
210 m_keySpec = value;
211 }
213 SetKeySpec(value);
214 return *this;
215 }
217
219
244 inline OriginType GetOrigin() const { return m_origin; }
245 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
246 inline void SetOrigin(OriginType value) {
247 m_originHasBeenSet = true;
248 m_origin = value;
249 }
251 SetOrigin(value);
252 return *this;
253 }
255
257
271 inline const Aws::String& GetCustomKeyStoreId() const { return m_customKeyStoreId; }
272 inline bool CustomKeyStoreIdHasBeenSet() const { return m_customKeyStoreIdHasBeenSet; }
273 template <typename CustomKeyStoreIdT = Aws::String>
274 void SetCustomKeyStoreId(CustomKeyStoreIdT&& value) {
275 m_customKeyStoreIdHasBeenSet = true;
276 m_customKeyStoreId = std::forward<CustomKeyStoreIdT>(value);
277 }
278 template <typename CustomKeyStoreIdT = Aws::String>
279 CreateKeyRequest& WithCustomKeyStoreId(CustomKeyStoreIdT&& value) {
280 SetCustomKeyStoreId(std::forward<CustomKeyStoreIdT>(value));
281 return *this;
282 }
284
286
298 inline bool GetBypassPolicyLockoutSafetyCheck() const { return m_bypassPolicyLockoutSafetyCheck; }
299 inline bool BypassPolicyLockoutSafetyCheckHasBeenSet() const { return m_bypassPolicyLockoutSafetyCheckHasBeenSet; }
300 inline void SetBypassPolicyLockoutSafetyCheck(bool value) {
301 m_bypassPolicyLockoutSafetyCheckHasBeenSet = true;
302 m_bypassPolicyLockoutSafetyCheck = value;
303 }
306 return *this;
307 }
309
311
334 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
335 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
336 template <typename TagsT = Aws::Vector<Tag>>
337 void SetTags(TagsT&& value) {
338 m_tagsHasBeenSet = true;
339 m_tags = std::forward<TagsT>(value);
340 }
341 template <typename TagsT = Aws::Vector<Tag>>
342 CreateKeyRequest& WithTags(TagsT&& value) {
343 SetTags(std::forward<TagsT>(value));
344 return *this;
345 }
346 template <typename TagsT = Tag>
347 CreateKeyRequest& AddTags(TagsT&& value) {
348 m_tagsHasBeenSet = true;
349 m_tags.emplace_back(std::forward<TagsT>(value));
350 return *this;
351 }
353
355
376 inline bool GetMultiRegion() const { return m_multiRegion; }
377 inline bool MultiRegionHasBeenSet() const { return m_multiRegionHasBeenSet; }
378 inline void SetMultiRegion(bool value) {
379 m_multiRegionHasBeenSet = true;
380 m_multiRegion = value;
381 }
382 inline CreateKeyRequest& WithMultiRegion(bool value) {
383 SetMultiRegion(value);
384 return *this;
385 }
387
389
418 inline const Aws::String& GetXksKeyId() const { return m_xksKeyId; }
419 inline bool XksKeyIdHasBeenSet() const { return m_xksKeyIdHasBeenSet; }
420 template <typename XksKeyIdT = Aws::String>
421 void SetXksKeyId(XksKeyIdT&& value) {
422 m_xksKeyIdHasBeenSet = true;
423 m_xksKeyId = std::forward<XksKeyIdT>(value);
424 }
425 template <typename XksKeyIdT = Aws::String>
426 CreateKeyRequest& WithXksKeyId(XksKeyIdT&& value) {
427 SetXksKeyId(std::forward<XksKeyIdT>(value));
428 return *this;
429 }
431 private:
432 Aws::String m_policy;
433
434 Aws::String m_description;
435
437
438 KeySpec m_keySpec{KeySpec::NOT_SET};
439
441
442 Aws::String m_customKeyStoreId;
443
444 bool m_bypassPolicyLockoutSafetyCheck{false};
445
446 Aws::Vector<Tag> m_tags;
447
448 bool m_multiRegion{false};
449
450 Aws::String m_xksKeyId;
451 bool m_policyHasBeenSet = false;
452 bool m_descriptionHasBeenSet = false;
453 bool m_keyUsageHasBeenSet = false;
454 bool m_keySpecHasBeenSet = false;
455 bool m_originHasBeenSet = false;
456 bool m_customKeyStoreIdHasBeenSet = false;
457 bool m_bypassPolicyLockoutSafetyCheckHasBeenSet = false;
458 bool m_tagsHasBeenSet = false;
459 bool m_multiRegionHasBeenSet = false;
460 bool m_xksKeyIdHasBeenSet = false;
461};
462
463} // namespace Model
464} // namespace KMS
465} // namespace Aws
const Aws::String & GetCustomKeyStoreId() const
CreateKeyRequest & WithXksKeyId(XksKeyIdT &&value)
void SetKeyUsage(KeyUsageType value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_KMS_API CreateKeyRequest()=default
const Aws::String & GetXksKeyId() const
const Aws::Vector< Tag > & GetTags() const
CreateKeyRequest & WithDescription(DescriptionT &&value)
CreateKeyRequest & AddTags(TagsT &&value)
void SetBypassPolicyLockoutSafetyCheck(bool value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetPolicy() const
AWS_KMS_API Aws::String SerializePayload() const override
CreateKeyRequest & WithKeySpec(KeySpec value)
const Aws::String & GetDescription() const
CreateKeyRequest & WithCustomKeyStoreId(CustomKeyStoreIdT &&value)
CreateKeyRequest & WithOrigin(OriginType value)
CreateKeyRequest & WithPolicy(PolicyT &&value)
CreateKeyRequest & WithKeyUsage(KeyUsageType value)
void SetXksKeyId(XksKeyIdT &&value)
void SetCustomKeyStoreId(CustomKeyStoreIdT &&value)
void SetDescription(DescriptionT &&value)
CreateKeyRequest & WithMultiRegion(bool value)
CreateKeyRequest & WithTags(TagsT &&value)
CreateKeyRequest & WithBypassPolicyLockoutSafetyCheck(bool value)
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