AWS SDK for C++

AWS SDK for C++ Version 1.11.937

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
139 inline KeyUsageType GetKeyUsage() const { return m_keyUsage; }
140 inline bool KeyUsageHasBeenSet() const { return m_keyUsageHasBeenSet; }
141 inline void SetKeyUsage(KeyUsageType value) {
142 m_keyUsageHasBeenSet = true;
143 m_keyUsage = value;
144 }
146 SetKeyUsage(value);
147 return *this;
148 }
150
152
211 inline KeySpec GetKeySpec() const { return m_keySpec; }
212 inline bool KeySpecHasBeenSet() const { return m_keySpecHasBeenSet; }
213 inline void SetKeySpec(KeySpec value) {
214 m_keySpecHasBeenSet = true;
215 m_keySpec = value;
216 }
218 SetKeySpec(value);
219 return *this;
220 }
222
224
249 inline OriginType GetOrigin() const { return m_origin; }
250 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
251 inline void SetOrigin(OriginType value) {
252 m_originHasBeenSet = true;
253 m_origin = value;
254 }
256 SetOrigin(value);
257 return *this;
258 }
260
262
276 inline const Aws::String& GetCustomKeyStoreId() const { return m_customKeyStoreId; }
277 inline bool CustomKeyStoreIdHasBeenSet() const { return m_customKeyStoreIdHasBeenSet; }
278 template <typename CustomKeyStoreIdT = Aws::String>
279 void SetCustomKeyStoreId(CustomKeyStoreIdT&& value) {
280 m_customKeyStoreIdHasBeenSet = true;
281 m_customKeyStoreId = std::forward<CustomKeyStoreIdT>(value);
282 }
283 template <typename CustomKeyStoreIdT = Aws::String>
284 CreateKeyRequest& WithCustomKeyStoreId(CustomKeyStoreIdT&& value) {
285 SetCustomKeyStoreId(std::forward<CustomKeyStoreIdT>(value));
286 return *this;
287 }
289
291
303 inline bool GetBypassPolicyLockoutSafetyCheck() const { return m_bypassPolicyLockoutSafetyCheck; }
304 inline bool BypassPolicyLockoutSafetyCheckHasBeenSet() const { return m_bypassPolicyLockoutSafetyCheckHasBeenSet; }
305 inline void SetBypassPolicyLockoutSafetyCheck(bool value) {
306 m_bypassPolicyLockoutSafetyCheckHasBeenSet = true;
307 m_bypassPolicyLockoutSafetyCheck = value;
308 }
311 return *this;
312 }
314
316
339 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
340 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
341 template <typename TagsT = Aws::Vector<Tag>>
342 void SetTags(TagsT&& value) {
343 m_tagsHasBeenSet = true;
344 m_tags = std::forward<TagsT>(value);
345 }
346 template <typename TagsT = Aws::Vector<Tag>>
347 CreateKeyRequest& WithTags(TagsT&& value) {
348 SetTags(std::forward<TagsT>(value));
349 return *this;
350 }
351 template <typename TagsT = Tag>
352 CreateKeyRequest& AddTags(TagsT&& value) {
353 m_tagsHasBeenSet = true;
354 m_tags.emplace_back(std::forward<TagsT>(value));
355 return *this;
356 }
358
360
381 inline bool GetMultiRegion() const { return m_multiRegion; }
382 inline bool MultiRegionHasBeenSet() const { return m_multiRegionHasBeenSet; }
383 inline void SetMultiRegion(bool value) {
384 m_multiRegionHasBeenSet = true;
385 m_multiRegion = value;
386 }
387 inline CreateKeyRequest& WithMultiRegion(bool value) {
388 SetMultiRegion(value);
389 return *this;
390 }
392
394
423 inline const Aws::String& GetXksKeyId() const { return m_xksKeyId; }
424 inline bool XksKeyIdHasBeenSet() const { return m_xksKeyIdHasBeenSet; }
425 template <typename XksKeyIdT = Aws::String>
426 void SetXksKeyId(XksKeyIdT&& value) {
427 m_xksKeyIdHasBeenSet = true;
428 m_xksKeyId = std::forward<XksKeyIdT>(value);
429 }
430 template <typename XksKeyIdT = Aws::String>
431 CreateKeyRequest& WithXksKeyId(XksKeyIdT&& value) {
432 SetXksKeyId(std::forward<XksKeyIdT>(value));
433 return *this;
434 }
436 private:
437 Aws::String m_policy;
438
439 Aws::String m_description;
440
442
443 KeySpec m_keySpec{KeySpec::NOT_SET};
444
446
447 Aws::String m_customKeyStoreId;
448
449 bool m_bypassPolicyLockoutSafetyCheck{false};
450
451 Aws::Vector<Tag> m_tags;
452
453 bool m_multiRegion{false};
454
455 Aws::String m_xksKeyId;
456 bool m_policyHasBeenSet = false;
457 bool m_descriptionHasBeenSet = false;
458 bool m_keyUsageHasBeenSet = false;
459 bool m_keySpecHasBeenSet = false;
460 bool m_originHasBeenSet = false;
461 bool m_customKeyStoreIdHasBeenSet = false;
462 bool m_bypassPolicyLockoutSafetyCheckHasBeenSet = false;
463 bool m_tagsHasBeenSet = false;
464 bool m_multiRegionHasBeenSet = false;
465 bool m_xksKeyIdHasBeenSet = false;
466};
467
468} // namespace Model
469} // namespace KMS
470} // 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