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/kms/KMS_EXPORTS.h>
8 #include <aws/kms/KMSRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace KMS
15 {
16 namespace Model
17 {
18 
19   /**
20    */
21   class AWS_KMS_API UpdatePrimaryRegionRequest : public KMSRequest
22   {
23   public:
24     UpdatePrimaryRegionRequest();
25 
26     // Service request name is the Operation name which will send this request out,
27     // each operation should has unique request name, so that we can get operation's name from this request.
28     // Note: this is not true for response, multiple operations may have the same response name,
29     // so we can not get operation's name from response.
GetServiceRequestName()30     inline virtual const char* GetServiceRequestName() const override { return "UpdatePrimaryRegion"; }
31 
32     Aws::String SerializePayload() const override;
33 
34     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
35 
36 
37     /**
38      * <p>Identifies the current primary key. When the operation completes, this KMS
39      * key will be a replica key.</p> <p>Specify the key ID or key ARN of a
40      * multi-Region primary key.</p> <p>For example:</p> <ul> <li> <p>Key ID:
41      * <code>mrk-1234abcd12ab34cd56ef1234567890ab</code> </p> </li> <li> <p>Key ARN:
42      * <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
43      * </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use
44      * <a>ListKeys</a> or <a>DescribeKey</a>.</p>
45      */
GetKeyId()46     inline const Aws::String& GetKeyId() const{ return m_keyId; }
47 
48     /**
49      * <p>Identifies the current primary key. When the operation completes, this KMS
50      * key will be a replica key.</p> <p>Specify the key ID or key ARN of a
51      * multi-Region primary key.</p> <p>For example:</p> <ul> <li> <p>Key ID:
52      * <code>mrk-1234abcd12ab34cd56ef1234567890ab</code> </p> </li> <li> <p>Key ARN:
53      * <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
54      * </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use
55      * <a>ListKeys</a> or <a>DescribeKey</a>.</p>
56      */
KeyIdHasBeenSet()57     inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
58 
59     /**
60      * <p>Identifies the current primary key. When the operation completes, this KMS
61      * key will be a replica key.</p> <p>Specify the key ID or key ARN of a
62      * multi-Region primary key.</p> <p>For example:</p> <ul> <li> <p>Key ID:
63      * <code>mrk-1234abcd12ab34cd56ef1234567890ab</code> </p> </li> <li> <p>Key ARN:
64      * <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
65      * </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use
66      * <a>ListKeys</a> or <a>DescribeKey</a>.</p>
67      */
SetKeyId(const Aws::String & value)68     inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
69 
70     /**
71      * <p>Identifies the current primary key. When the operation completes, this KMS
72      * key will be a replica key.</p> <p>Specify the key ID or key ARN of a
73      * multi-Region primary key.</p> <p>For example:</p> <ul> <li> <p>Key ID:
74      * <code>mrk-1234abcd12ab34cd56ef1234567890ab</code> </p> </li> <li> <p>Key ARN:
75      * <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
76      * </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use
77      * <a>ListKeys</a> or <a>DescribeKey</a>.</p>
78      */
SetKeyId(Aws::String && value)79     inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }
80 
81     /**
82      * <p>Identifies the current primary key. When the operation completes, this KMS
83      * key will be a replica key.</p> <p>Specify the key ID or key ARN of a
84      * multi-Region primary key.</p> <p>For example:</p> <ul> <li> <p>Key ID:
85      * <code>mrk-1234abcd12ab34cd56ef1234567890ab</code> </p> </li> <li> <p>Key ARN:
86      * <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
87      * </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use
88      * <a>ListKeys</a> or <a>DescribeKey</a>.</p>
89      */
SetKeyId(const char * value)90     inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
91 
92     /**
93      * <p>Identifies the current primary key. When the operation completes, this KMS
94      * key will be a replica key.</p> <p>Specify the key ID or key ARN of a
95      * multi-Region primary key.</p> <p>For example:</p> <ul> <li> <p>Key ID:
96      * <code>mrk-1234abcd12ab34cd56ef1234567890ab</code> </p> </li> <li> <p>Key ARN:
97      * <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
98      * </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use
99      * <a>ListKeys</a> or <a>DescribeKey</a>.</p>
100      */
WithKeyId(const Aws::String & value)101     inline UpdatePrimaryRegionRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
102 
103     /**
104      * <p>Identifies the current primary key. When the operation completes, this KMS
105      * key will be a replica key.</p> <p>Specify the key ID or key ARN of a
106      * multi-Region primary key.</p> <p>For example:</p> <ul> <li> <p>Key ID:
107      * <code>mrk-1234abcd12ab34cd56ef1234567890ab</code> </p> </li> <li> <p>Key ARN:
108      * <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
109      * </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use
110      * <a>ListKeys</a> or <a>DescribeKey</a>.</p>
111      */
WithKeyId(Aws::String && value)112     inline UpdatePrimaryRegionRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
113 
114     /**
115      * <p>Identifies the current primary key. When the operation completes, this KMS
116      * key will be a replica key.</p> <p>Specify the key ID or key ARN of a
117      * multi-Region primary key.</p> <p>For example:</p> <ul> <li> <p>Key ID:
118      * <code>mrk-1234abcd12ab34cd56ef1234567890ab</code> </p> </li> <li> <p>Key ARN:
119      * <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
120      * </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use
121      * <a>ListKeys</a> or <a>DescribeKey</a>.</p>
122      */
WithKeyId(const char * value)123     inline UpdatePrimaryRegionRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
124 
125 
126     /**
127      * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID,
128      * such as <code>us-east-1</code> or <code>ap-southeast-2</code>. There must be an
129      * existing replica key in this Region. </p> <p>When the operation completes, the
130      * multi-Region key in this Region will be the primary key.</p>
131      */
GetPrimaryRegion()132     inline const Aws::String& GetPrimaryRegion() const{ return m_primaryRegion; }
133 
134     /**
135      * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID,
136      * such as <code>us-east-1</code> or <code>ap-southeast-2</code>. There must be an
137      * existing replica key in this Region. </p> <p>When the operation completes, the
138      * multi-Region key in this Region will be the primary key.</p>
139      */
PrimaryRegionHasBeenSet()140     inline bool PrimaryRegionHasBeenSet() const { return m_primaryRegionHasBeenSet; }
141 
142     /**
143      * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID,
144      * such as <code>us-east-1</code> or <code>ap-southeast-2</code>. There must be an
145      * existing replica key in this Region. </p> <p>When the operation completes, the
146      * multi-Region key in this Region will be the primary key.</p>
147      */
SetPrimaryRegion(const Aws::String & value)148     inline void SetPrimaryRegion(const Aws::String& value) { m_primaryRegionHasBeenSet = true; m_primaryRegion = value; }
149 
150     /**
151      * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID,
152      * such as <code>us-east-1</code> or <code>ap-southeast-2</code>. There must be an
153      * existing replica key in this Region. </p> <p>When the operation completes, the
154      * multi-Region key in this Region will be the primary key.</p>
155      */
SetPrimaryRegion(Aws::String && value)156     inline void SetPrimaryRegion(Aws::String&& value) { m_primaryRegionHasBeenSet = true; m_primaryRegion = std::move(value); }
157 
158     /**
159      * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID,
160      * such as <code>us-east-1</code> or <code>ap-southeast-2</code>. There must be an
161      * existing replica key in this Region. </p> <p>When the operation completes, the
162      * multi-Region key in this Region will be the primary key.</p>
163      */
SetPrimaryRegion(const char * value)164     inline void SetPrimaryRegion(const char* value) { m_primaryRegionHasBeenSet = true; m_primaryRegion.assign(value); }
165 
166     /**
167      * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID,
168      * such as <code>us-east-1</code> or <code>ap-southeast-2</code>. There must be an
169      * existing replica key in this Region. </p> <p>When the operation completes, the
170      * multi-Region key in this Region will be the primary key.</p>
171      */
WithPrimaryRegion(const Aws::String & value)172     inline UpdatePrimaryRegionRequest& WithPrimaryRegion(const Aws::String& value) { SetPrimaryRegion(value); return *this;}
173 
174     /**
175      * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID,
176      * such as <code>us-east-1</code> or <code>ap-southeast-2</code>. There must be an
177      * existing replica key in this Region. </p> <p>When the operation completes, the
178      * multi-Region key in this Region will be the primary key.</p>
179      */
WithPrimaryRegion(Aws::String && value)180     inline UpdatePrimaryRegionRequest& WithPrimaryRegion(Aws::String&& value) { SetPrimaryRegion(std::move(value)); return *this;}
181 
182     /**
183      * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID,
184      * such as <code>us-east-1</code> or <code>ap-southeast-2</code>. There must be an
185      * existing replica key in this Region. </p> <p>When the operation completes, the
186      * multi-Region key in this Region will be the primary key.</p>
187      */
WithPrimaryRegion(const char * value)188     inline UpdatePrimaryRegionRequest& WithPrimaryRegion(const char* value) { SetPrimaryRegion(value); return *this;}
189 
190   private:
191 
192     Aws::String m_keyId;
193     bool m_keyIdHasBeenSet;
194 
195     Aws::String m_primaryRegion;
196     bool m_primaryRegionHasBeenSet;
197   };
198 
199 } // namespace Model
200 } // namespace KMS
201 } // namespace Aws
202