AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
PutKeyPolicyRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/kms/KMSRequest.h>
9#include <aws/kms/KMS_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace KMS {
15namespace Model {
16
20 public:
21 AWS_KMS_API PutKeyPolicyRequest() = default;
22
23 // Service request name is the Operation name which will send this request out,
24 // each operation should has unique request name, so that we can get operation's name from this request.
25 // Note: this is not true for response, multiple operations may have the same response name,
26 // so we can not get operation's name from response.
27 inline virtual const char* GetServiceRequestName() const override { return "PutKeyPolicy"; }
28
29 AWS_KMS_API Aws::String SerializePayload() const override;
30
32
34
42 inline const Aws::String& GetKeyId() const { return m_keyId; }
43 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
44 template <typename KeyIdT = Aws::String>
45 void SetKeyId(KeyIdT&& value) {
46 m_keyIdHasBeenSet = true;
47 m_keyId = std::forward<KeyIdT>(value);
48 }
49 template <typename KeyIdT = Aws::String>
50 PutKeyPolicyRequest& WithKeyId(KeyIdT&& value) {
51 SetKeyId(std::forward<KeyIdT>(value));
52 return *this;
53 }
55
57
61 inline const Aws::String& GetPolicyName() const { return m_policyName; }
62 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
63 template <typename PolicyNameT = Aws::String>
64 void SetPolicyName(PolicyNameT&& value) {
65 m_policyNameHasBeenSet = true;
66 m_policyName = std::forward<PolicyNameT>(value);
67 }
68 template <typename PolicyNameT = Aws::String>
69 PutKeyPolicyRequest& WithPolicyName(PolicyNameT&& value) {
70 SetPolicyName(std::forward<PolicyNameT>(value));
71 return *this;
72 }
74
76
118 inline const Aws::String& GetPolicy() const { return m_policy; }
119 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
120 template <typename PolicyT = Aws::String>
121 void SetPolicy(PolicyT&& value) {
122 m_policyHasBeenSet = true;
123 m_policy = std::forward<PolicyT>(value);
124 }
125 template <typename PolicyT = Aws::String>
126 PutKeyPolicyRequest& WithPolicy(PolicyT&& value) {
127 SetPolicy(std::forward<PolicyT>(value));
128 return *this;
129 }
131
133
145 inline bool GetBypassPolicyLockoutSafetyCheck() const { return m_bypassPolicyLockoutSafetyCheck; }
146 inline bool BypassPolicyLockoutSafetyCheckHasBeenSet() const { return m_bypassPolicyLockoutSafetyCheckHasBeenSet; }
147 inline void SetBypassPolicyLockoutSafetyCheck(bool value) {
148 m_bypassPolicyLockoutSafetyCheckHasBeenSet = true;
149 m_bypassPolicyLockoutSafetyCheck = value;
150 }
153 return *this;
154 }
156 private:
157 Aws::String m_keyId;
158
159 Aws::String m_policyName;
160
161 Aws::String m_policy;
162
163 bool m_bypassPolicyLockoutSafetyCheck{false};
164 bool m_keyIdHasBeenSet = false;
165 bool m_policyNameHasBeenSet = false;
166 bool m_policyHasBeenSet = false;
167 bool m_bypassPolicyLockoutSafetyCheckHasBeenSet = false;
168};
169
170} // namespace Model
171} // namespace KMS
172} // namespace Aws
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetPolicy() const
PutKeyPolicyRequest & WithPolicyName(PolicyNameT &&value)
const Aws::String & GetKeyId() const
const Aws::String & GetPolicyName() const
void SetPolicyName(PolicyNameT &&value)
AWS_KMS_API Aws::String SerializePayload() const override
AWS_KMS_API PutKeyPolicyRequest()=default
PutKeyPolicyRequest & WithPolicy(PolicyT &&value)
PutKeyPolicyRequest & WithKeyId(KeyIdT &&value)
virtual const char * GetServiceRequestName() const override
PutKeyPolicyRequest & WithBypassPolicyLockoutSafetyCheck(bool value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String