AWS SDK for C++  1.9.125
AWS SDK for C++
CreateKeyRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/kms/KMS_EXPORTS.h>
8 #include <aws/kms/KMSRequest.h>
11 #include <aws/kms/model/KeySpec.h>
14 #include <aws/kms/model/Tag.h>
15 #include <utility>
16 
17 namespace Aws
18 {
19 namespace KMS
20 {
21 namespace Model
22 {
23 
27  {
28  public:
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::String SerializePayload() const override;
38 
40 
41 
71  inline const Aws::String& GetPolicy() const{ return m_policy; }
72 
102  inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
103 
133  inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
134 
164  inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); }
165 
195  inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
196 
226  inline CreateKeyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
227 
257  inline CreateKeyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;}
258 
288  inline CreateKeyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
289 
290 
297  inline const Aws::String& GetDescription() const{ return m_description; }
298 
305  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
306 
313  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
314 
321  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
322 
329  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
330 
337  inline CreateKeyRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
338 
345  inline CreateKeyRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
346 
353  inline CreateKeyRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
354 
355 
369  inline const KeyUsageType& GetKeyUsage() const{ return m_keyUsage; }
370 
384  inline bool KeyUsageHasBeenSet() const { return m_keyUsageHasBeenSet; }
385 
399  inline void SetKeyUsage(const KeyUsageType& value) { m_keyUsageHasBeenSet = true; m_keyUsage = value; }
400 
414  inline void SetKeyUsage(KeyUsageType&& value) { m_keyUsageHasBeenSet = true; m_keyUsage = std::move(value); }
415 
429  inline CreateKeyRequest& WithKeyUsage(const KeyUsageType& value) { SetKeyUsage(value); return *this;}
430 
444  inline CreateKeyRequest& WithKeyUsage(KeyUsageType&& value) { SetKeyUsage(std::move(value)); return *this;}
445 
446 
484  inline const KeySpec& GetKeySpec() const{ return m_keySpec; }
485 
523  inline bool KeySpecHasBeenSet() const { return m_keySpecHasBeenSet; }
524 
562  inline void SetKeySpec(const KeySpec& value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
563 
601  inline void SetKeySpec(KeySpec&& value) { m_keySpecHasBeenSet = true; m_keySpec = std::move(value); }
602 
640  inline CreateKeyRequest& WithKeySpec(const KeySpec& value) { SetKeySpec(value); return *this;}
641 
679  inline CreateKeyRequest& WithKeySpec(KeySpec&& value) { SetKeySpec(std::move(value)); return *this;}
680 
681 
698  inline const OriginType& GetOrigin() const{ return m_origin; }
699 
716  inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
717 
734  inline void SetOrigin(const OriginType& value) { m_originHasBeenSet = true; m_origin = value; }
735 
752  inline void SetOrigin(OriginType&& value) { m_originHasBeenSet = true; m_origin = std::move(value); }
753 
770  inline CreateKeyRequest& WithOrigin(const OriginType& value) { SetOrigin(value); return *this;}
771 
788  inline CreateKeyRequest& WithOrigin(OriginType&& value) { SetOrigin(std::move(value)); return *this;}
789 
790 
809  inline const Aws::String& GetCustomKeyStoreId() const{ return m_customKeyStoreId; }
810 
829  inline bool CustomKeyStoreIdHasBeenSet() const { return m_customKeyStoreIdHasBeenSet; }
830 
849  inline void SetCustomKeyStoreId(const Aws::String& value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId = value; }
850 
869  inline void SetCustomKeyStoreId(Aws::String&& value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId = std::move(value); }
870 
889  inline void SetCustomKeyStoreId(const char* value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId.assign(value); }
890 
909  inline CreateKeyRequest& WithCustomKeyStoreId(const Aws::String& value) { SetCustomKeyStoreId(value); return *this;}
910 
929  inline CreateKeyRequest& WithCustomKeyStoreId(Aws::String&& value) { SetCustomKeyStoreId(std::move(value)); return *this;}
930 
949  inline CreateKeyRequest& WithCustomKeyStoreId(const char* value) { SetCustomKeyStoreId(value); return *this;}
950 
951 
964  inline bool GetBypassPolicyLockoutSafetyCheck() const{ return m_bypassPolicyLockoutSafetyCheck; }
965 
978  inline bool BypassPolicyLockoutSafetyCheckHasBeenSet() const { return m_bypassPolicyLockoutSafetyCheckHasBeenSet; }
979 
992  inline void SetBypassPolicyLockoutSafetyCheck(bool value) { m_bypassPolicyLockoutSafetyCheckHasBeenSet = true; m_bypassPolicyLockoutSafetyCheck = value; }
993 
1006  inline CreateKeyRequest& WithBypassPolicyLockoutSafetyCheck(bool value) { SetBypassPolicyLockoutSafetyCheck(value); return *this;}
1007 
1008 
1029  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
1030 
1051  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
1052 
1073  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
1074 
1095  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
1096 
1117  inline CreateKeyRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
1118 
1139  inline CreateKeyRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
1140 
1161  inline CreateKeyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
1162 
1183  inline CreateKeyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
1184 
1185 
1207  inline bool GetMultiRegion() const{ return m_multiRegion; }
1208 
1230  inline bool MultiRegionHasBeenSet() const { return m_multiRegionHasBeenSet; }
1231 
1253  inline void SetMultiRegion(bool value) { m_multiRegionHasBeenSet = true; m_multiRegion = value; }
1254 
1276  inline CreateKeyRequest& WithMultiRegion(bool value) { SetMultiRegion(value); return *this;}
1277 
1278  private:
1279 
1280  Aws::String m_policy;
1281  bool m_policyHasBeenSet;
1282 
1283  Aws::String m_description;
1284  bool m_descriptionHasBeenSet;
1285 
1286  KeyUsageType m_keyUsage;
1287  bool m_keyUsageHasBeenSet;
1288 
1289  KeySpec m_keySpec;
1290  bool m_keySpecHasBeenSet;
1291 
1292  OriginType m_origin;
1293  bool m_originHasBeenSet;
1294 
1295  Aws::String m_customKeyStoreId;
1296  bool m_customKeyStoreIdHasBeenSet;
1297 
1298  bool m_bypassPolicyLockoutSafetyCheck;
1299  bool m_bypassPolicyLockoutSafetyCheckHasBeenSet;
1300 
1301  Aws::Vector<Tag> m_tags;
1302  bool m_tagsHasBeenSet;
1303 
1304  bool m_multiRegion;
1305  bool m_multiRegionHasBeenSet;
1306  };
1307 
1308 } // namespace Model
1309 } // namespace KMS
1310 } // namespace Aws
Tag.h
Aws::KMS::Model::CreateKeyRequest::WithPolicy
CreateKeyRequest & WithPolicy(Aws::String &&value)
Definition: CreateKeyRequest.h:257
Aws::KMS::Model::CreateKeyRequest::GetDescription
const Aws::String & GetDescription() const
Definition: CreateKeyRequest.h:297
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::KMS::Model::CreateKeyRequest::SetDescription
void SetDescription(const char *value)
Definition: CreateKeyRequest.h:329
Aws::KMS::Model::Tag
Definition: Tag.h:37
Aws::KMS::Model::CreateKeyRequest
Definition: CreateKeyRequest.h:27
Aws::KMS::Model::CreateKeyRequest::WithPolicy
CreateKeyRequest & WithPolicy(const Aws::String &value)
Definition: CreateKeyRequest.h:226
Aws::KMS::Model::CreateKeyRequest::WithOrigin
CreateKeyRequest & WithOrigin(const OriginType &value)
Definition: CreateKeyRequest.h:770
Aws::KMS::Model::CreateKeyRequest::AddTags
CreateKeyRequest & AddTags(const Tag &value)
Definition: CreateKeyRequest.h:1161
Aws::KMS::Model::CreateKeyRequest::SetPolicy
void SetPolicy(const char *value)
Definition: CreateKeyRequest.h:195
Aws::KMS::Model::CreateKeyRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreateKeyRequest.h:1095
OriginType.h
Aws::KMS::Model::CreateKeyRequest::WithKeySpec
CreateKeyRequest & WithKeySpec(KeySpec &&value)
Definition: CreateKeyRequest.h:679
Aws::KMS::Model::CreateKeyRequest::WithKeySpec
CreateKeyRequest & WithKeySpec(const KeySpec &value)
Definition: CreateKeyRequest.h:640
Aws::KMS::Model::KeySpec
KeySpec
Definition: KeySpec.h:17
Aws::KMS::Model::CreateKeyRequest::GetKeySpec
const KeySpec & GetKeySpec() const
Definition: CreateKeyRequest.h:484
Aws::KMS::Model::CreateKeyRequest::SetKeySpec
void SetKeySpec(const KeySpec &value)
Definition: CreateKeyRequest.h:562
Aws::KMS::Model::CreateKeyRequest::SetKeyUsage
void SetKeyUsage(const KeyUsageType &value)
Definition: CreateKeyRequest.h:399
Aws::KMS::Model::OriginType
OriginType
Definition: OriginType.h:17
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::KMS::Model::CreateKeyRequest::SetCustomKeyStoreId
void SetCustomKeyStoreId(const Aws::String &value)
Definition: CreateKeyRequest.h:849
Aws::KMS::Model::CreateKeyRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateKeyRequest.h:35
AWSVector.h
Aws::KMS::Model::CreateKeyRequest::KeyUsageHasBeenSet
bool KeyUsageHasBeenSet() const
Definition: CreateKeyRequest.h:384
KMSRequest.h
Aws::KMS::Model::CreateKeyRequest::SetPolicy
void SetPolicy(Aws::String &&value)
Definition: CreateKeyRequest.h:164
Aws::KMS::Model::CreateKeyRequest::AddTags
CreateKeyRequest & AddTags(Tag &&value)
Definition: CreateKeyRequest.h:1183
Aws::KMS::Model::CreateKeyRequest::WithTags
CreateKeyRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreateKeyRequest.h:1139
Aws::KMS::Model::CreateKeyRequest::CustomKeyStoreIdHasBeenSet
bool CustomKeyStoreIdHasBeenSet() const
Definition: CreateKeyRequest.h:829
Aws::KMS::Model::CreateKeyRequest::CreateKeyRequest
CreateKeyRequest()
Aws::KMS::Model::CreateKeyRequest::WithKeyUsage
CreateKeyRequest & WithKeyUsage(KeyUsageType &&value)
Definition: CreateKeyRequest.h:444
Aws::KMS::Model::CreateKeyRequest::SetMultiRegion
void SetMultiRegion(bool value)
Definition: CreateKeyRequest.h:1253
KeyUsageType.h
Aws::KMS::Model::CreateKeyRequest::GetKeyUsage
const KeyUsageType & GetKeyUsage() const
Definition: CreateKeyRequest.h:369
Aws::KMS::Model::CreateKeyRequest::SetKeySpec
void SetKeySpec(KeySpec &&value)
Definition: CreateKeyRequest.h:601
Aws::KMS::Model::CreateKeyRequest::DescriptionHasBeenSet
bool DescriptionHasBeenSet() const
Definition: CreateKeyRequest.h:305
Aws::KMS::KMSRequest
Definition: KMSRequest.h:17
Aws::KMS::Model::CreateKeyRequest::PolicyHasBeenSet
bool PolicyHasBeenSet() const
Definition: CreateKeyRequest.h:102
Aws::KMS::Model::CreateKeyRequest::SetPolicy
void SetPolicy(const Aws::String &value)
Definition: CreateKeyRequest.h:133
Aws::KMS::Model::CreateKeyRequest::WithDescription
CreateKeyRequest & WithDescription(Aws::String &&value)
Definition: CreateKeyRequest.h:345
Aws::KMS::Model::CreateKeyRequest::GetMultiRegion
bool GetMultiRegion() const
Definition: CreateKeyRequest.h:1207
Aws::KMS::Model::KeyUsageType
KeyUsageType
Definition: KeyUsageType.h:17
Aws::KMS::Model::CreateKeyRequest::BypassPolicyLockoutSafetyCheckHasBeenSet
bool BypassPolicyLockoutSafetyCheckHasBeenSet() const
Definition: CreateKeyRequest.h:978
Aws::KMS::Model::CreateKeyRequest::GetBypassPolicyLockoutSafetyCheck
bool GetBypassPolicyLockoutSafetyCheck() const
Definition: CreateKeyRequest.h:964
Aws::KMS::Model::CreateKeyRequest::GetOrigin
const OriginType & GetOrigin() const
Definition: CreateKeyRequest.h:698
AWS_KMS_API
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:28
Aws::KMS::Model::CreateKeyRequest::WithMultiRegion
CreateKeyRequest & WithMultiRegion(bool value)
Definition: CreateKeyRequest.h:1276
Aws::KMS::Model::CreateKeyRequest::MultiRegionHasBeenSet
bool MultiRegionHasBeenSet() const
Definition: CreateKeyRequest.h:1230
Aws::KMS::Model::CreateKeyRequest::SetCustomKeyStoreId
void SetCustomKeyStoreId(const char *value)
Definition: CreateKeyRequest.h:889
Aws::KMS::Model::CreateKeyRequest::WithCustomKeyStoreId
CreateKeyRequest & WithCustomKeyStoreId(const char *value)
Definition: CreateKeyRequest.h:949
Aws::KMS::Model::CreateKeyRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::KMS::Model::CreateKeyRequest::KeySpecHasBeenSet
bool KeySpecHasBeenSet() const
Definition: CreateKeyRequest.h:523
AWSString.h
Aws::KMS::Model::CreateKeyRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreateKeyRequest.h:1051
Aws::KMS::Model::CreateKeyRequest::SetOrigin
void SetOrigin(const OriginType &value)
Definition: CreateKeyRequest.h:734
Aws::KMS::Model::CreateKeyRequest::WithTags
CreateKeyRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreateKeyRequest.h:1117
Aws::KMS::Model::CreateKeyRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreateKeyRequest.h:1073
Aws::KMS::Model::CreateKeyRequest::WithBypassPolicyLockoutSafetyCheck
CreateKeyRequest & WithBypassPolicyLockoutSafetyCheck(bool value)
Definition: CreateKeyRequest.h:1006
Aws::KMS::Model::CreateKeyRequest::SetDescription
void SetDescription(Aws::String &&value)
Definition: CreateKeyRequest.h:321
KeySpec.h
Aws::KMS::Model::CreateKeyRequest::WithKeyUsage
CreateKeyRequest & WithKeyUsage(const KeyUsageType &value)
Definition: CreateKeyRequest.h:429
Aws::KMS::Model::CreateKeyRequest::GetPolicy
const Aws::String & GetPolicy() const
Definition: CreateKeyRequest.h:71
Aws::CodePipeline::Model::EncryptionKeyType::NOT_SET
@ NOT_SET
Aws::KMS::Model::CreateKeyRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::KMS::Model::CreateKeyRequest::WithOrigin
CreateKeyRequest & WithOrigin(OriginType &&value)
Definition: CreateKeyRequest.h:788
Aws::KMS::Model::CreateKeyRequest::WithDescription
CreateKeyRequest & WithDescription(const char *value)
Definition: CreateKeyRequest.h:353
Aws::KMS::Model::CreateKeyRequest::WithCustomKeyStoreId
CreateKeyRequest & WithCustomKeyStoreId(Aws::String &&value)
Definition: CreateKeyRequest.h:929
Aws
Definition: AccessManagementClient.h:15
Aws::KMS::Model::CreateKeyRequest::WithPolicy
CreateKeyRequest & WithPolicy(const char *value)
Definition: CreateKeyRequest.h:288
Aws::KMS::Model::CreateKeyRequest::WithDescription
CreateKeyRequest & WithDescription(const Aws::String &value)
Definition: CreateKeyRequest.h:337
KMS_EXPORTS.h
Aws::KMS::Model::CreateKeyRequest::OriginHasBeenSet
bool OriginHasBeenSet() const
Definition: CreateKeyRequest.h:716
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::KMS::Model::CreateKeyRequest::SetBypassPolicyLockoutSafetyCheck
void SetBypassPolicyLockoutSafetyCheck(bool value)
Definition: CreateKeyRequest.h:992
Aws::KMS::Model::CreateKeyRequest::SetCustomKeyStoreId
void SetCustomKeyStoreId(Aws::String &&value)
Definition: CreateKeyRequest.h:869
Aws::KMS::Model::CreateKeyRequest::GetCustomKeyStoreId
const Aws::String & GetCustomKeyStoreId() const
Definition: CreateKeyRequest.h:809
Aws::KMS::Model::CreateKeyRequest::SetKeyUsage
void SetKeyUsage(KeyUsageType &&value)
Definition: CreateKeyRequest.h:414
Aws::KMS::Model::CreateKeyRequest::SetOrigin
void SetOrigin(OriginType &&value)
Definition: CreateKeyRequest.h:752
Aws::KMS::Model::CreateKeyRequest::SetDescription
void SetDescription(const Aws::String &value)
Definition: CreateKeyRequest.h:313
Aws::KMS::Model::CreateKeyRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreateKeyRequest.h:1029
Aws::KMS::Model::CreateKeyRequest::WithCustomKeyStoreId
CreateKeyRequest & WithCustomKeyStoreId(const Aws::String &value)
Definition: CreateKeyRequest.h:909