AWS SDK for C++  0.12.9
AWS SDK for C++
PutKeyPolicyRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/kms/KMS_EXPORTS.h>
17 #include <aws/kms/KMSRequest.h>
19 
20 namespace Aws
21 {
22 namespace KMS
23 {
24 namespace Model
25 {
26 
30  {
31  public:
33  Aws::String SerializePayload() const override;
34 
35  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36 
44  inline const Aws::String& GetKeyId() const{ return m_keyId; }
45 
53  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
54 
62  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
63 
71  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
72 
80  inline PutKeyPolicyRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
81 
89  inline PutKeyPolicyRequest& WithKeyId(Aws::String&& value) { SetKeyId(value); return *this;}
90 
98  inline PutKeyPolicyRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
99 
104  inline const Aws::String& GetPolicyName() const{ return m_policyName; }
105 
110  inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
111 
116  inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
117 
122  inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
123 
128  inline PutKeyPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
129 
134  inline PutKeyPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(value); return *this;}
135 
140  inline PutKeyPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
141 
159  inline const Aws::String& GetPolicy() const{ return m_policy; }
160 
178  inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
179 
197  inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = value; }
198 
216  inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
217 
235  inline PutKeyPolicyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
236 
254  inline PutKeyPolicyRequest& WithPolicy(Aws::String&& value) { SetPolicy(value); return *this;}
255 
273  inline PutKeyPolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
274 
287  inline bool GetBypassPolicyLockoutSafetyCheck() const{ return m_bypassPolicyLockoutSafetyCheck; }
288 
301  inline void SetBypassPolicyLockoutSafetyCheck(bool value) { m_bypassPolicyLockoutSafetyCheckHasBeenSet = true; m_bypassPolicyLockoutSafetyCheck = value; }
302 
315  inline PutKeyPolicyRequest& WithBypassPolicyLockoutSafetyCheck(bool value) { SetBypassPolicyLockoutSafetyCheck(value); return *this;}
316 
317  private:
318  Aws::String m_keyId;
319  bool m_keyIdHasBeenSet;
320  Aws::String m_policyName;
321  bool m_policyNameHasBeenSet;
322  Aws::String m_policy;
323  bool m_policyHasBeenSet;
324  bool m_bypassPolicyLockoutSafetyCheck;
325  bool m_bypassPolicyLockoutSafetyCheckHasBeenSet;
326  };
327 
328 } // namespace Model
329 } // namespace KMS
330 } // namespace Aws
const Aws::String & GetKeyId() const
const Aws::String & GetPolicyName() const
PutKeyPolicyRequest & WithPolicyName(Aws::String &&value)
PutKeyPolicyRequest & WithKeyId(Aws::String &&value)
void SetPolicyName(const Aws::String &value)
PutKeyPolicyRequest & WithPolicyName(const char *value)
PutKeyPolicyRequest & WithKeyId(const char *value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
void SetKeyId(const Aws::String &value)
PutKeyPolicyRequest & WithBypassPolicyLockoutSafetyCheck(bool value)
void SetPolicy(const Aws::String &value)
PutKeyPolicyRequest & WithPolicy(const Aws::String &value)
PutKeyPolicyRequest & WithPolicy(Aws::String &&value)
PutKeyPolicyRequest & WithPolicyName(const Aws::String &value)
PutKeyPolicyRequest & WithKeyId(const Aws::String &value)
const Aws::String & GetPolicy() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:34
PutKeyPolicyRequest & WithPolicy(const char *value)
void SetPolicyName(Aws::String &&value)
JSON (JavaScript Object Notation).