1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/xray/XRay_EXPORTS.h>
8 #include <aws/xray/XRayRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/xray/model/EncryptionType.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace XRay
16 {
17 namespace Model
18 {
19 
20   /**
21    */
22   class AWS_XRAY_API PutEncryptionConfigRequest : public XRayRequest
23   {
24   public:
25     PutEncryptionConfigRequest();
26 
27     // Service request name is the Operation name which will send this request out,
28     // each operation should has unique request name, so that we can get operation's name from this request.
29     // Note: this is not true for response, multiple operations may have the same response name,
30     // so we can not get operation's name from response.
GetServiceRequestName()31     inline virtual const char* GetServiceRequestName() const override { return "PutEncryptionConfig"; }
32 
33     Aws::String SerializePayload() const override;
34 
35 
36     /**
37      * <p>An Amazon Web Services KMS key in one of the following formats:</p> <ul> <li>
38      * <p> <b>Alias</b> - The name of the key. For example,
39      * <code>alias/MyKey</code>.</p> </li> <li> <p> <b>Key ID</b> - The KMS key ID of
40      * the key. For example, <code>ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>. Amazon
41      * Web Services X-Ray does not support asymmetric KMS keys.</p> </li> <li> <p>
42      * <b>ARN</b> - The full Amazon Resource Name of the key ID or alias. For example,
43      * <code>arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>.
44      * Use this format to specify a key in a different account.</p> </li> </ul> <p>Omit
45      * this key if you set <code>Type</code> to <code>NONE</code>.</p>
46      */
GetKeyId()47     inline const Aws::String& GetKeyId() const{ return m_keyId; }
48 
49     /**
50      * <p>An Amazon Web Services KMS key in one of the following formats:</p> <ul> <li>
51      * <p> <b>Alias</b> - The name of the key. For example,
52      * <code>alias/MyKey</code>.</p> </li> <li> <p> <b>Key ID</b> - The KMS key ID of
53      * the key. For example, <code>ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>. Amazon
54      * Web Services X-Ray does not support asymmetric KMS keys.</p> </li> <li> <p>
55      * <b>ARN</b> - The full Amazon Resource Name of the key ID or alias. For example,
56      * <code>arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>.
57      * Use this format to specify a key in a different account.</p> </li> </ul> <p>Omit
58      * this key if you set <code>Type</code> to <code>NONE</code>.</p>
59      */
KeyIdHasBeenSet()60     inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
61 
62     /**
63      * <p>An Amazon Web Services KMS key in one of the following formats:</p> <ul> <li>
64      * <p> <b>Alias</b> - The name of the key. For example,
65      * <code>alias/MyKey</code>.</p> </li> <li> <p> <b>Key ID</b> - The KMS key ID of
66      * the key. For example, <code>ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>. Amazon
67      * Web Services X-Ray does not support asymmetric KMS keys.</p> </li> <li> <p>
68      * <b>ARN</b> - The full Amazon Resource Name of the key ID or alias. For example,
69      * <code>arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>.
70      * Use this format to specify a key in a different account.</p> </li> </ul> <p>Omit
71      * this key if you set <code>Type</code> to <code>NONE</code>.</p>
72      */
SetKeyId(const Aws::String & value)73     inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
74 
75     /**
76      * <p>An Amazon Web Services KMS key in one of the following formats:</p> <ul> <li>
77      * <p> <b>Alias</b> - The name of the key. For example,
78      * <code>alias/MyKey</code>.</p> </li> <li> <p> <b>Key ID</b> - The KMS key ID of
79      * the key. For example, <code>ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>. Amazon
80      * Web Services X-Ray does not support asymmetric KMS keys.</p> </li> <li> <p>
81      * <b>ARN</b> - The full Amazon Resource Name of the key ID or alias. For example,
82      * <code>arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>.
83      * Use this format to specify a key in a different account.</p> </li> </ul> <p>Omit
84      * this key if you set <code>Type</code> to <code>NONE</code>.</p>
85      */
SetKeyId(Aws::String && value)86     inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }
87 
88     /**
89      * <p>An Amazon Web Services KMS key in one of the following formats:</p> <ul> <li>
90      * <p> <b>Alias</b> - The name of the key. For example,
91      * <code>alias/MyKey</code>.</p> </li> <li> <p> <b>Key ID</b> - The KMS key ID of
92      * the key. For example, <code>ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>. Amazon
93      * Web Services X-Ray does not support asymmetric KMS keys.</p> </li> <li> <p>
94      * <b>ARN</b> - The full Amazon Resource Name of the key ID or alias. For example,
95      * <code>arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>.
96      * Use this format to specify a key in a different account.</p> </li> </ul> <p>Omit
97      * this key if you set <code>Type</code> to <code>NONE</code>.</p>
98      */
SetKeyId(const char * value)99     inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
100 
101     /**
102      * <p>An Amazon Web Services KMS key in one of the following formats:</p> <ul> <li>
103      * <p> <b>Alias</b> - The name of the key. For example,
104      * <code>alias/MyKey</code>.</p> </li> <li> <p> <b>Key ID</b> - The KMS key ID of
105      * the key. For example, <code>ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>. Amazon
106      * Web Services X-Ray does not support asymmetric KMS keys.</p> </li> <li> <p>
107      * <b>ARN</b> - The full Amazon Resource Name of the key ID or alias. For example,
108      * <code>arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>.
109      * Use this format to specify a key in a different account.</p> </li> </ul> <p>Omit
110      * this key if you set <code>Type</code> to <code>NONE</code>.</p>
111      */
WithKeyId(const Aws::String & value)112     inline PutEncryptionConfigRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
113 
114     /**
115      * <p>An Amazon Web Services KMS key in one of the following formats:</p> <ul> <li>
116      * <p> <b>Alias</b> - The name of the key. For example,
117      * <code>alias/MyKey</code>.</p> </li> <li> <p> <b>Key ID</b> - The KMS key ID of
118      * the key. For example, <code>ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>. Amazon
119      * Web Services X-Ray does not support asymmetric KMS keys.</p> </li> <li> <p>
120      * <b>ARN</b> - The full Amazon Resource Name of the key ID or alias. For example,
121      * <code>arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>.
122      * Use this format to specify a key in a different account.</p> </li> </ul> <p>Omit
123      * this key if you set <code>Type</code> to <code>NONE</code>.</p>
124      */
WithKeyId(Aws::String && value)125     inline PutEncryptionConfigRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
126 
127     /**
128      * <p>An Amazon Web Services KMS key in one of the following formats:</p> <ul> <li>
129      * <p> <b>Alias</b> - The name of the key. For example,
130      * <code>alias/MyKey</code>.</p> </li> <li> <p> <b>Key ID</b> - The KMS key ID of
131      * the key. For example, <code>ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>. Amazon
132      * Web Services X-Ray does not support asymmetric KMS keys.</p> </li> <li> <p>
133      * <b>ARN</b> - The full Amazon Resource Name of the key ID or alias. For example,
134      * <code>arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456</code>.
135      * Use this format to specify a key in a different account.</p> </li> </ul> <p>Omit
136      * this key if you set <code>Type</code> to <code>NONE</code>.</p>
137      */
WithKeyId(const char * value)138     inline PutEncryptionConfigRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
139 
140 
141     /**
142      * <p>The type of encryption. Set to <code>KMS</code> to use your own key for
143      * encryption. Set to <code>NONE</code> for default encryption.</p>
144      */
GetType()145     inline const EncryptionType& GetType() const{ return m_type; }
146 
147     /**
148      * <p>The type of encryption. Set to <code>KMS</code> to use your own key for
149      * encryption. Set to <code>NONE</code> for default encryption.</p>
150      */
TypeHasBeenSet()151     inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
152 
153     /**
154      * <p>The type of encryption. Set to <code>KMS</code> to use your own key for
155      * encryption. Set to <code>NONE</code> for default encryption.</p>
156      */
SetType(const EncryptionType & value)157     inline void SetType(const EncryptionType& value) { m_typeHasBeenSet = true; m_type = value; }
158 
159     /**
160      * <p>The type of encryption. Set to <code>KMS</code> to use your own key for
161      * encryption. Set to <code>NONE</code> for default encryption.</p>
162      */
SetType(EncryptionType && value)163     inline void SetType(EncryptionType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
164 
165     /**
166      * <p>The type of encryption. Set to <code>KMS</code> to use your own key for
167      * encryption. Set to <code>NONE</code> for default encryption.</p>
168      */
WithType(const EncryptionType & value)169     inline PutEncryptionConfigRequest& WithType(const EncryptionType& value) { SetType(value); return *this;}
170 
171     /**
172      * <p>The type of encryption. Set to <code>KMS</code> to use your own key for
173      * encryption. Set to <code>NONE</code> for default encryption.</p>
174      */
WithType(EncryptionType && value)175     inline PutEncryptionConfigRequest& WithType(EncryptionType&& value) { SetType(std::move(value)); return *this;}
176 
177   private:
178 
179     Aws::String m_keyId;
180     bool m_keyIdHasBeenSet;
181 
182     EncryptionType m_type;
183     bool m_typeHasBeenSet;
184   };
185 
186 } // namespace Model
187 } // namespace XRay
188 } // namespace Aws
189