AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CreateKeyRequest.h
1
6#pragma once
7#include <aws/kms/KMS_EXPORTS.h>
8#include <aws/kms/KMSRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/kms/model/KeyUsageType.h>
11#include <aws/kms/model/KeySpec.h>
12#include <aws/kms/model/OriginType.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/kms/model/Tag.h>
15#include <utility>
16
17namespace Aws
18{
19namespace KMS
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_KMS_API CreateKeyRequest();
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateKey"; }
36
37 AWS_KMS_API Aws::String SerializePayload() const override;
38
40
41
43
70 inline const Aws::String& GetPolicy() const{ return m_policy; }
71 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
72 inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
73 inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); }
74 inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
75 inline CreateKeyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
76 inline CreateKeyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;}
77 inline CreateKeyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
79
81
89 inline const Aws::String& GetDescription() const{ return m_description; }
90 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
91 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
92 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
93 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
94 inline CreateKeyRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
95 inline CreateKeyRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
96 inline CreateKeyRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
98
100
119 inline const KeyUsageType& GetKeyUsage() const{ return m_keyUsage; }
120 inline bool KeyUsageHasBeenSet() const { return m_keyUsageHasBeenSet; }
121 inline void SetKeyUsage(const KeyUsageType& value) { m_keyUsageHasBeenSet = true; m_keyUsage = value; }
122 inline void SetKeyUsage(KeyUsageType&& value) { m_keyUsageHasBeenSet = true; m_keyUsage = std::move(value); }
123 inline CreateKeyRequest& WithKeyUsage(const KeyUsageType& value) { SetKeyUsage(value); return *this;}
124 inline CreateKeyRequest& WithKeyUsage(KeyUsageType&& value) { SetKeyUsage(std::move(value)); return *this;}
126
128
171 inline const KeySpec& GetKeySpec() const{ return m_keySpec; }
172 inline bool KeySpecHasBeenSet() const { return m_keySpecHasBeenSet; }
173 inline void SetKeySpec(const KeySpec& value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
174 inline void SetKeySpec(KeySpec&& value) { m_keySpecHasBeenSet = true; m_keySpec = std::move(value); }
175 inline CreateKeyRequest& WithKeySpec(const KeySpec& value) { SetKeySpec(value); return *this;}
176 inline CreateKeyRequest& WithKeySpec(KeySpec&& value) { SetKeySpec(std::move(value)); return *this;}
178
180
205 inline const OriginType& GetOrigin() const{ return m_origin; }
206 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
207 inline void SetOrigin(const OriginType& value) { m_originHasBeenSet = true; m_origin = value; }
208 inline void SetOrigin(OriginType&& value) { m_originHasBeenSet = true; m_origin = std::move(value); }
209 inline CreateKeyRequest& WithOrigin(const OriginType& value) { SetOrigin(value); return *this;}
210 inline CreateKeyRequest& WithOrigin(OriginType&& value) { SetOrigin(std::move(value)); return *this;}
212
214
228 inline const Aws::String& GetCustomKeyStoreId() const{ return m_customKeyStoreId; }
229 inline bool CustomKeyStoreIdHasBeenSet() const { return m_customKeyStoreIdHasBeenSet; }
230 inline void SetCustomKeyStoreId(const Aws::String& value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId = value; }
231 inline void SetCustomKeyStoreId(Aws::String&& value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId = std::move(value); }
232 inline void SetCustomKeyStoreId(const char* value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId.assign(value); }
233 inline CreateKeyRequest& WithCustomKeyStoreId(const Aws::String& value) { SetCustomKeyStoreId(value); return *this;}
234 inline CreateKeyRequest& WithCustomKeyStoreId(Aws::String&& value) { SetCustomKeyStoreId(std::move(value)); return *this;}
235 inline CreateKeyRequest& WithCustomKeyStoreId(const char* value) { SetCustomKeyStoreId(value); return *this;}
237
239
251 inline bool GetBypassPolicyLockoutSafetyCheck() const{ return m_bypassPolicyLockoutSafetyCheck; }
252 inline bool BypassPolicyLockoutSafetyCheckHasBeenSet() const { return m_bypassPolicyLockoutSafetyCheckHasBeenSet; }
253 inline void SetBypassPolicyLockoutSafetyCheck(bool value) { m_bypassPolicyLockoutSafetyCheckHasBeenSet = true; m_bypassPolicyLockoutSafetyCheck = value; }
256
258
281 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
282 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
283 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
284 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
285 inline CreateKeyRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
286 inline CreateKeyRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
287 inline CreateKeyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
288 inline CreateKeyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
290
292
313 inline bool GetMultiRegion() const{ return m_multiRegion; }
314 inline bool MultiRegionHasBeenSet() const { return m_multiRegionHasBeenSet; }
315 inline void SetMultiRegion(bool value) { m_multiRegionHasBeenSet = true; m_multiRegion = value; }
316 inline CreateKeyRequest& WithMultiRegion(bool value) { SetMultiRegion(value); return *this;}
318
320
349 inline const Aws::String& GetXksKeyId() const{ return m_xksKeyId; }
350 inline bool XksKeyIdHasBeenSet() const { return m_xksKeyIdHasBeenSet; }
351 inline void SetXksKeyId(const Aws::String& value) { m_xksKeyIdHasBeenSet = true; m_xksKeyId = value; }
352 inline void SetXksKeyId(Aws::String&& value) { m_xksKeyIdHasBeenSet = true; m_xksKeyId = std::move(value); }
353 inline void SetXksKeyId(const char* value) { m_xksKeyIdHasBeenSet = true; m_xksKeyId.assign(value); }
354 inline CreateKeyRequest& WithXksKeyId(const Aws::String& value) { SetXksKeyId(value); return *this;}
355 inline CreateKeyRequest& WithXksKeyId(Aws::String&& value) { SetXksKeyId(std::move(value)); return *this;}
356 inline CreateKeyRequest& WithXksKeyId(const char* value) { SetXksKeyId(value); return *this;}
358 private:
359
360 Aws::String m_policy;
361 bool m_policyHasBeenSet = false;
362
363 Aws::String m_description;
364 bool m_descriptionHasBeenSet = false;
365
366 KeyUsageType m_keyUsage;
367 bool m_keyUsageHasBeenSet = false;
368
369 KeySpec m_keySpec;
370 bool m_keySpecHasBeenSet = false;
371
372 OriginType m_origin;
373 bool m_originHasBeenSet = false;
374
375 Aws::String m_customKeyStoreId;
376 bool m_customKeyStoreIdHasBeenSet = false;
377
378 bool m_bypassPolicyLockoutSafetyCheck;
379 bool m_bypassPolicyLockoutSafetyCheckHasBeenSet = false;
380
381 Aws::Vector<Tag> m_tags;
382 bool m_tagsHasBeenSet = false;
383
384 bool m_multiRegion;
385 bool m_multiRegionHasBeenSet = false;
386
387 Aws::String m_xksKeyId;
388 bool m_xksKeyIdHasBeenSet = false;
389 };
390
391} // namespace Model
392} // namespace KMS
393} // namespace Aws
CreateKeyRequest & WithOrigin(OriginType &&value)
void SetPolicy(const Aws::String &value)
void SetKeyUsage(KeyUsageType &&value)
CreateKeyRequest & WithCustomKeyStoreId(const Aws::String &value)
const Aws::String & GetCustomKeyStoreId() const
CreateKeyRequest & WithCustomKeyStoreId(Aws::String &&value)
const KeyUsageType & GetKeyUsage() const
void SetDescription(const Aws::String &value)
void SetTags(Aws::Vector< Tag > &&value)
void SetXksKeyId(const char *value)
void SetCustomKeyStoreId(const Aws::String &value)
void SetPolicy(Aws::String &&value)
void SetCustomKeyStoreId(const char *value)
CreateKeyRequest & WithPolicy(Aws::String &&value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateKeyRequest & WithOrigin(const OriginType &value)
void SetDescription(Aws::String &&value)
CreateKeyRequest & WithKeyUsage(const KeyUsageType &value)
CreateKeyRequest & WithXksKeyId(const Aws::String &value)
CreateKeyRequest & WithTags(Aws::Vector< Tag > &&value)
CreateKeyRequest & WithXksKeyId(Aws::String &&value)
const Aws::String & GetXksKeyId() const
void SetTags(const Aws::Vector< Tag > &value)
const Aws::Vector< Tag > & GetTags() const
CreateKeyRequest & WithDescription(const char *value)
CreateKeyRequest & AddTags(const Tag &value)
CreateKeyRequest & WithPolicy(const char *value)
void SetBypassPolicyLockoutSafetyCheck(bool value)
void SetXksKeyId(Aws::String &&value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetPolicy() const
AWS_KMS_API Aws::String SerializePayload() const override
CreateKeyRequest & WithCustomKeyStoreId(const char *value)
CreateKeyRequest & WithXksKeyId(const char *value)
CreateKeyRequest & WithDescription(Aws::String &&value)
void SetDescription(const char *value)
CreateKeyRequest & WithDescription(const Aws::String &value)
void SetOrigin(const OriginType &value)
const Aws::String & GetDescription() const
void SetCustomKeyStoreId(Aws::String &&value)
const OriginType & GetOrigin() const
void SetKeyUsage(const KeyUsageType &value)
void SetKeySpec(const KeySpec &value)
CreateKeyRequest & WithTags(const Aws::Vector< Tag > &value)
CreateKeyRequest & WithPolicy(const Aws::String &value)
CreateKeyRequest & AddTags(Tag &&value)
CreateKeyRequest & WithKeySpec(const KeySpec &value)
CreateKeyRequest & WithKeyUsage(KeyUsageType &&value)
const KeySpec & GetKeySpec() const
CreateKeyRequest & WithMultiRegion(bool value)
void SetOrigin(OriginType &&value)
CreateKeyRequest & WithKeySpec(KeySpec &&value)
CreateKeyRequest & WithBypassPolicyLockoutSafetyCheck(bool value)
void SetPolicy(const char *value)
void SetXksKeyId(const Aws::String &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