@aws-sdk/client-kms 3.312.0 → 3.316.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/KMS.js +54 -700
- package/dist-cjs/protocols/Aws_json1_1.js +410 -1334
- package/dist-es/KMS.js +54 -700
- package/dist-es/protocols/Aws_json1_1.js +411 -1335
- package/dist-types/KMS.d.ts +151 -2795
- package/dist-types/ts3.4/KMS.d.ts +2 -1
- package/package.json +6 -6
package/dist-types/KMS.d.ts
CHANGED
|
@@ -50,3049 +50,405 @@ import { UpdatePrimaryRegionCommandInput, UpdatePrimaryRegionCommandOutput } fro
|
|
|
50
50
|
import { VerifyCommandInput, VerifyCommandOutput } from "./commands/VerifyCommand";
|
|
51
51
|
import { VerifyMacCommandInput, VerifyMacCommandOutput } from "./commands/VerifyMacCommand";
|
|
52
52
|
import { KMSClient } from "./KMSClient";
|
|
53
|
-
|
|
54
|
-
* @public
|
|
55
|
-
* <fullname>Key Management Service</fullname>
|
|
56
|
-
* <p>Key Management Service (KMS) is an encryption and key management web service. This guide describes
|
|
57
|
-
* the KMS operations that you can call programmatically. For general information about KMS,
|
|
58
|
-
* see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/">
|
|
59
|
-
* <i>Key Management Service Developer Guide</i>
|
|
60
|
-
* </a>.</p>
|
|
61
|
-
* <note>
|
|
62
|
-
* <p>KMS has replaced the term <i>customer master key (CMK)</i> with <i>KMS key</i> and <i>KMS key</i>. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.</p>
|
|
63
|
-
* <p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
|
|
64
|
-
* languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a
|
|
65
|
-
* convenient way to create programmatic access to KMS and other Amazon Web Services services. For example,
|
|
66
|
-
* the SDKs take care of tasks such as signing requests (see below), managing errors, and
|
|
67
|
-
* retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to
|
|
68
|
-
* download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web
|
|
69
|
-
* Services</a>.</p>
|
|
70
|
-
* </note>
|
|
71
|
-
* <p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.</p>
|
|
72
|
-
* <p>If you need to use FIPS 140-2 validated cryptographic modules when communicating with
|
|
73
|
-
* Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the
|
|
74
|
-
* available FIPS endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service endpoints</a> in the Key Management Service topic of
|
|
75
|
-
* the <i>Amazon Web Services General Reference</i>.</p>
|
|
76
|
-
* <p>All KMS API calls must be signed and be transmitted using Transport Layer Security
|
|
77
|
-
* (TLS). KMS recommends you always use the latest supported TLS version. Clients must also
|
|
78
|
-
* support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral Diffie-Hellman
|
|
79
|
-
* (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7
|
|
80
|
-
* and later support these modes.</p>
|
|
81
|
-
* <p>
|
|
82
|
-
* <b>Signing Requests</b>
|
|
83
|
-
* </p>
|
|
84
|
-
* <p>Requests must be signed using an access key ID and a secret access key. We strongly
|
|
85
|
-
* recommend that you do not use your Amazon Web Services account root access key ID and secret access key for
|
|
86
|
-
* everyday work. You can use the access key ID and secret access key for an IAM user or you
|
|
87
|
-
* can use the Security Token Service (STS) to generate temporary security credentials and use those to sign
|
|
88
|
-
* requests. </p>
|
|
89
|
-
* <p>All KMS requests must be signed with <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4</a>.</p>
|
|
90
|
-
* <p>
|
|
91
|
-
* <b>Logging API Requests</b>
|
|
92
|
-
* </p>
|
|
93
|
-
* <p>KMS supports CloudTrail, a service that logs Amazon Web Services API calls and related events for your
|
|
94
|
-
* Amazon Web Services account and delivers them to an Amazon S3 bucket that you specify. By using the
|
|
95
|
-
* information collected by CloudTrail, you can determine what requests were made to KMS, who made
|
|
96
|
-
* the request, when it was made, and so on. To learn more about CloudTrail, including how to turn it
|
|
97
|
-
* on and find your log files, see the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/">CloudTrail User Guide</a>.</p>
|
|
98
|
-
* <p>
|
|
99
|
-
* <b>Additional Resources</b>
|
|
100
|
-
* </p>
|
|
101
|
-
* <p>For more information about credentials and request signing, see the following:</p>
|
|
102
|
-
* <ul>
|
|
103
|
-
* <li>
|
|
104
|
-
* <p>
|
|
105
|
-
* <a href="https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html">Amazon Web Services
|
|
106
|
-
* Security Credentials</a> - This topic provides general information about the types
|
|
107
|
-
* of credentials used to access Amazon Web Services.</p>
|
|
108
|
-
* </li>
|
|
109
|
-
* <li>
|
|
110
|
-
* <p>
|
|
111
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary
|
|
112
|
-
* Security Credentials</a> - This section of the <i>IAM User Guide</i>
|
|
113
|
-
* describes how to create and use temporary security credentials.</p>
|
|
114
|
-
* </li>
|
|
115
|
-
* <li>
|
|
116
|
-
* <p>
|
|
117
|
-
* <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version
|
|
118
|
-
* 4 Signing Process</a> - This set of topics walks you through the process of signing
|
|
119
|
-
* a request using an access key ID and a secret access key.</p>
|
|
120
|
-
* </li>
|
|
121
|
-
* </ul>
|
|
122
|
-
* <p>
|
|
123
|
-
* <b>Commonly Used API Operations</b>
|
|
124
|
-
* </p>
|
|
125
|
-
* <p>Of the API operations discussed in this guide, the following will prove the most useful
|
|
126
|
-
* for most applications. You will likely perform operations other than these, such as creating
|
|
127
|
-
* keys and assigning policies, by using the console.</p>
|
|
128
|
-
* <ul>
|
|
129
|
-
* <li>
|
|
130
|
-
* <p>
|
|
131
|
-
* <a>Encrypt</a>
|
|
132
|
-
* </p>
|
|
133
|
-
* </li>
|
|
134
|
-
* <li>
|
|
135
|
-
* <p>
|
|
136
|
-
* <a>Decrypt</a>
|
|
137
|
-
* </p>
|
|
138
|
-
* </li>
|
|
139
|
-
* <li>
|
|
140
|
-
* <p>
|
|
141
|
-
* <a>GenerateDataKey</a>
|
|
142
|
-
* </p>
|
|
143
|
-
* </li>
|
|
144
|
-
* <li>
|
|
145
|
-
* <p>
|
|
146
|
-
* <a>GenerateDataKeyWithoutPlaintext</a>
|
|
147
|
-
* </p>
|
|
148
|
-
* </li>
|
|
149
|
-
* </ul>
|
|
150
|
-
*/
|
|
151
|
-
export declare class KMS extends KMSClient {
|
|
53
|
+
export interface KMS {
|
|
152
54
|
/**
|
|
153
|
-
* @
|
|
154
|
-
* <p>Cancels the deletion of a KMS key. When this operation succeeds, the key state of the KMS
|
|
155
|
-
* key is <code>Disabled</code>. To enable the KMS key, use <a>EnableKey</a>. </p>
|
|
156
|
-
* <p>For more information about scheduling and canceling deletion of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html">Deleting KMS keys</a> in the
|
|
157
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
158
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
159
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
160
|
-
* <p>
|
|
161
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
162
|
-
* <p>
|
|
163
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CancelKeyDeletion</a> (key policy)</p>
|
|
164
|
-
* <p>
|
|
165
|
-
* <b>Related operations</b>: <a>ScheduleKeyDeletion</a>
|
|
166
|
-
* </p>
|
|
55
|
+
* @see {@link CancelKeyDeletionCommand}
|
|
167
56
|
*/
|
|
168
57
|
cancelKeyDeletion(args: CancelKeyDeletionCommandInput, options?: __HttpHandlerOptions): Promise<CancelKeyDeletionCommandOutput>;
|
|
169
58
|
cancelKeyDeletion(args: CancelKeyDeletionCommandInput, cb: (err: any, data?: CancelKeyDeletionCommandOutput) => void): void;
|
|
170
59
|
cancelKeyDeletion(args: CancelKeyDeletionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelKeyDeletionCommandOutput) => void): void;
|
|
171
60
|
/**
|
|
172
|
-
* @
|
|
173
|
-
* <p>Connects or reconnects a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> to its backing key store. For an CloudHSM key
|
|
174
|
-
* store, <code>ConnectCustomKeyStore</code> connects the key store to its associated CloudHSM
|
|
175
|
-
* cluster. For an external key store, <code>ConnectCustomKeyStore</code> connects the key store
|
|
176
|
-
* to the external key store proxy that communicates with your external key manager.</p>
|
|
177
|
-
* <p>The custom key store must be connected before you can create KMS keys in the key store or
|
|
178
|
-
* use the KMS keys it contains. You can disconnect and reconnect a custom key store at any
|
|
179
|
-
* time.</p>
|
|
180
|
-
* <p>The connection process for a custom key store can take an extended amount of time to
|
|
181
|
-
* complete. This operation starts the connection process, but it does not wait for it to
|
|
182
|
-
* complete. When it succeeds, this operation quickly returns an HTTP 200 response and a JSON
|
|
183
|
-
* object with no properties. However, this response does not indicate that the custom key store
|
|
184
|
-
* is connected. To get the connection state of the custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
|
|
185
|
-
* <p> This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> feature in KMS, which
|
|
186
|
-
* combines the convenience and extensive integration of KMS with the isolation and control of a
|
|
187
|
-
* key store that you own and manage.</p>
|
|
188
|
-
* <p>The <code>ConnectCustomKeyStore</code> operation might fail for various reasons. To find
|
|
189
|
-
* the reason, use the <a>DescribeCustomKeyStores</a> operation and see the
|
|
190
|
-
* <code>ConnectionErrorCode</code> in the response. For help interpreting the
|
|
191
|
-
* <code>ConnectionErrorCode</code>, see <a>CustomKeyStoresListEntry</a>.</p>
|
|
192
|
-
* <p>To fix the failure, use the <a>DisconnectCustomKeyStore</a> operation to
|
|
193
|
-
* disconnect the custom key store, correct the error, use the <a>UpdateCustomKeyStore</a> operation if necessary, and then use
|
|
194
|
-
* <code>ConnectCustomKeyStore</code> again.</p>
|
|
195
|
-
* <p>
|
|
196
|
-
* <b>CloudHSM key store</b>
|
|
197
|
-
* </p>
|
|
198
|
-
* <p>During the connection process for an CloudHSM key store, KMS finds the CloudHSM cluster that
|
|
199
|
-
* is associated with the custom key store, creates the connection infrastructure, connects to
|
|
200
|
-
* the cluster, logs into the CloudHSM client as the <code>kmsuser</code> CU, and rotates its
|
|
201
|
-
* password.</p>
|
|
202
|
-
* <p>To connect an CloudHSM key store, its associated CloudHSM cluster must have at least one active
|
|
203
|
-
* HSM. To get the number of active HSMs in a cluster, use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html">DescribeClusters</a> operation. To add HSMs
|
|
204
|
-
* to the cluster, use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation. Also, the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser">
|
|
205
|
-
* <code>kmsuser</code> crypto
|
|
206
|
-
* user</a> (CU) must not be logged into the cluster. This prevents KMS from using this
|
|
207
|
-
* account to log in.</p>
|
|
208
|
-
* <p>If you are having trouble connecting or disconnecting a CloudHSM key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html">Troubleshooting an CloudHSM key
|
|
209
|
-
* store</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
210
|
-
* <p>
|
|
211
|
-
* <b>External key store</b>
|
|
212
|
-
* </p>
|
|
213
|
-
* <p>When you connect an external key store that uses public endpoint connectivity, KMS tests
|
|
214
|
-
* its ability to communicate with your external key manager by sending a request via the
|
|
215
|
-
* external key store proxy.</p>
|
|
216
|
-
* <p>When you connect to an external key store that uses VPC endpoint service connectivity,
|
|
217
|
-
* KMS establishes the networking elements that it needs to communicate with your external key
|
|
218
|
-
* manager via the external key store proxy. This includes creating an interface endpoint to the
|
|
219
|
-
* VPC endpoint service and a private hosted zone for traffic between KMS and the VPC endpoint
|
|
220
|
-
* service.</p>
|
|
221
|
-
* <p>To connect an external key store, KMS must be able to connect to the external key store
|
|
222
|
-
* proxy, the external key store proxy must be able to communicate with your external key
|
|
223
|
-
* manager, and the external key manager must be available for cryptographic operations.</p>
|
|
224
|
-
* <p>If you are having trouble connecting or disconnecting an external key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html">Troubleshooting an external
|
|
225
|
-
* key store</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
226
|
-
* <p>
|
|
227
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
|
|
228
|
-
* <p>
|
|
229
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ConnectCustomKeyStore</a> (IAM policy)</p>
|
|
230
|
-
* <p>
|
|
231
|
-
* <b>Related operations</b>
|
|
232
|
-
* </p>
|
|
233
|
-
* <ul>
|
|
234
|
-
* <li>
|
|
235
|
-
* <p>
|
|
236
|
-
* <a>CreateCustomKeyStore</a>
|
|
237
|
-
* </p>
|
|
238
|
-
* </li>
|
|
239
|
-
* <li>
|
|
240
|
-
* <p>
|
|
241
|
-
* <a>DeleteCustomKeyStore</a>
|
|
242
|
-
* </p>
|
|
243
|
-
* </li>
|
|
244
|
-
* <li>
|
|
245
|
-
* <p>
|
|
246
|
-
* <a>DescribeCustomKeyStores</a>
|
|
247
|
-
* </p>
|
|
248
|
-
* </li>
|
|
249
|
-
* <li>
|
|
250
|
-
* <p>
|
|
251
|
-
* <a>DisconnectCustomKeyStore</a>
|
|
252
|
-
* </p>
|
|
253
|
-
* </li>
|
|
254
|
-
* <li>
|
|
255
|
-
* <p>
|
|
256
|
-
* <a>UpdateCustomKeyStore</a>
|
|
257
|
-
* </p>
|
|
258
|
-
* </li>
|
|
259
|
-
* </ul>
|
|
61
|
+
* @see {@link ConnectCustomKeyStoreCommand}
|
|
260
62
|
*/
|
|
261
63
|
connectCustomKeyStore(args: ConnectCustomKeyStoreCommandInput, options?: __HttpHandlerOptions): Promise<ConnectCustomKeyStoreCommandOutput>;
|
|
262
64
|
connectCustomKeyStore(args: ConnectCustomKeyStoreCommandInput, cb: (err: any, data?: ConnectCustomKeyStoreCommandOutput) => void): void;
|
|
263
65
|
connectCustomKeyStore(args: ConnectCustomKeyStoreCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ConnectCustomKeyStoreCommandOutput) => void): void;
|
|
264
66
|
/**
|
|
265
|
-
* @
|
|
266
|
-
* <p>Creates a friendly name for a KMS key. </p>
|
|
267
|
-
* <note>
|
|
268
|
-
* <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">ABAC for KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
269
|
-
* </note>
|
|
270
|
-
* <p>You can use an alias to identify a KMS key in the KMS console, in the <a>DescribeKey</a> operation and in <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>, such as <a>Encrypt</a> and
|
|
271
|
-
* <a>GenerateDataKey</a>. You can also change the KMS key that's associated with
|
|
272
|
-
* the alias (<a>UpdateAlias</a>) or delete the alias (<a>DeleteAlias</a>)
|
|
273
|
-
* at any time. These operations don't affect the underlying KMS key. </p>
|
|
274
|
-
* <p>You can associate the alias with any customer managed key in the same Amazon Web Services Region. Each
|
|
275
|
-
* alias is associated with only one KMS key at a time, but a KMS key can have multiple aliases.
|
|
276
|
-
* A valid KMS key is required. You can't create an alias without a KMS key.</p>
|
|
277
|
-
* <p>The alias must be unique in the account and Region, but you can have aliases with the same
|
|
278
|
-
* name in different Regions. For detailed information about aliases, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html">Using aliases</a> in the
|
|
279
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
280
|
-
* <p>This operation does not return a response. To get the alias that you created, use the
|
|
281
|
-
* <a>ListAliases</a> operation.</p>
|
|
282
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
283
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
284
|
-
* <p>
|
|
285
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on an alias in a different Amazon Web Services account.</p>
|
|
286
|
-
* <p>
|
|
287
|
-
* <b>Required permissions</b>
|
|
288
|
-
* </p>
|
|
289
|
-
* <ul>
|
|
290
|
-
* <li>
|
|
291
|
-
* <p>
|
|
292
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateAlias</a> on
|
|
293
|
-
* the alias (IAM policy).</p>
|
|
294
|
-
* </li>
|
|
295
|
-
* <li>
|
|
296
|
-
* <p>
|
|
297
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateAlias</a> on
|
|
298
|
-
* the KMS key (key policy).</p>
|
|
299
|
-
* </li>
|
|
300
|
-
* </ul>
|
|
301
|
-
* <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the
|
|
302
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
303
|
-
* <p>
|
|
304
|
-
* <b>Related operations:</b>
|
|
305
|
-
* </p>
|
|
306
|
-
* <ul>
|
|
307
|
-
* <li>
|
|
308
|
-
* <p>
|
|
309
|
-
* <a>DeleteAlias</a>
|
|
310
|
-
* </p>
|
|
311
|
-
* </li>
|
|
312
|
-
* <li>
|
|
313
|
-
* <p>
|
|
314
|
-
* <a>ListAliases</a>
|
|
315
|
-
* </p>
|
|
316
|
-
* </li>
|
|
317
|
-
* <li>
|
|
318
|
-
* <p>
|
|
319
|
-
* <a>UpdateAlias</a>
|
|
320
|
-
* </p>
|
|
321
|
-
* </li>
|
|
322
|
-
* </ul>
|
|
67
|
+
* @see {@link CreateAliasCommand}
|
|
323
68
|
*/
|
|
324
69
|
createAlias(args: CreateAliasCommandInput, options?: __HttpHandlerOptions): Promise<CreateAliasCommandOutput>;
|
|
325
70
|
createAlias(args: CreateAliasCommandInput, cb: (err: any, data?: CreateAliasCommandOutput) => void): void;
|
|
326
71
|
createAlias(args: CreateAliasCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateAliasCommandOutput) => void): void;
|
|
327
72
|
/**
|
|
328
|
-
* @
|
|
329
|
-
* <p>Creates a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> backed by a key store that you own and manage. When you use a
|
|
330
|
-
* KMS key in a custom key store for a cryptographic operation, the cryptographic operation is
|
|
331
|
-
* actually performed in your key store using your keys. KMS supports <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html">CloudHSM key stores</a>
|
|
332
|
-
* backed by an <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html">CloudHSM cluster</a>
|
|
333
|
-
* and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html">external key stores</a> backed by an external key store proxy and
|
|
334
|
-
* external key manager outside of Amazon Web Services.</p>
|
|
335
|
-
* <p> This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> feature in KMS, which
|
|
336
|
-
* combines the convenience and extensive integration of KMS with the isolation and control of a
|
|
337
|
-
* key store that you own and manage.</p>
|
|
338
|
-
* <p>Before you create the custom key store, the required elements must be in place and
|
|
339
|
-
* operational. We recommend that you use the test tools that KMS provides to verify the
|
|
340
|
-
* configuration your external key store proxy. For details about the required elements and
|
|
341
|
-
* verification tests, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the prerequisites (for
|
|
342
|
-
* CloudHSM key stores)</a> or <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keystore.html#xks-requirements">Assemble the prerequisites (for
|
|
343
|
-
* external key stores)</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
344
|
-
* <p>To create a custom key store, use the following parameters.</p>
|
|
345
|
-
* <ul>
|
|
346
|
-
* <li>
|
|
347
|
-
* <p>To create an CloudHSM key store, specify the <code>CustomKeyStoreName</code>,
|
|
348
|
-
* <code>CloudHsmClusterId</code>, <code>KeyStorePassword</code>, and
|
|
349
|
-
* <code>TrustAnchorCertificate</code>. The <code>CustomKeyStoreType</code> parameter is
|
|
350
|
-
* optional for CloudHSM key stores. If you include it, set it to the default value,
|
|
351
|
-
* <code>AWS_CLOUDHSM</code>. For help with failures, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html">Troubleshooting an CloudHSM key store</a> in the
|
|
352
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
353
|
-
* </li>
|
|
354
|
-
* <li>
|
|
355
|
-
* <p>To create an external key store, specify the <code>CustomKeyStoreName</code> and a
|
|
356
|
-
* <code>CustomKeyStoreType</code> of <code>EXTERNAL_KEY_STORE</code>. Also, specify values
|
|
357
|
-
* for <code>XksProxyConnectivity</code>, <code>XksProxyAuthenticationCredential</code>,
|
|
358
|
-
* <code>XksProxyUriEndpoint</code>, and <code>XksProxyUriPath</code>. If your
|
|
359
|
-
* <code>XksProxyConnectivity</code> value is <code>VPC_ENDPOINT_SERVICE</code>, specify
|
|
360
|
-
* the <code>XksProxyVpcEndpointServiceName</code> parameter. For help with failures, see
|
|
361
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html">Troubleshooting
|
|
362
|
-
* an external key store</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
363
|
-
* </li>
|
|
364
|
-
* </ul>
|
|
365
|
-
* <note>
|
|
366
|
-
* <p>For external key stores:</p>
|
|
367
|
-
* <p>Some external key managers provide a simpler method for creating an external key store.
|
|
368
|
-
* For details, see your external key manager documentation.</p>
|
|
369
|
-
* <p>When creating an external key store in the KMS console, you can upload a JSON-based
|
|
370
|
-
* proxy configuration file with the desired values. You cannot use a proxy configuration
|
|
371
|
-
* with the <code>CreateCustomKeyStore</code> operation. However, you can use the values in
|
|
372
|
-
* the file to help you determine the correct values for the <code>CreateCustomKeyStore</code>
|
|
373
|
-
* parameters.</p>
|
|
374
|
-
* </note>
|
|
375
|
-
* <p>When the operation completes successfully, it returns the ID of the new custom key store.
|
|
376
|
-
* Before you can use your new custom key store, you need to use the <a>ConnectCustomKeyStore</a> operation to connect a new CloudHSM key store to its CloudHSM
|
|
377
|
-
* cluster, or to connect a new external key store to the external key store proxy for your
|
|
378
|
-
* external key manager. Even if you are not going to use your custom key store immediately, you
|
|
379
|
-
* might want to connect it to verify that all settings are correct and then disconnect it until
|
|
380
|
-
* you are ready to use it.</p>
|
|
381
|
-
* <p>For help with failures, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html">Troubleshooting a custom key store</a> in the
|
|
382
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
383
|
-
* <p>
|
|
384
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
|
|
385
|
-
* <p>
|
|
386
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateCustomKeyStore</a> (IAM policy).</p>
|
|
387
|
-
* <p>
|
|
388
|
-
* <b>Related operations:</b>
|
|
389
|
-
* </p>
|
|
390
|
-
* <ul>
|
|
391
|
-
* <li>
|
|
392
|
-
* <p>
|
|
393
|
-
* <a>ConnectCustomKeyStore</a>
|
|
394
|
-
* </p>
|
|
395
|
-
* </li>
|
|
396
|
-
* <li>
|
|
397
|
-
* <p>
|
|
398
|
-
* <a>DeleteCustomKeyStore</a>
|
|
399
|
-
* </p>
|
|
400
|
-
* </li>
|
|
401
|
-
* <li>
|
|
402
|
-
* <p>
|
|
403
|
-
* <a>DescribeCustomKeyStores</a>
|
|
404
|
-
* </p>
|
|
405
|
-
* </li>
|
|
406
|
-
* <li>
|
|
407
|
-
* <p>
|
|
408
|
-
* <a>DisconnectCustomKeyStore</a>
|
|
409
|
-
* </p>
|
|
410
|
-
* </li>
|
|
411
|
-
* <li>
|
|
412
|
-
* <p>
|
|
413
|
-
* <a>UpdateCustomKeyStore</a>
|
|
414
|
-
* </p>
|
|
415
|
-
* </li>
|
|
416
|
-
* </ul>
|
|
73
|
+
* @see {@link CreateCustomKeyStoreCommand}
|
|
417
74
|
*/
|
|
418
75
|
createCustomKeyStore(args: CreateCustomKeyStoreCommandInput, options?: __HttpHandlerOptions): Promise<CreateCustomKeyStoreCommandOutput>;
|
|
419
76
|
createCustomKeyStore(args: CreateCustomKeyStoreCommandInput, cb: (err: any, data?: CreateCustomKeyStoreCommandOutput) => void): void;
|
|
420
77
|
createCustomKeyStore(args: CreateCustomKeyStoreCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateCustomKeyStoreCommandOutput) => void): void;
|
|
421
78
|
/**
|
|
422
|
-
* @
|
|
423
|
-
* <p>Adds a grant to a KMS key. </p>
|
|
424
|
-
* <p>A <i>grant</i> is a policy instrument that allows Amazon Web Services principals to use
|
|
425
|
-
* KMS keys in cryptographic operations. It also can allow them to view a KMS key (<a>DescribeKey</a>) and create and manage grants. When authorizing access to a KMS key,
|
|
426
|
-
* grants are considered along with key policies and IAM policies. Grants are often used for
|
|
427
|
-
* temporary permissions because you can create one, use its permissions, and delete it without
|
|
428
|
-
* changing your key policies or IAM policies. </p>
|
|
429
|
-
* <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Grants in KMS</a> in the
|
|
430
|
-
* <i>
|
|
431
|
-
* <i>Key Management Service Developer Guide</i>
|
|
432
|
-
* </i>. For examples of working with grants in several
|
|
433
|
-
* programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
|
|
434
|
-
* <p>The <code>CreateGrant</code> operation returns a <code>GrantToken</code> and a
|
|
435
|
-
* <code>GrantId</code>.</p>
|
|
436
|
-
* <ul>
|
|
437
|
-
* <li>
|
|
438
|
-
* <p>When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as <i>eventual consistency</i>. Once the grant has achieved eventual consistency, the grantee
|
|
439
|
-
* principal can use the permissions in the grant without identifying the grant. </p>
|
|
440
|
-
* <p>However, to use the permissions in the grant immediately, use the
|
|
441
|
-
* <code>GrantToken</code> that <code>CreateGrant</code> returns. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a
|
|
442
|
-
* grant token</a> in the <i>
|
|
443
|
-
* <i>Key Management Service Developer Guide</i>
|
|
444
|
-
* </i>.</p>
|
|
445
|
-
* </li>
|
|
446
|
-
* <li>
|
|
447
|
-
* <p>The <code>CreateGrant</code> operation also returns a <code>GrantId</code>. You can
|
|
448
|
-
* use the <code>GrantId</code> and a key identifier to identify the grant in the <a>RetireGrant</a> and <a>RevokeGrant</a> operations. To find the grant
|
|
449
|
-
* ID, use the <a>ListGrants</a> or <a>ListRetirableGrants</a>
|
|
450
|
-
* operations.</p>
|
|
451
|
-
* </li>
|
|
452
|
-
* </ul>
|
|
453
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
454
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
455
|
-
* <p>
|
|
456
|
-
* <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
|
|
457
|
-
* ARN in the value of the <code>KeyId</code> parameter. </p>
|
|
458
|
-
* <p>
|
|
459
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateGrant</a> (key policy)</p>
|
|
460
|
-
* <p>
|
|
461
|
-
* <b>Related operations:</b>
|
|
462
|
-
* </p>
|
|
463
|
-
* <ul>
|
|
464
|
-
* <li>
|
|
465
|
-
* <p>
|
|
466
|
-
* <a>ListGrants</a>
|
|
467
|
-
* </p>
|
|
468
|
-
* </li>
|
|
469
|
-
* <li>
|
|
470
|
-
* <p>
|
|
471
|
-
* <a>ListRetirableGrants</a>
|
|
472
|
-
* </p>
|
|
473
|
-
* </li>
|
|
474
|
-
* <li>
|
|
475
|
-
* <p>
|
|
476
|
-
* <a>RetireGrant</a>
|
|
477
|
-
* </p>
|
|
478
|
-
* </li>
|
|
479
|
-
* <li>
|
|
480
|
-
* <p>
|
|
481
|
-
* <a>RevokeGrant</a>
|
|
482
|
-
* </p>
|
|
483
|
-
* </li>
|
|
484
|
-
* </ul>
|
|
79
|
+
* @see {@link CreateGrantCommand}
|
|
485
80
|
*/
|
|
486
81
|
createGrant(args: CreateGrantCommandInput, options?: __HttpHandlerOptions): Promise<CreateGrantCommandOutput>;
|
|
487
82
|
createGrant(args: CreateGrantCommandInput, cb: (err: any, data?: CreateGrantCommandOutput) => void): void;
|
|
488
83
|
createGrant(args: CreateGrantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateGrantCommandOutput) => void): void;
|
|
489
84
|
/**
|
|
490
|
-
* @
|
|
491
|
-
* <p>Creates a unique customer managed <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms-keys">KMS key</a> in your Amazon Web Services account and Region.
|
|
492
|
-
* You can use a KMS key in cryptographic operations, such as encryption and signing. Some Amazon Web Services
|
|
493
|
-
* services let you use KMS keys that you create and manage to protect your service
|
|
494
|
-
* resources.</p>
|
|
495
|
-
* <p>A KMS key is a logical representation of a cryptographic key. In addition to the key
|
|
496
|
-
* material used in cryptographic operations, a KMS key includes metadata, such as the key ID,
|
|
497
|
-
* key policy, creation date, description, and key state. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the
|
|
498
|
-
* <i>Key Management Service Developer Guide</i>
|
|
499
|
-
* </p>
|
|
500
|
-
* <p>Use the parameters of <code>CreateKey</code> to specify the type of KMS key, the source of
|
|
501
|
-
* its key material, its key policy, description, tags, and other properties.</p>
|
|
502
|
-
* <note>
|
|
503
|
-
* <p>KMS has replaced the term <i>customer master key (CMK)</i> with <i>KMS key</i> and <i>KMS key</i>. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.</p>
|
|
504
|
-
* </note>
|
|
505
|
-
* <p>To create different types of KMS keys, use the following guidance:</p>
|
|
506
|
-
* <dl>
|
|
507
|
-
* <dt>Symmetric encryption KMS key</dt>
|
|
508
|
-
* <dd>
|
|
509
|
-
* <p>By default, <code>CreateKey</code> creates a symmetric encryption KMS key with key
|
|
510
|
-
* material that KMS generates. This is the basic and most widely used type of KMS key, and
|
|
511
|
-
* provides the best performance.</p>
|
|
512
|
-
* <p>To create a symmetric encryption KMS key, you don't need to specify any parameters.
|
|
513
|
-
* The default value for <code>KeySpec</code>, <code>SYMMETRIC_DEFAULT</code>, the default
|
|
514
|
-
* value for <code>KeyUsage</code>, <code>ENCRYPT_DECRYPT</code>, and the default value for
|
|
515
|
-
* <code>Origin</code>, <code>AWS_KMS</code>, create a symmetric encryption KMS key with
|
|
516
|
-
* KMS key material.</p>
|
|
517
|
-
* <p>If you need a key for basic encryption and decryption or you are creating a KMS key
|
|
518
|
-
* to protect your resources in an Amazon Web Services service, create a symmetric encryption KMS key.
|
|
519
|
-
* The key material in a symmetric encryption key never leaves KMS unencrypted. You can
|
|
520
|
-
* use a symmetric encryption KMS key to encrypt and decrypt data up to 4,096 bytes, but
|
|
521
|
-
* they are typically used to generate data keys and data keys pairs. For details, see
|
|
522
|
-
* <a>GenerateDataKey</a> and <a>GenerateDataKeyPair</a>.</p>
|
|
523
|
-
* <p> </p>
|
|
524
|
-
* </dd>
|
|
525
|
-
* <dt>Asymmetric KMS keys</dt>
|
|
526
|
-
* <dd>
|
|
527
|
-
* <p>To create an asymmetric KMS key, use the <code>KeySpec</code> parameter to specify
|
|
528
|
-
* the type of key material in the KMS key. Then, use the <code>KeyUsage</code> parameter
|
|
529
|
-
* to determine whether the KMS key will be used to encrypt and decrypt or sign and verify.
|
|
530
|
-
* You can't change these properties after the KMS key is created.</p>
|
|
531
|
-
* <p>Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, or an SM2 key pair (China Regions only). The private key in an asymmetric
|
|
532
|
-
* KMS key never leaves KMS unencrypted. However, you can use the <a>GetPublicKey</a> operation to download the public key
|
|
533
|
-
* so it can be used outside of KMS. KMS keys with RSA or SM2 key pairs can be used to encrypt or decrypt data or sign and verify messages (but not both).
|
|
534
|
-
* KMS keys with ECC key pairs can be used only to sign and verify messages.
|
|
535
|
-
* For information about asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
536
|
-
* <p> </p>
|
|
537
|
-
* </dd>
|
|
538
|
-
* <dt>HMAC KMS key</dt>
|
|
539
|
-
* <dd>
|
|
540
|
-
* <p>To create an HMAC KMS key, set the <code>KeySpec</code> parameter to a key spec
|
|
541
|
-
* value for HMAC KMS keys. Then set the <code>KeyUsage</code> parameter to
|
|
542
|
-
* <code>GENERATE_VERIFY_MAC</code>. You must set the key usage even though
|
|
543
|
-
* <code>GENERATE_VERIFY_MAC</code> is the only valid key usage value for HMAC KMS keys.
|
|
544
|
-
* You can't change these properties after the KMS key is created.</p>
|
|
545
|
-
* <p>HMAC KMS keys are symmetric keys that never leave KMS unencrypted. You can use
|
|
546
|
-
* HMAC keys to generate (<a>GenerateMac</a>) and verify (<a>VerifyMac</a>) HMAC codes for messages up to 4096 bytes.</p>
|
|
547
|
-
* <p>HMAC KMS keys are not supported in all Amazon Web Services Regions. If you try to create an HMAC
|
|
548
|
-
* KMS key in an Amazon Web Services Region in which HMAC keys are not supported, the
|
|
549
|
-
* <code>CreateKey</code> operation returns an
|
|
550
|
-
* <code>UnsupportedOperationException</code>. For a list of Regions in which HMAC KMS keys
|
|
551
|
-
* are supported, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC keys in
|
|
552
|
-
* KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
553
|
-
* <p> </p>
|
|
554
|
-
* </dd>
|
|
555
|
-
* <dt>Multi-Region primary keys</dt>
|
|
556
|
-
* <dt>Imported key material</dt>
|
|
557
|
-
* <dd>
|
|
558
|
-
* <p>To create a multi-Region <i>primary key</i> in the local Amazon Web Services Region,
|
|
559
|
-
* use the <code>MultiRegion</code> parameter with a value of <code>True</code>. To create
|
|
560
|
-
* a multi-Region <i>replica key</i>, that is, a KMS key with the same key ID
|
|
561
|
-
* and key material as a primary key, but in a different Amazon Web Services Region, use the <a>ReplicateKey</a> operation. To change a replica key to a primary key, and its
|
|
562
|
-
* primary key to a replica key, use the <a>UpdatePrimaryRegion</a>
|
|
563
|
-
* operation.</p>
|
|
564
|
-
* <p>You can create multi-Region KMS keys for all supported KMS key types: symmetric
|
|
565
|
-
* encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys, and asymmetric
|
|
566
|
-
* signing KMS keys. You can also create multi-Region keys with imported key material.
|
|
567
|
-
* However, you can't create multi-Region keys in a custom key store.</p>
|
|
568
|
-
* <p>This operation supports <i>multi-Region keys</i>, an KMS feature that lets you create multiple
|
|
569
|
-
* interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key
|
|
570
|
-
* material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt
|
|
571
|
-
* it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Multi-Region keys in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
572
|
-
* <p> </p>
|
|
573
|
-
* </dd>
|
|
574
|
-
* <dd>
|
|
575
|
-
* <p>To import your own key material into a KMS key, begin by creating a symmetric
|
|
576
|
-
* encryption KMS key with no key material. To do this, use the <code>Origin</code>
|
|
577
|
-
* parameter of <code>CreateKey</code> with a value of <code>EXTERNAL</code>. Next, use
|
|
578
|
-
* <a>GetParametersForImport</a> operation to get a public key and import
|
|
579
|
-
* token, and use the public key to encrypt your key material. Then, use <a>ImportKeyMaterial</a> with your import token to import the key material. For
|
|
580
|
-
* step-by-step instructions, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key Material</a> in the <i>
|
|
581
|
-
* <i>Key Management Service Developer Guide</i>
|
|
582
|
-
* </i>.</p>
|
|
583
|
-
* <p>This feature supports only symmetric encryption KMS keys, including multi-Region
|
|
584
|
-
* symmetric encryption KMS keys. You cannot import key material into any other type of KMS
|
|
585
|
-
* key.</p>
|
|
586
|
-
* <p>To create a multi-Region primary key with imported key material, use the
|
|
587
|
-
* <code>Origin</code> parameter of <code>CreateKey</code> with a value of
|
|
588
|
-
* <code>EXTERNAL</code> and the <code>MultiRegion</code> parameter with a value of
|
|
589
|
-
* <code>True</code>. To create replicas of the multi-Region primary key, use the <a>ReplicateKey</a> operation. For instructions, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html ">Importing key material into
|
|
590
|
-
* multi-Region keys</a>. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Multi-Region keys in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
591
|
-
* <p> </p>
|
|
592
|
-
* </dd>
|
|
593
|
-
* <dt>Custom key store</dt>
|
|
594
|
-
* <dd>
|
|
595
|
-
* <p>A <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> lets you protect your Amazon Web Services resources using keys in a backing key
|
|
596
|
-
* store that you own and manage. When you request a cryptographic operation with a KMS key
|
|
597
|
-
* in a custom key store, the operation is performed in the backing key store using its
|
|
598
|
-
* cryptographic keys.</p>
|
|
599
|
-
* <p>KMS supports <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html">CloudHSM key stores</a> backed by an CloudHSM cluster and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html">external key stores</a> backed by an
|
|
600
|
-
* external key manager outside of Amazon Web Services. When you create a KMS key in an CloudHSM key store,
|
|
601
|
-
* KMS generates an encryption key in the CloudHSM cluster and associates it with the KMS
|
|
602
|
-
* key. When you create a KMS key in an external key store, you specify an existing
|
|
603
|
-
* encryption key in the external key manager.</p>
|
|
604
|
-
* <note>
|
|
605
|
-
* <p>Some external key managers provide a simpler method for creating a KMS key in an
|
|
606
|
-
* external key store. For details, see your external key manager documentation.</p>
|
|
607
|
-
* </note>
|
|
608
|
-
* <p>Before you create a KMS key in a custom key store, the <code>ConnectionState</code>
|
|
609
|
-
* of the key store must be <code>CONNECTED</code>. To connect the custom key store, use
|
|
610
|
-
* the <a>ConnectCustomKeyStore</a> operation. To find the
|
|
611
|
-
* <code>ConnectionState</code>, use the <a>DescribeCustomKeyStores</a>
|
|
612
|
-
* operation.</p>
|
|
613
|
-
* <p>To create a KMS key in a custom key store, use the <code>CustomKeyStoreId</code>.
|
|
614
|
-
* Use the default <code>KeySpec</code> value, <code>SYMMETRIC_DEFAULT</code>, and the
|
|
615
|
-
* default <code>KeyUsage</code> value, <code>ENCRYPT_DECRYPT</code> to create a symmetric
|
|
616
|
-
* encryption key. No other key type is supported in a custom key store.</p>
|
|
617
|
-
* <p>To create a KMS key in an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html">CloudHSM key store</a>, use the
|
|
618
|
-
* <code>Origin</code> parameter with a value of <code>AWS_CLOUDHSM</code>. The CloudHSM
|
|
619
|
-
* cluster that is associated with the custom key store must have at least two active HSMs
|
|
620
|
-
* in different Availability Zones in the Amazon Web Services Region.</p>
|
|
621
|
-
* <p>To create a KMS key in an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html">external key store</a>, use the <code>Origin</code> parameter
|
|
622
|
-
* with a value of <code>EXTERNAL_KEY_STORE</code> and an <code>XksKeyId</code> parameter
|
|
623
|
-
* that identifies an existing external key.</p>
|
|
624
|
-
* <note>
|
|
625
|
-
* <p>Some external key managers provide a simpler method for creating a KMS key in an
|
|
626
|
-
* external key store. For details, see your external key manager documentation.</p>
|
|
627
|
-
* </note>
|
|
628
|
-
* </dd>
|
|
629
|
-
* </dl>
|
|
630
|
-
* <p>
|
|
631
|
-
* <b>Cross-account use</b>: No. You cannot use this operation to
|
|
632
|
-
* create a KMS key in a different Amazon Web Services account.</p>
|
|
633
|
-
* <p>
|
|
634
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateKey</a> (IAM policy). To use the
|
|
635
|
-
* <code>Tags</code> parameter, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:TagResource</a> (IAM policy). For examples and information about related
|
|
636
|
-
* permissions, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key">Allow a user to create
|
|
637
|
-
* KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
638
|
-
* <p>
|
|
639
|
-
* <b>Related operations:</b>
|
|
640
|
-
* </p>
|
|
641
|
-
* <ul>
|
|
642
|
-
* <li>
|
|
643
|
-
* <p>
|
|
644
|
-
* <a>DescribeKey</a>
|
|
645
|
-
* </p>
|
|
646
|
-
* </li>
|
|
647
|
-
* <li>
|
|
648
|
-
* <p>
|
|
649
|
-
* <a>ListKeys</a>
|
|
650
|
-
* </p>
|
|
651
|
-
* </li>
|
|
652
|
-
* <li>
|
|
653
|
-
* <p>
|
|
654
|
-
* <a>ScheduleKeyDeletion</a>
|
|
655
|
-
* </p>
|
|
656
|
-
* </li>
|
|
657
|
-
* </ul>
|
|
85
|
+
* @see {@link CreateKeyCommand}
|
|
658
86
|
*/
|
|
659
87
|
createKey(args: CreateKeyCommandInput, options?: __HttpHandlerOptions): Promise<CreateKeyCommandOutput>;
|
|
660
88
|
createKey(args: CreateKeyCommandInput, cb: (err: any, data?: CreateKeyCommandOutput) => void): void;
|
|
661
89
|
createKey(args: CreateKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateKeyCommandOutput) => void): void;
|
|
662
90
|
/**
|
|
663
|
-
* @
|
|
664
|
-
* <p>Decrypts ciphertext that was encrypted by a KMS key using any of the following
|
|
665
|
-
* operations:</p>
|
|
666
|
-
* <ul>
|
|
667
|
-
* <li>
|
|
668
|
-
* <p>
|
|
669
|
-
* <a>Encrypt</a>
|
|
670
|
-
* </p>
|
|
671
|
-
* </li>
|
|
672
|
-
* <li>
|
|
673
|
-
* <p>
|
|
674
|
-
* <a>GenerateDataKey</a>
|
|
675
|
-
* </p>
|
|
676
|
-
* </li>
|
|
677
|
-
* <li>
|
|
678
|
-
* <p>
|
|
679
|
-
* <a>GenerateDataKeyPair</a>
|
|
680
|
-
* </p>
|
|
681
|
-
* </li>
|
|
682
|
-
* <li>
|
|
683
|
-
* <p>
|
|
684
|
-
* <a>GenerateDataKeyWithoutPlaintext</a>
|
|
685
|
-
* </p>
|
|
686
|
-
* </li>
|
|
687
|
-
* <li>
|
|
688
|
-
* <p>
|
|
689
|
-
* <a>GenerateDataKeyPairWithoutPlaintext</a>
|
|
690
|
-
* </p>
|
|
691
|
-
* </li>
|
|
692
|
-
* </ul>
|
|
693
|
-
* <p>You can use this operation to decrypt ciphertext that was encrypted under a symmetric
|
|
694
|
-
* encryption KMS key or an asymmetric encryption KMS key. When the KMS key is asymmetric, you
|
|
695
|
-
* must specify the KMS key and the encryption algorithm that was used to encrypt the ciphertext.
|
|
696
|
-
* For information about asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
697
|
-
* <p>The <code>Decrypt</code> operation also decrypts ciphertext that was encrypted outside of
|
|
698
|
-
* KMS by the public key in an KMS asymmetric KMS key. However, it cannot decrypt symmetric
|
|
699
|
-
* ciphertext produced by other libraries, such as the <a href="https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/">Amazon Web Services Encryption SDK</a> or <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3 client-side encryption</a>.
|
|
700
|
-
* These libraries return a ciphertext format that is incompatible with KMS.</p>
|
|
701
|
-
* <p>If the ciphertext was encrypted under a symmetric encryption KMS key, the
|
|
702
|
-
* <code>KeyId</code> parameter is optional. KMS can get this information from metadata that
|
|
703
|
-
* it adds to the symmetric ciphertext blob. This feature adds durability to your implementation
|
|
704
|
-
* by ensuring that authorized users can decrypt ciphertext decades after it was encrypted, even
|
|
705
|
-
* if they've lost track of the key ID. However, specifying the KMS key is always recommended as
|
|
706
|
-
* a best practice. When you use the <code>KeyId</code> parameter to specify a KMS key, KMS
|
|
707
|
-
* only uses the KMS key you specify. If the ciphertext was encrypted under a different KMS key,
|
|
708
|
-
* the <code>Decrypt</code> operation fails. This practice ensures that you use the KMS key that
|
|
709
|
-
* you intend.</p>
|
|
710
|
-
* <p>Whenever possible, use key policies to give users permission to call the
|
|
711
|
-
* <code>Decrypt</code> operation on a particular KMS key, instead of using &IAM; policies.
|
|
712
|
-
* Otherwise, you might create an &IAM; policy that gives the user <code>Decrypt</code>
|
|
713
|
-
* permission on all KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys
|
|
714
|
-
* in other accounts if the key policy for the cross-account KMS key permits it. If you must use
|
|
715
|
-
* an IAM policy for <code>Decrypt</code> permissions, limit the user to particular KMS keys or
|
|
716
|
-
* particular trusted accounts. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policies-best-practices">Best practices for IAM
|
|
717
|
-
* policies</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
718
|
-
* <p>Applications in Amazon Web Services Nitro Enclaves can call this operation by using the <a href="https://github.com/aws/aws-nitro-enclaves-sdk-c">Amazon Web Services Nitro Enclaves Development Kit</a>. For information about the supporting parameters, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html">How Amazon Web Services Nitro Enclaves use KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
719
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
720
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
721
|
-
* <p>
|
|
722
|
-
* <b>Cross-account use</b>: Yes. If you use the <code>KeyId</code>
|
|
723
|
-
* parameter to identify a KMS key in a different Amazon Web Services account, specify the key ARN or the alias
|
|
724
|
-
* ARN of the KMS key.</p>
|
|
725
|
-
* <p>
|
|
726
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Decrypt</a> (key policy)</p>
|
|
727
|
-
* <p>
|
|
728
|
-
* <b>Related operations:</b>
|
|
729
|
-
* </p>
|
|
730
|
-
* <ul>
|
|
731
|
-
* <li>
|
|
732
|
-
* <p>
|
|
733
|
-
* <a>Encrypt</a>
|
|
734
|
-
* </p>
|
|
735
|
-
* </li>
|
|
736
|
-
* <li>
|
|
737
|
-
* <p>
|
|
738
|
-
* <a>GenerateDataKey</a>
|
|
739
|
-
* </p>
|
|
740
|
-
* </li>
|
|
741
|
-
* <li>
|
|
742
|
-
* <p>
|
|
743
|
-
* <a>GenerateDataKeyPair</a>
|
|
744
|
-
* </p>
|
|
745
|
-
* </li>
|
|
746
|
-
* <li>
|
|
747
|
-
* <p>
|
|
748
|
-
* <a>ReEncrypt</a>
|
|
749
|
-
* </p>
|
|
750
|
-
* </li>
|
|
751
|
-
* </ul>
|
|
91
|
+
* @see {@link DecryptCommand}
|
|
752
92
|
*/
|
|
753
93
|
decrypt(args: DecryptCommandInput, options?: __HttpHandlerOptions): Promise<DecryptCommandOutput>;
|
|
754
94
|
decrypt(args: DecryptCommandInput, cb: (err: any, data?: DecryptCommandOutput) => void): void;
|
|
755
95
|
decrypt(args: DecryptCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DecryptCommandOutput) => void): void;
|
|
756
96
|
/**
|
|
757
|
-
* @
|
|
758
|
-
* <p>Deletes the specified alias. </p>
|
|
759
|
-
* <note>
|
|
760
|
-
* <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">ABAC for KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
761
|
-
* </note>
|
|
762
|
-
* <p>Because an alias is not a property of a KMS key, you can delete and change the aliases of
|
|
763
|
-
* a KMS key without affecting the KMS key. Also, aliases do not appear in the response from the
|
|
764
|
-
* <a>DescribeKey</a> operation. To get the aliases of all KMS keys, use the <a>ListAliases</a> operation. </p>
|
|
765
|
-
* <p>Each KMS key can have multiple aliases. To change the alias of a KMS key, use <a>DeleteAlias</a> to delete the current alias and <a>CreateAlias</a> to
|
|
766
|
-
* create a new alias. To associate an existing alias with a different KMS key, call <a>UpdateAlias</a>.</p>
|
|
767
|
-
* <p>
|
|
768
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on an alias in a different Amazon Web Services account.</p>
|
|
769
|
-
* <p>
|
|
770
|
-
* <b>Required permissions</b>
|
|
771
|
-
* </p>
|
|
772
|
-
* <ul>
|
|
773
|
-
* <li>
|
|
774
|
-
* <p>
|
|
775
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeleteAlias</a> on
|
|
776
|
-
* the alias (IAM policy).</p>
|
|
777
|
-
* </li>
|
|
778
|
-
* <li>
|
|
779
|
-
* <p>
|
|
780
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeleteAlias</a> on
|
|
781
|
-
* the KMS key (key policy).</p>
|
|
782
|
-
* </li>
|
|
783
|
-
* </ul>
|
|
784
|
-
* <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the
|
|
785
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
786
|
-
* <p>
|
|
787
|
-
* <b>Related operations:</b>
|
|
788
|
-
* </p>
|
|
789
|
-
* <ul>
|
|
790
|
-
* <li>
|
|
791
|
-
* <p>
|
|
792
|
-
* <a>CreateAlias</a>
|
|
793
|
-
* </p>
|
|
794
|
-
* </li>
|
|
795
|
-
* <li>
|
|
796
|
-
* <p>
|
|
797
|
-
* <a>ListAliases</a>
|
|
798
|
-
* </p>
|
|
799
|
-
* </li>
|
|
800
|
-
* <li>
|
|
801
|
-
* <p>
|
|
802
|
-
* <a>UpdateAlias</a>
|
|
803
|
-
* </p>
|
|
804
|
-
* </li>
|
|
805
|
-
* </ul>
|
|
97
|
+
* @see {@link DeleteAliasCommand}
|
|
806
98
|
*/
|
|
807
99
|
deleteAlias(args: DeleteAliasCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAliasCommandOutput>;
|
|
808
100
|
deleteAlias(args: DeleteAliasCommandInput, cb: (err: any, data?: DeleteAliasCommandOutput) => void): void;
|
|
809
101
|
deleteAlias(args: DeleteAliasCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteAliasCommandOutput) => void): void;
|
|
810
102
|
/**
|
|
811
|
-
* @
|
|
812
|
-
* <p>Deletes a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. This operation does not affect any backing elements of the
|
|
813
|
-
* custom key store. It does not delete the CloudHSM cluster that is associated with an CloudHSM key
|
|
814
|
-
* store, or affect any users or keys in the cluster. For an external key store, it does not
|
|
815
|
-
* affect the external key store proxy, external key manager, or any external keys.</p>
|
|
816
|
-
* <p> This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> feature in KMS, which
|
|
817
|
-
* combines the convenience and extensive integration of KMS with the isolation and control of a
|
|
818
|
-
* key store that you own and manage.</p>
|
|
819
|
-
* <p>The custom key store that you delete cannot contain any <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS keys</a>. Before deleting the key store,
|
|
820
|
-
* verify that you will never need to use any of the KMS keys in the key store for any
|
|
821
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>. Then, use <a>ScheduleKeyDeletion</a> to delete the KMS keys from the
|
|
822
|
-
* key store. After the required waiting period expires and all KMS keys are deleted from the
|
|
823
|
-
* custom key store, use <a>DisconnectCustomKeyStore</a> to disconnect the key store
|
|
824
|
-
* from KMS. Then, you can delete the custom key store.</p>
|
|
825
|
-
* <p>For keys in an CloudHSM key store, the <code>ScheduleKeyDeletion</code> operation makes a
|
|
826
|
-
* best effort to delete the key material from the associated cluster. However, you might need to
|
|
827
|
-
* manually <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key">delete the orphaned key
|
|
828
|
-
* material</a> from the cluster and its backups. KMS never creates, manages, or deletes
|
|
829
|
-
* cryptographic keys in the external key manager associated with an external key store. You must
|
|
830
|
-
* manage them using your external key manager tools.</p>
|
|
831
|
-
* <p>Instead of deleting the custom key store, consider using the <a>DisconnectCustomKeyStore</a> operation to disconnect the custom key store from its
|
|
832
|
-
* backing key store. While the key store is disconnected, you cannot create or use the KMS keys
|
|
833
|
-
* in the key store. But, you do not need to delete KMS keys and you can reconnect a disconnected
|
|
834
|
-
* custom key store at any time.</p>
|
|
835
|
-
* <p>If the operation succeeds, it returns a JSON object with no
|
|
836
|
-
* properties.</p>
|
|
837
|
-
* <p>
|
|
838
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
|
|
839
|
-
* <p>
|
|
840
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeleteCustomKeyStore</a> (IAM policy)</p>
|
|
841
|
-
* <p>
|
|
842
|
-
* <b>Related operations:</b>
|
|
843
|
-
* </p>
|
|
844
|
-
* <ul>
|
|
845
|
-
* <li>
|
|
846
|
-
* <p>
|
|
847
|
-
* <a>ConnectCustomKeyStore</a>
|
|
848
|
-
* </p>
|
|
849
|
-
* </li>
|
|
850
|
-
* <li>
|
|
851
|
-
* <p>
|
|
852
|
-
* <a>CreateCustomKeyStore</a>
|
|
853
|
-
* </p>
|
|
854
|
-
* </li>
|
|
855
|
-
* <li>
|
|
856
|
-
* <p>
|
|
857
|
-
* <a>DescribeCustomKeyStores</a>
|
|
858
|
-
* </p>
|
|
859
|
-
* </li>
|
|
860
|
-
* <li>
|
|
861
|
-
* <p>
|
|
862
|
-
* <a>DisconnectCustomKeyStore</a>
|
|
863
|
-
* </p>
|
|
864
|
-
* </li>
|
|
865
|
-
* <li>
|
|
866
|
-
* <p>
|
|
867
|
-
* <a>UpdateCustomKeyStore</a>
|
|
868
|
-
* </p>
|
|
869
|
-
* </li>
|
|
870
|
-
* </ul>
|
|
103
|
+
* @see {@link DeleteCustomKeyStoreCommand}
|
|
871
104
|
*/
|
|
872
105
|
deleteCustomKeyStore(args: DeleteCustomKeyStoreCommandInput, options?: __HttpHandlerOptions): Promise<DeleteCustomKeyStoreCommandOutput>;
|
|
873
106
|
deleteCustomKeyStore(args: DeleteCustomKeyStoreCommandInput, cb: (err: any, data?: DeleteCustomKeyStoreCommandOutput) => void): void;
|
|
874
107
|
deleteCustomKeyStore(args: DeleteCustomKeyStoreCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteCustomKeyStoreCommandOutput) => void): void;
|
|
875
108
|
/**
|
|
876
|
-
* @
|
|
877
|
-
* <p>Deletes key material that you previously imported. This operation makes the specified KMS
|
|
878
|
-
* key unusable. For more information about importing key material into KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key Material</a>
|
|
879
|
-
* in the <i>Key Management Service Developer Guide</i>. </p>
|
|
880
|
-
* <p>When the specified KMS key is in the <code>PendingDeletion</code> state, this operation
|
|
881
|
-
* does not change the KMS key's state. Otherwise, it changes the KMS key's state to
|
|
882
|
-
* <code>PendingImport</code>.</p>
|
|
883
|
-
* <p>After you delete key material, you can use <a>ImportKeyMaterial</a> to reimport
|
|
884
|
-
* the same key material into the KMS key.</p>
|
|
885
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
886
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
887
|
-
* <p>
|
|
888
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
889
|
-
* <p>
|
|
890
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeleteImportedKeyMaterial</a> (key policy)</p>
|
|
891
|
-
* <p>
|
|
892
|
-
* <b>Related operations:</b>
|
|
893
|
-
* </p>
|
|
894
|
-
* <ul>
|
|
895
|
-
* <li>
|
|
896
|
-
* <p>
|
|
897
|
-
* <a>GetParametersForImport</a>
|
|
898
|
-
* </p>
|
|
899
|
-
* </li>
|
|
900
|
-
* <li>
|
|
901
|
-
* <p>
|
|
902
|
-
* <a>ImportKeyMaterial</a>
|
|
903
|
-
* </p>
|
|
904
|
-
* </li>
|
|
905
|
-
* </ul>
|
|
109
|
+
* @see {@link DeleteImportedKeyMaterialCommand}
|
|
906
110
|
*/
|
|
907
111
|
deleteImportedKeyMaterial(args: DeleteImportedKeyMaterialCommandInput, options?: __HttpHandlerOptions): Promise<DeleteImportedKeyMaterialCommandOutput>;
|
|
908
112
|
deleteImportedKeyMaterial(args: DeleteImportedKeyMaterialCommandInput, cb: (err: any, data?: DeleteImportedKeyMaterialCommandOutput) => void): void;
|
|
909
113
|
deleteImportedKeyMaterial(args: DeleteImportedKeyMaterialCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteImportedKeyMaterialCommandOutput) => void): void;
|
|
910
114
|
/**
|
|
911
|
-
* @
|
|
912
|
-
* <p>Gets information about <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> in the account and Region.</p>
|
|
913
|
-
* <p> This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> feature in KMS, which
|
|
914
|
-
* combines the convenience and extensive integration of KMS with the isolation and control of a
|
|
915
|
-
* key store that you own and manage.</p>
|
|
916
|
-
* <p>By default, this operation returns information about all custom key stores in the account
|
|
917
|
-
* and Region. To get only information about a particular custom key store, use either the
|
|
918
|
-
* <code>CustomKeyStoreName</code> or <code>CustomKeyStoreId</code> parameter (but not
|
|
919
|
-
* both).</p>
|
|
920
|
-
* <p>To determine whether the custom key store is connected to its CloudHSM cluster or external
|
|
921
|
-
* key store proxy, use the <code>ConnectionState</code> element in the response. If an attempt
|
|
922
|
-
* to connect the custom key store failed, the <code>ConnectionState</code> value is
|
|
923
|
-
* <code>FAILED</code> and the <code>ConnectionErrorCode</code> element in the response
|
|
924
|
-
* indicates the cause of the failure. For help interpreting the
|
|
925
|
-
* <code>ConnectionErrorCode</code>, see <a>CustomKeyStoresListEntry</a>.</p>
|
|
926
|
-
* <p>Custom key stores have a <code>DISCONNECTED</code> connection state if the key store has
|
|
927
|
-
* never been connected or you used the <a>DisconnectCustomKeyStore</a> operation to
|
|
928
|
-
* disconnect it. Otherwise, the connection state is CONNECTED. If your custom key store
|
|
929
|
-
* connection state is <code>CONNECTED</code> but you are having trouble using it, verify that
|
|
930
|
-
* the backing store is active and available. For an CloudHSM key store, verify that the associated
|
|
931
|
-
* CloudHSM cluster is active and contains the minimum number of HSMs required for the operation, if
|
|
932
|
-
* any. For an external key store, verify that the external key store proxy and its associated
|
|
933
|
-
* external key manager are reachable and enabled.</p>
|
|
934
|
-
* <p> For help repairing your CloudHSM key store, see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html">Troubleshooting CloudHSM key stores</a>. For help
|
|
935
|
-
* repairing your external key store, see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html">Troubleshooting external key stores</a>. Both
|
|
936
|
-
* topics are in the <i>Key Management Service Developer Guide</i>.</p>
|
|
937
|
-
* <p>
|
|
938
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
|
|
939
|
-
* <p>
|
|
940
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DescribeCustomKeyStores</a> (IAM policy)</p>
|
|
941
|
-
* <p>
|
|
942
|
-
* <b>Related operations:</b>
|
|
943
|
-
* </p>
|
|
944
|
-
* <ul>
|
|
945
|
-
* <li>
|
|
946
|
-
* <p>
|
|
947
|
-
* <a>ConnectCustomKeyStore</a>
|
|
948
|
-
* </p>
|
|
949
|
-
* </li>
|
|
950
|
-
* <li>
|
|
951
|
-
* <p>
|
|
952
|
-
* <a>CreateCustomKeyStore</a>
|
|
953
|
-
* </p>
|
|
954
|
-
* </li>
|
|
955
|
-
* <li>
|
|
956
|
-
* <p>
|
|
957
|
-
* <a>DeleteCustomKeyStore</a>
|
|
958
|
-
* </p>
|
|
959
|
-
* </li>
|
|
960
|
-
* <li>
|
|
961
|
-
* <p>
|
|
962
|
-
* <a>DisconnectCustomKeyStore</a>
|
|
963
|
-
* </p>
|
|
964
|
-
* </li>
|
|
965
|
-
* <li>
|
|
966
|
-
* <p>
|
|
967
|
-
* <a>UpdateCustomKeyStore</a>
|
|
968
|
-
* </p>
|
|
969
|
-
* </li>
|
|
970
|
-
* </ul>
|
|
115
|
+
* @see {@link DescribeCustomKeyStoresCommand}
|
|
971
116
|
*/
|
|
972
117
|
describeCustomKeyStores(args: DescribeCustomKeyStoresCommandInput, options?: __HttpHandlerOptions): Promise<DescribeCustomKeyStoresCommandOutput>;
|
|
973
118
|
describeCustomKeyStores(args: DescribeCustomKeyStoresCommandInput, cb: (err: any, data?: DescribeCustomKeyStoresCommandOutput) => void): void;
|
|
974
119
|
describeCustomKeyStores(args: DescribeCustomKeyStoresCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeCustomKeyStoresCommandOutput) => void): void;
|
|
975
120
|
/**
|
|
976
|
-
* @
|
|
977
|
-
* <p>Provides detailed information about a KMS key. You can run <code>DescribeKey</code> on a
|
|
978
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed
|
|
979
|
-
* key</a> or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.</p>
|
|
980
|
-
* <p>This detailed information includes the key ARN, creation date (and deletion date, if
|
|
981
|
-
* applicable), the key state, and the origin and expiration date (if any) of the key material.
|
|
982
|
-
* It includes fields, like <code>KeySpec</code>, that help you distinguish different types of
|
|
983
|
-
* KMS keys. It also displays the key usage (encryption, signing, or generating and verifying
|
|
984
|
-
* MACs) and the algorithms that the KMS key supports. </p>
|
|
985
|
-
* <p>For <a href="kms/latest/developerguide/multi-region-keys-overview.html">multi-Region keys</a>,
|
|
986
|
-
* <code>DescribeKey</code> displays the primary key and all related replica keys. For KMS keys
|
|
987
|
-
* in <a href="kms/latest/developerguide/keystore-cloudhsm.html">CloudHSM key stores</a>, it includes
|
|
988
|
-
* information about the key store, such as the key store ID and the CloudHSM cluster ID. For KMS
|
|
989
|
-
* keys in <a href="kms/latest/developerguide/keystore-external.html">external key stores</a>, it
|
|
990
|
-
* includes the custom key store ID and the ID of the external key.</p>
|
|
991
|
-
* <p>
|
|
992
|
-
* <code>DescribeKey</code> does not return the following information:</p>
|
|
993
|
-
* <ul>
|
|
994
|
-
* <li>
|
|
995
|
-
* <p>Aliases associated with the KMS key. To get this information, use <a>ListAliases</a>.</p>
|
|
996
|
-
* </li>
|
|
997
|
-
* <li>
|
|
998
|
-
* <p>Whether automatic key rotation is enabled on the KMS key. To get this information, use
|
|
999
|
-
* <a>GetKeyRotationStatus</a>. Also, some key states prevent a KMS key from
|
|
1000
|
-
* being automatically rotated. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works">How Automatic Key Rotation
|
|
1001
|
-
* Works</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1002
|
-
* </li>
|
|
1003
|
-
* <li>
|
|
1004
|
-
* <p>Tags on the KMS key. To get this information, use <a>ListResourceTags</a>.</p>
|
|
1005
|
-
* </li>
|
|
1006
|
-
* <li>
|
|
1007
|
-
* <p>Key policies and grants on the KMS key. To get this information, use <a>GetKeyPolicy</a> and <a>ListGrants</a>.</p>
|
|
1008
|
-
* </li>
|
|
1009
|
-
* </ul>
|
|
1010
|
-
* <p>In general, <code>DescribeKey</code> is a non-mutating operation. It returns data about
|
|
1011
|
-
* KMS keys, but doesn't change them. However, Amazon Web Services services use <code>DescribeKey</code> to
|
|
1012
|
-
* create <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services
|
|
1013
|
-
* managed keys</a> from a <i>predefined Amazon Web Services alias</i> with no key
|
|
1014
|
-
* ID.</p>
|
|
1015
|
-
* <p>
|
|
1016
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
1017
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
1018
|
-
* <p>
|
|
1019
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DescribeKey</a> (key policy)</p>
|
|
1020
|
-
* <p>
|
|
1021
|
-
* <b>Related operations:</b>
|
|
1022
|
-
* </p>
|
|
1023
|
-
* <ul>
|
|
1024
|
-
* <li>
|
|
1025
|
-
* <p>
|
|
1026
|
-
* <a>GetKeyPolicy</a>
|
|
1027
|
-
* </p>
|
|
1028
|
-
* </li>
|
|
1029
|
-
* <li>
|
|
1030
|
-
* <p>
|
|
1031
|
-
* <a>GetKeyRotationStatus</a>
|
|
1032
|
-
* </p>
|
|
1033
|
-
* </li>
|
|
1034
|
-
* <li>
|
|
1035
|
-
* <p>
|
|
1036
|
-
* <a>ListAliases</a>
|
|
1037
|
-
* </p>
|
|
1038
|
-
* </li>
|
|
1039
|
-
* <li>
|
|
1040
|
-
* <p>
|
|
1041
|
-
* <a>ListGrants</a>
|
|
1042
|
-
* </p>
|
|
1043
|
-
* </li>
|
|
1044
|
-
* <li>
|
|
1045
|
-
* <p>
|
|
1046
|
-
* <a>ListKeys</a>
|
|
1047
|
-
* </p>
|
|
1048
|
-
* </li>
|
|
1049
|
-
* <li>
|
|
1050
|
-
* <p>
|
|
1051
|
-
* <a>ListResourceTags</a>
|
|
1052
|
-
* </p>
|
|
1053
|
-
* </li>
|
|
1054
|
-
* <li>
|
|
1055
|
-
* <p>
|
|
1056
|
-
* <a>ListRetirableGrants</a>
|
|
1057
|
-
* </p>
|
|
1058
|
-
* </li>
|
|
1059
|
-
* </ul>
|
|
121
|
+
* @see {@link DescribeKeyCommand}
|
|
1060
122
|
*/
|
|
1061
123
|
describeKey(args: DescribeKeyCommandInput, options?: __HttpHandlerOptions): Promise<DescribeKeyCommandOutput>;
|
|
1062
124
|
describeKey(args: DescribeKeyCommandInput, cb: (err: any, data?: DescribeKeyCommandOutput) => void): void;
|
|
1063
125
|
describeKey(args: DescribeKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeKeyCommandOutput) => void): void;
|
|
1064
126
|
/**
|
|
1065
|
-
* @
|
|
1066
|
-
* <p>Sets the state of a KMS key to disabled. This change temporarily prevents use of the KMS
|
|
1067
|
-
* key for <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>. </p>
|
|
1068
|
-
* <p>For more information about how key state affects the use of a KMS key, see
|
|
1069
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
1070
|
-
* <i>Key Management Service Developer Guide</i>
|
|
1071
|
-
* </i>.</p>
|
|
1072
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1073
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1074
|
-
* <p>
|
|
1075
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
1076
|
-
* <p>
|
|
1077
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DisableKey</a> (key policy)</p>
|
|
1078
|
-
* <p>
|
|
1079
|
-
* <b>Related operations</b>: <a>EnableKey</a>
|
|
1080
|
-
* </p>
|
|
127
|
+
* @see {@link DisableKeyCommand}
|
|
1081
128
|
*/
|
|
1082
129
|
disableKey(args: DisableKeyCommandInput, options?: __HttpHandlerOptions): Promise<DisableKeyCommandOutput>;
|
|
1083
130
|
disableKey(args: DisableKeyCommandInput, cb: (err: any, data?: DisableKeyCommandOutput) => void): void;
|
|
1084
131
|
disableKey(args: DisableKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DisableKeyCommandOutput) => void): void;
|
|
1085
132
|
/**
|
|
1086
|
-
* @
|
|
1087
|
-
* <p>Disables <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic
|
|
1088
|
-
* rotation of the key material</a> of the specified symmetric encryption KMS key.</p>
|
|
1089
|
-
* <p>Automatic key rotation is supported only on symmetric encryption KMS keys.
|
|
1090
|
-
* You cannot enable automatic rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">asymmetric KMS keys</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC KMS keys</a>, KMS keys with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key material</a>, or KMS keys in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To enable or disable automatic rotation of a set of related <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate">multi-Region keys</a>, set the property on the primary key.</p>
|
|
1091
|
-
* <p>You can enable (<a>EnableKeyRotation</a>) and disable automatic rotation of the
|
|
1092
|
-
* key material in <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed KMS keys</a>. Key material rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed KMS keys</a> is not
|
|
1093
|
-
* configurable. KMS always rotates the key material for every year. Rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned KMS
|
|
1094
|
-
* keys</a> varies.</p>
|
|
1095
|
-
* <note>
|
|
1096
|
-
* <p>In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three
|
|
1097
|
-
* years to every year. For details, see <a>EnableKeyRotation</a>.</p>
|
|
1098
|
-
* </note>
|
|
1099
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1100
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1101
|
-
* <p>
|
|
1102
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
1103
|
-
* <p>
|
|
1104
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DisableKeyRotation</a> (key policy)</p>
|
|
1105
|
-
* <p>
|
|
1106
|
-
* <b>Related operations:</b>
|
|
1107
|
-
* </p>
|
|
1108
|
-
* <ul>
|
|
1109
|
-
* <li>
|
|
1110
|
-
* <p>
|
|
1111
|
-
* <a>EnableKeyRotation</a>
|
|
1112
|
-
* </p>
|
|
1113
|
-
* </li>
|
|
1114
|
-
* <li>
|
|
1115
|
-
* <p>
|
|
1116
|
-
* <a>GetKeyRotationStatus</a>
|
|
1117
|
-
* </p>
|
|
1118
|
-
* </li>
|
|
1119
|
-
* </ul>
|
|
133
|
+
* @see {@link DisableKeyRotationCommand}
|
|
1120
134
|
*/
|
|
1121
135
|
disableKeyRotation(args: DisableKeyRotationCommandInput, options?: __HttpHandlerOptions): Promise<DisableKeyRotationCommandOutput>;
|
|
1122
136
|
disableKeyRotation(args: DisableKeyRotationCommandInput, cb: (err: any, data?: DisableKeyRotationCommandOutput) => void): void;
|
|
1123
137
|
disableKeyRotation(args: DisableKeyRotationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DisableKeyRotationCommandOutput) => void): void;
|
|
1124
138
|
/**
|
|
1125
|
-
* @
|
|
1126
|
-
* <p>Disconnects the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> from its backing key store. This operation disconnects an
|
|
1127
|
-
* CloudHSM key store from its associated CloudHSM cluster or disconnects an external key store from
|
|
1128
|
-
* the external key store proxy that communicates with your external key manager.</p>
|
|
1129
|
-
* <p> This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> feature in KMS, which
|
|
1130
|
-
* combines the convenience and extensive integration of KMS with the isolation and control of a
|
|
1131
|
-
* key store that you own and manage.</p>
|
|
1132
|
-
* <p>While a custom key store is disconnected, you can manage the custom key store and its KMS
|
|
1133
|
-
* keys, but you cannot create or use its KMS keys. You can reconnect the custom key store at any
|
|
1134
|
-
* time.</p>
|
|
1135
|
-
* <note>
|
|
1136
|
-
* <p>While a custom key store is disconnected, all attempts to create KMS keys in the custom key store or to use existing KMS keys in <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a> will
|
|
1137
|
-
* fail. This action can prevent users from storing and accessing sensitive data.</p>
|
|
1138
|
-
* </note>
|
|
1139
|
-
* <p>When you disconnect a custom key store, its <code>ConnectionState</code> changes to
|
|
1140
|
-
* <code>Disconnected</code>. To find the connection state of a custom key store, use the <a>DescribeCustomKeyStores</a> operation. To reconnect a custom key store, use the
|
|
1141
|
-
* <a>ConnectCustomKeyStore</a> operation.</p>
|
|
1142
|
-
* <p>If the operation succeeds, it returns a JSON object with no
|
|
1143
|
-
* properties.</p>
|
|
1144
|
-
* <p>
|
|
1145
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
|
|
1146
|
-
* <p>
|
|
1147
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DisconnectCustomKeyStore</a> (IAM policy)</p>
|
|
1148
|
-
* <p>
|
|
1149
|
-
* <b>Related operations:</b>
|
|
1150
|
-
* </p>
|
|
1151
|
-
* <ul>
|
|
1152
|
-
* <li>
|
|
1153
|
-
* <p>
|
|
1154
|
-
* <a>ConnectCustomKeyStore</a>
|
|
1155
|
-
* </p>
|
|
1156
|
-
* </li>
|
|
1157
|
-
* <li>
|
|
1158
|
-
* <p>
|
|
1159
|
-
* <a>CreateCustomKeyStore</a>
|
|
1160
|
-
* </p>
|
|
1161
|
-
* </li>
|
|
1162
|
-
* <li>
|
|
1163
|
-
* <p>
|
|
1164
|
-
* <a>DeleteCustomKeyStore</a>
|
|
1165
|
-
* </p>
|
|
1166
|
-
* </li>
|
|
1167
|
-
* <li>
|
|
1168
|
-
* <p>
|
|
1169
|
-
* <a>DescribeCustomKeyStores</a>
|
|
1170
|
-
* </p>
|
|
1171
|
-
* </li>
|
|
1172
|
-
* <li>
|
|
1173
|
-
* <p>
|
|
1174
|
-
* <a>UpdateCustomKeyStore</a>
|
|
1175
|
-
* </p>
|
|
1176
|
-
* </li>
|
|
1177
|
-
* </ul>
|
|
139
|
+
* @see {@link DisconnectCustomKeyStoreCommand}
|
|
1178
140
|
*/
|
|
1179
141
|
disconnectCustomKeyStore(args: DisconnectCustomKeyStoreCommandInput, options?: __HttpHandlerOptions): Promise<DisconnectCustomKeyStoreCommandOutput>;
|
|
1180
142
|
disconnectCustomKeyStore(args: DisconnectCustomKeyStoreCommandInput, cb: (err: any, data?: DisconnectCustomKeyStoreCommandOutput) => void): void;
|
|
1181
143
|
disconnectCustomKeyStore(args: DisconnectCustomKeyStoreCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DisconnectCustomKeyStoreCommandOutput) => void): void;
|
|
1182
144
|
/**
|
|
1183
|
-
* @
|
|
1184
|
-
* <p>Sets the key state of a KMS key to enabled. This allows you to use the KMS key for
|
|
1185
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>. </p>
|
|
1186
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1187
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1188
|
-
* <p>
|
|
1189
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
1190
|
-
* <p>
|
|
1191
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:EnableKey</a> (key policy)</p>
|
|
1192
|
-
* <p>
|
|
1193
|
-
* <b>Related operations</b>: <a>DisableKey</a>
|
|
1194
|
-
* </p>
|
|
145
|
+
* @see {@link EnableKeyCommand}
|
|
1195
146
|
*/
|
|
1196
147
|
enableKey(args: EnableKeyCommandInput, options?: __HttpHandlerOptions): Promise<EnableKeyCommandOutput>;
|
|
1197
148
|
enableKey(args: EnableKeyCommandInput, cb: (err: any, data?: EnableKeyCommandOutput) => void): void;
|
|
1198
149
|
enableKey(args: EnableKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: EnableKeyCommandOutput) => void): void;
|
|
1199
150
|
/**
|
|
1200
|
-
* @
|
|
1201
|
-
* <p>Enables <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic rotation
|
|
1202
|
-
* of the key material</a> of the specified symmetric encryption KMS key. </p>
|
|
1203
|
-
* <p>When you enable automatic rotation of a<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed KMS key</a>, KMS
|
|
1204
|
-
* rotates the key material of the KMS key one year (approximately 365 days) from the enable date
|
|
1205
|
-
* and every year thereafter. You can monitor rotation of the key material for your KMS keys in
|
|
1206
|
-
* CloudTrail and Amazon CloudWatch. To disable rotation of the key material in a customer
|
|
1207
|
-
* managed KMS key, use the <a>DisableKeyRotation</a> operation.</p>
|
|
1208
|
-
* <p>Automatic key rotation is supported only on <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks">symmetric encryption KMS keys</a>.
|
|
1209
|
-
* You cannot enable automatic rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">asymmetric KMS keys</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC KMS keys</a>, KMS keys with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key material</a>, or KMS keys in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To enable or disable automatic rotation of a set of related <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate">multi-Region keys</a>, set the property on the primary key. </p>
|
|
1210
|
-
* <p>You cannot enable or disable automatic rotation <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed KMS keys</a>. KMS
|
|
1211
|
-
* always rotates the key material of Amazon Web Services managed keys every year. Rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned KMS
|
|
1212
|
-
* keys</a> varies.</p>
|
|
1213
|
-
* <note>
|
|
1214
|
-
* <p>In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three
|
|
1215
|
-
* years (approximately 1,095 days) to every year (approximately 365 days).</p>
|
|
1216
|
-
* <p>New Amazon Web Services managed keys are automatically rotated one year after they are created, and
|
|
1217
|
-
* approximately every year thereafter. </p>
|
|
1218
|
-
* <p>Existing Amazon Web Services managed keys are automatically rotated one year after their most recent
|
|
1219
|
-
* rotation, and every year thereafter.</p>
|
|
1220
|
-
* </note>
|
|
1221
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1222
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1223
|
-
* <p>
|
|
1224
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
1225
|
-
* <p>
|
|
1226
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:EnableKeyRotation</a> (key policy)</p>
|
|
1227
|
-
* <p>
|
|
1228
|
-
* <b>Related operations:</b>
|
|
1229
|
-
* </p>
|
|
1230
|
-
* <ul>
|
|
1231
|
-
* <li>
|
|
1232
|
-
* <p>
|
|
1233
|
-
* <a>DisableKeyRotation</a>
|
|
1234
|
-
* </p>
|
|
1235
|
-
* </li>
|
|
1236
|
-
* <li>
|
|
1237
|
-
* <p>
|
|
1238
|
-
* <a>GetKeyRotationStatus</a>
|
|
1239
|
-
* </p>
|
|
1240
|
-
* </li>
|
|
1241
|
-
* </ul>
|
|
151
|
+
* @see {@link EnableKeyRotationCommand}
|
|
1242
152
|
*/
|
|
1243
153
|
enableKeyRotation(args: EnableKeyRotationCommandInput, options?: __HttpHandlerOptions): Promise<EnableKeyRotationCommandOutput>;
|
|
1244
154
|
enableKeyRotation(args: EnableKeyRotationCommandInput, cb: (err: any, data?: EnableKeyRotationCommandOutput) => void): void;
|
|
1245
155
|
enableKeyRotation(args: EnableKeyRotationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: EnableKeyRotationCommandOutput) => void): void;
|
|
1246
156
|
/**
|
|
1247
|
-
* @
|
|
1248
|
-
* <p>Encrypts plaintext of up to 4,096 bytes using a KMS key. You can use a symmetric or
|
|
1249
|
-
* asymmetric KMS key with a <code>KeyUsage</code> of <code>ENCRYPT_DECRYPT</code>.</p>
|
|
1250
|
-
* <p>You can use this operation to encrypt small amounts of arbitrary data, such as a personal
|
|
1251
|
-
* identifier or database password, or other sensitive information. You don't need to use the
|
|
1252
|
-
* <code>Encrypt</code> operation to encrypt a data key. The <a>GenerateDataKey</a>
|
|
1253
|
-
* and <a>GenerateDataKeyPair</a> operations return a plaintext data key and an
|
|
1254
|
-
* encrypted copy of that data key.</p>
|
|
1255
|
-
* <p>If you use a symmetric encryption KMS key, you can use an encryption context to add
|
|
1256
|
-
* additional security to your encryption operation. If you specify an
|
|
1257
|
-
* <code>EncryptionContext</code> when encrypting data, you must specify the same encryption
|
|
1258
|
-
* context (a case-sensitive exact match) when decrypting the data. Otherwise, the request to
|
|
1259
|
-
* decrypt fails with an <code>InvalidCiphertextException</code>. For more information, see
|
|
1260
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
|
|
1261
|
-
* Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1262
|
-
* <p>If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The
|
|
1263
|
-
* algorithm must be compatible with the KMS key spec.</p>
|
|
1264
|
-
* <important>
|
|
1265
|
-
* <p>When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.</p>
|
|
1266
|
-
* <p>You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.</p>
|
|
1267
|
-
* </important>
|
|
1268
|
-
* <p>The maximum size of the data that you can encrypt varies with the type of KMS key and the
|
|
1269
|
-
* encryption algorithm that you choose.</p>
|
|
1270
|
-
* <ul>
|
|
1271
|
-
* <li>
|
|
1272
|
-
* <p>Symmetric encryption KMS keys</p>
|
|
1273
|
-
* <ul>
|
|
1274
|
-
* <li>
|
|
1275
|
-
* <p>
|
|
1276
|
-
* <code>SYMMETRIC_DEFAULT</code>: 4096 bytes</p>
|
|
1277
|
-
* </li>
|
|
1278
|
-
* </ul>
|
|
1279
|
-
* </li>
|
|
1280
|
-
* <li>
|
|
1281
|
-
* <p>
|
|
1282
|
-
* <code>RSA_2048</code>
|
|
1283
|
-
* </p>
|
|
1284
|
-
* <ul>
|
|
1285
|
-
* <li>
|
|
1286
|
-
* <p>
|
|
1287
|
-
* <code>RSAES_OAEP_SHA_1</code>: 214 bytes</p>
|
|
1288
|
-
* </li>
|
|
1289
|
-
* <li>
|
|
1290
|
-
* <p>
|
|
1291
|
-
* <code>RSAES_OAEP_SHA_256</code>: 190 bytes</p>
|
|
1292
|
-
* </li>
|
|
1293
|
-
* </ul>
|
|
1294
|
-
* </li>
|
|
1295
|
-
* <li>
|
|
1296
|
-
* <p>
|
|
1297
|
-
* <code>RSA_3072</code>
|
|
1298
|
-
* </p>
|
|
1299
|
-
* <ul>
|
|
1300
|
-
* <li>
|
|
1301
|
-
* <p>
|
|
1302
|
-
* <code>RSAES_OAEP_SHA_1</code>: 342 bytes</p>
|
|
1303
|
-
* </li>
|
|
1304
|
-
* <li>
|
|
1305
|
-
* <p>
|
|
1306
|
-
* <code>RSAES_OAEP_SHA_256</code>: 318 bytes</p>
|
|
1307
|
-
* </li>
|
|
1308
|
-
* </ul>
|
|
1309
|
-
* </li>
|
|
1310
|
-
* <li>
|
|
1311
|
-
* <p>
|
|
1312
|
-
* <code>RSA_4096</code>
|
|
1313
|
-
* </p>
|
|
1314
|
-
* <ul>
|
|
1315
|
-
* <li>
|
|
1316
|
-
* <p>
|
|
1317
|
-
* <code>RSAES_OAEP_SHA_1</code>: 470 bytes</p>
|
|
1318
|
-
* </li>
|
|
1319
|
-
* <li>
|
|
1320
|
-
* <p>
|
|
1321
|
-
* <code>RSAES_OAEP_SHA_256</code>: 446 bytes</p>
|
|
1322
|
-
* </li>
|
|
1323
|
-
* </ul>
|
|
1324
|
-
* </li>
|
|
1325
|
-
* <li>
|
|
1326
|
-
* <p>
|
|
1327
|
-
* <code>SM2PKE</code>: 1024 bytes (China Regions only)</p>
|
|
1328
|
-
* </li>
|
|
1329
|
-
* </ul>
|
|
1330
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1331
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1332
|
-
* <p>
|
|
1333
|
-
* <b>Cross-account use</b>: Yes.
|
|
1334
|
-
* To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
1335
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
1336
|
-
* <p>
|
|
1337
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Encrypt</a> (key policy)</p>
|
|
1338
|
-
* <p>
|
|
1339
|
-
* <b>Related operations:</b>
|
|
1340
|
-
* </p>
|
|
1341
|
-
* <ul>
|
|
1342
|
-
* <li>
|
|
1343
|
-
* <p>
|
|
1344
|
-
* <a>Decrypt</a>
|
|
1345
|
-
* </p>
|
|
1346
|
-
* </li>
|
|
1347
|
-
* <li>
|
|
1348
|
-
* <p>
|
|
1349
|
-
* <a>GenerateDataKey</a>
|
|
1350
|
-
* </p>
|
|
1351
|
-
* </li>
|
|
1352
|
-
* <li>
|
|
1353
|
-
* <p>
|
|
1354
|
-
* <a>GenerateDataKeyPair</a>
|
|
1355
|
-
* </p>
|
|
1356
|
-
* </li>
|
|
1357
|
-
* </ul>
|
|
157
|
+
* @see {@link EncryptCommand}
|
|
1358
158
|
*/
|
|
1359
159
|
encrypt(args: EncryptCommandInput, options?: __HttpHandlerOptions): Promise<EncryptCommandOutput>;
|
|
1360
160
|
encrypt(args: EncryptCommandInput, cb: (err: any, data?: EncryptCommandOutput) => void): void;
|
|
1361
161
|
encrypt(args: EncryptCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: EncryptCommandOutput) => void): void;
|
|
1362
162
|
/**
|
|
1363
|
-
* @
|
|
1364
|
-
* <p>Returns a unique symmetric data key for use outside of KMS. This operation returns a
|
|
1365
|
-
* plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS
|
|
1366
|
-
* key that you specify. The bytes in the plaintext key are random; they are not related
|
|
1367
|
-
* to the caller or the KMS key. You can use the plaintext key to encrypt your data outside of KMS
|
|
1368
|
-
* and store the encrypted data key with the encrypted data.</p>
|
|
1369
|
-
* <p>To generate a data key, specify the symmetric encryption KMS key that will be used to
|
|
1370
|
-
* encrypt the data key. You cannot use an asymmetric KMS key to encrypt data keys. To get the
|
|
1371
|
-
* type of your KMS key, use the <a>DescribeKey</a> operation.</p>
|
|
1372
|
-
* <p>You must also specify the length of the data key. Use either the <code>KeySpec</code> or
|
|
1373
|
-
* <code>NumberOfBytes</code> parameters (but not both). For 128-bit and 256-bit data keys, use
|
|
1374
|
-
* the <code>KeySpec</code> parameter.</p>
|
|
1375
|
-
* <p>To generate a 128-bit SM4 data key (China Regions only), specify a <code>KeySpec</code> value of
|
|
1376
|
-
* <code>AES_128</code> or a <code>NumberOfBytes</code> value of <code>16</code>. The symmetric
|
|
1377
|
-
* encryption key used in China Regions to encrypt your data key is an SM4 encryption key.</p>
|
|
1378
|
-
* <p>To get only an encrypted copy of the data key, use <a>GenerateDataKeyWithoutPlaintext</a>. To generate an asymmetric data key pair, use
|
|
1379
|
-
* the <a>GenerateDataKeyPair</a> or <a>GenerateDataKeyPairWithoutPlaintext</a> operation. To get a cryptographically secure
|
|
1380
|
-
* random byte string, use <a>GenerateRandom</a>.</p>
|
|
1381
|
-
* <p>You can use an optional encryption context to add additional security to the encryption
|
|
1382
|
-
* operation. If you specify an <code>EncryptionContext</code>, you must specify the same
|
|
1383
|
-
* encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
|
|
1384
|
-
* Otherwise, the request to decrypt fails with an <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption Context</a> in the
|
|
1385
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
1386
|
-
* <p>Applications in Amazon Web Services Nitro Enclaves can call this operation by using the <a href="https://github.com/aws/aws-nitro-enclaves-sdk-c">Amazon Web Services Nitro Enclaves Development Kit</a>. For information about the supporting parameters, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html">How Amazon Web Services Nitro Enclaves use KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1387
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1388
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1389
|
-
* <p>
|
|
1390
|
-
* <b>How to use your data key</b>
|
|
1391
|
-
* </p>
|
|
1392
|
-
* <p>We recommend that you use the following pattern to encrypt data locally in your
|
|
1393
|
-
* application. You can write your own code or use a client-side encryption library, such as the
|
|
1394
|
-
* <a href="https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/">Amazon Web Services Encryption SDK</a>, the
|
|
1395
|
-
* <a href="https://docs.aws.amazon.com/dynamodb-encryption-client/latest/devguide/">Amazon DynamoDB Encryption Client</a>,
|
|
1396
|
-
* or <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3
|
|
1397
|
-
* client-side encryption</a> to do these tasks for you.</p>
|
|
1398
|
-
* <p>To encrypt data outside of KMS:</p>
|
|
1399
|
-
* <ol>
|
|
1400
|
-
* <li>
|
|
1401
|
-
* <p>Use the <code>GenerateDataKey</code> operation to get a data key.</p>
|
|
1402
|
-
* </li>
|
|
1403
|
-
* <li>
|
|
1404
|
-
* <p>Use the plaintext data key (in the <code>Plaintext</code> field of the response) to
|
|
1405
|
-
* encrypt your data outside of KMS. Then erase the plaintext data key from memory.</p>
|
|
1406
|
-
* </li>
|
|
1407
|
-
* <li>
|
|
1408
|
-
* <p>Store the encrypted data key (in the <code>CiphertextBlob</code> field of the
|
|
1409
|
-
* response) with the encrypted data.</p>
|
|
1410
|
-
* </li>
|
|
1411
|
-
* </ol>
|
|
1412
|
-
* <p>To decrypt data outside of KMS:</p>
|
|
1413
|
-
* <ol>
|
|
1414
|
-
* <li>
|
|
1415
|
-
* <p>Use the <a>Decrypt</a> operation to decrypt the encrypted data key. The
|
|
1416
|
-
* operation returns a plaintext copy of the data key.</p>
|
|
1417
|
-
* </li>
|
|
1418
|
-
* <li>
|
|
1419
|
-
* <p>Use the plaintext data key to decrypt data outside of KMS, then erase the plaintext
|
|
1420
|
-
* data key from memory.</p>
|
|
1421
|
-
* </li>
|
|
1422
|
-
* </ol>
|
|
1423
|
-
* <p>
|
|
1424
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
1425
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
1426
|
-
* <p>
|
|
1427
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateDataKey</a> (key policy)</p>
|
|
1428
|
-
* <p>
|
|
1429
|
-
* <b>Related operations:</b>
|
|
1430
|
-
* </p>
|
|
1431
|
-
* <ul>
|
|
1432
|
-
* <li>
|
|
1433
|
-
* <p>
|
|
1434
|
-
* <a>Decrypt</a>
|
|
1435
|
-
* </p>
|
|
1436
|
-
* </li>
|
|
1437
|
-
* <li>
|
|
1438
|
-
* <p>
|
|
1439
|
-
* <a>Encrypt</a>
|
|
1440
|
-
* </p>
|
|
1441
|
-
* </li>
|
|
1442
|
-
* <li>
|
|
1443
|
-
* <p>
|
|
1444
|
-
* <a>GenerateDataKeyPair</a>
|
|
1445
|
-
* </p>
|
|
1446
|
-
* </li>
|
|
1447
|
-
* <li>
|
|
1448
|
-
* <p>
|
|
1449
|
-
* <a>GenerateDataKeyPairWithoutPlaintext</a>
|
|
1450
|
-
* </p>
|
|
1451
|
-
* </li>
|
|
1452
|
-
* <li>
|
|
1453
|
-
* <p>
|
|
1454
|
-
* <a>GenerateDataKeyWithoutPlaintext</a>
|
|
1455
|
-
* </p>
|
|
1456
|
-
* </li>
|
|
1457
|
-
* </ul>
|
|
163
|
+
* @see {@link GenerateDataKeyCommand}
|
|
1458
164
|
*/
|
|
1459
165
|
generateDataKey(args: GenerateDataKeyCommandInput, options?: __HttpHandlerOptions): Promise<GenerateDataKeyCommandOutput>;
|
|
1460
166
|
generateDataKey(args: GenerateDataKeyCommandInput, cb: (err: any, data?: GenerateDataKeyCommandOutput) => void): void;
|
|
1461
167
|
generateDataKey(args: GenerateDataKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateDataKeyCommandOutput) => void): void;
|
|
1462
168
|
/**
|
|
1463
|
-
* @
|
|
1464
|
-
* <p>Returns a unique asymmetric data key pair for use outside of KMS. This operation returns
|
|
1465
|
-
* a plaintext public key, a plaintext private key, and a copy of the private key that is
|
|
1466
|
-
* encrypted under the symmetric encryption KMS key you specify. You can use the data key pair to
|
|
1467
|
-
* perform asymmetric cryptography and implement digital signatures outside of KMS. The bytes
|
|
1468
|
-
* in the keys are random; they not related to the caller or to the KMS key that is used to
|
|
1469
|
-
* encrypt the private key. </p>
|
|
1470
|
-
* <p>You can use the public key that <code>GenerateDataKeyPair</code> returns to encrypt data
|
|
1471
|
-
* or verify a signature outside of KMS. Then, store the encrypted private key with the data.
|
|
1472
|
-
* When you are ready to decrypt data or sign a message, you can use the <a>Decrypt</a> operation to decrypt the encrypted private key.</p>
|
|
1473
|
-
* <p>To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt
|
|
1474
|
-
* the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a
|
|
1475
|
-
* custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a> operation. </p>
|
|
1476
|
-
* <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
|
|
1477
|
-
* key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that you use
|
|
1478
|
-
* ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or signing, but not both.
|
|
1479
|
-
* However, KMS cannot enforce any restrictions on the use of data key pairs outside of KMS.</p>
|
|
1480
|
-
* <p>If you are using the data key pair to encrypt data, or for any operation where you don't
|
|
1481
|
-
* immediately need a private key, consider using the <a>GenerateDataKeyPairWithoutPlaintext</a> operation.
|
|
1482
|
-
* <code>GenerateDataKeyPairWithoutPlaintext</code> returns a plaintext public key and an
|
|
1483
|
-
* encrypted private key, but omits the plaintext private key that you need only to decrypt
|
|
1484
|
-
* ciphertext or sign a message. Later, when you need to decrypt the data or sign a message, use
|
|
1485
|
-
* the <a>Decrypt</a> operation to decrypt the encrypted private key in the data key
|
|
1486
|
-
* pair.</p>
|
|
1487
|
-
* <p>
|
|
1488
|
-
* <code>GenerateDataKeyPair</code> returns a unique data key pair for each request. The
|
|
1489
|
-
* bytes in the keys are random; they are not related to the caller or the KMS key that is used
|
|
1490
|
-
* to encrypt the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as
|
|
1491
|
-
* specified in <a href="https://tools.ietf.org/html/rfc5280">RFC 5280</a>. The private
|
|
1492
|
-
* key is a DER-encoded PKCS8 PrivateKeyInfo, as specified in <a href="https://tools.ietf.org/html/rfc5958">RFC 5958</a>.</p>
|
|
1493
|
-
* <p>You can use an optional encryption context to add additional security to the encryption
|
|
1494
|
-
* operation. If you specify an <code>EncryptionContext</code>, you must specify the same
|
|
1495
|
-
* encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
|
|
1496
|
-
* Otherwise, the request to decrypt fails with an <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption Context</a> in the
|
|
1497
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
1498
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1499
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1500
|
-
* <p>
|
|
1501
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
1502
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
1503
|
-
* <p>
|
|
1504
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateDataKeyPair</a> (key policy)</p>
|
|
1505
|
-
* <p>
|
|
1506
|
-
* <b>Related operations:</b>
|
|
1507
|
-
* </p>
|
|
1508
|
-
* <ul>
|
|
1509
|
-
* <li>
|
|
1510
|
-
* <p>
|
|
1511
|
-
* <a>Decrypt</a>
|
|
1512
|
-
* </p>
|
|
1513
|
-
* </li>
|
|
1514
|
-
* <li>
|
|
1515
|
-
* <p>
|
|
1516
|
-
* <a>Encrypt</a>
|
|
1517
|
-
* </p>
|
|
1518
|
-
* </li>
|
|
1519
|
-
* <li>
|
|
1520
|
-
* <p>
|
|
1521
|
-
* <a>GenerateDataKey</a>
|
|
1522
|
-
* </p>
|
|
1523
|
-
* </li>
|
|
1524
|
-
* <li>
|
|
1525
|
-
* <p>
|
|
1526
|
-
* <a>GenerateDataKeyPairWithoutPlaintext</a>
|
|
1527
|
-
* </p>
|
|
1528
|
-
* </li>
|
|
1529
|
-
* <li>
|
|
1530
|
-
* <p>
|
|
1531
|
-
* <a>GenerateDataKeyWithoutPlaintext</a>
|
|
1532
|
-
* </p>
|
|
1533
|
-
* </li>
|
|
1534
|
-
* </ul>
|
|
169
|
+
* @see {@link GenerateDataKeyPairCommand}
|
|
1535
170
|
*/
|
|
1536
171
|
generateDataKeyPair(args: GenerateDataKeyPairCommandInput, options?: __HttpHandlerOptions): Promise<GenerateDataKeyPairCommandOutput>;
|
|
1537
172
|
generateDataKeyPair(args: GenerateDataKeyPairCommandInput, cb: (err: any, data?: GenerateDataKeyPairCommandOutput) => void): void;
|
|
1538
173
|
generateDataKeyPair(args: GenerateDataKeyPairCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateDataKeyPairCommandOutput) => void): void;
|
|
1539
174
|
/**
|
|
1540
|
-
* @
|
|
1541
|
-
* <p>Returns a unique asymmetric data key pair for use outside of KMS. This operation returns
|
|
1542
|
-
* a plaintext public key and a copy of the private key that is encrypted under the symmetric
|
|
1543
|
-
* encryption KMS key you specify. Unlike <a>GenerateDataKeyPair</a>, this operation
|
|
1544
|
-
* does not return a plaintext private key. The bytes in the keys are random; they are not
|
|
1545
|
-
* related to the caller or to the KMS key that is used to encrypt the private key. </p>
|
|
1546
|
-
* <p>You can use the public key that <code>GenerateDataKeyPairWithoutPlaintext</code> returns
|
|
1547
|
-
* to encrypt data or verify a signature outside of KMS. Then, store the encrypted private key
|
|
1548
|
-
* with the data. When you are ready to decrypt data or sign a message, you can use the <a>Decrypt</a> operation to decrypt the encrypted private key.</p>
|
|
1549
|
-
* <p>To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt
|
|
1550
|
-
* the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a
|
|
1551
|
-
* custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a> operation. </p>
|
|
1552
|
-
* <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
|
|
1553
|
-
* key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that you
|
|
1554
|
-
* use ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or signing, but not
|
|
1555
|
-
* both. However, KMS cannot enforce any restrictions on the use of data key pairs outside of KMS.</p>
|
|
1556
|
-
* <p>
|
|
1557
|
-
* <code>GenerateDataKeyPairWithoutPlaintext</code> returns a unique data key pair for each
|
|
1558
|
-
* request. The bytes in the key are not related to the caller or KMS key that is used to encrypt
|
|
1559
|
-
* the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in
|
|
1560
|
-
* <a href="https://tools.ietf.org/html/rfc5280">RFC 5280</a>.</p>
|
|
1561
|
-
* <p>You can use an optional encryption context to add additional security to the encryption
|
|
1562
|
-
* operation. If you specify an <code>EncryptionContext</code>, you must specify the same
|
|
1563
|
-
* encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
|
|
1564
|
-
* Otherwise, the request to decrypt fails with an <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption Context</a> in the
|
|
1565
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
1566
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1567
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1568
|
-
* <p>
|
|
1569
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
1570
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
1571
|
-
* <p>
|
|
1572
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateDataKeyPairWithoutPlaintext</a> (key
|
|
1573
|
-
* policy)</p>
|
|
1574
|
-
* <p>
|
|
1575
|
-
* <b>Related operations:</b>
|
|
1576
|
-
* </p>
|
|
1577
|
-
* <ul>
|
|
1578
|
-
* <li>
|
|
1579
|
-
* <p>
|
|
1580
|
-
* <a>Decrypt</a>
|
|
1581
|
-
* </p>
|
|
1582
|
-
* </li>
|
|
1583
|
-
* <li>
|
|
1584
|
-
* <p>
|
|
1585
|
-
* <a>Encrypt</a>
|
|
1586
|
-
* </p>
|
|
1587
|
-
* </li>
|
|
1588
|
-
* <li>
|
|
1589
|
-
* <p>
|
|
1590
|
-
* <a>GenerateDataKey</a>
|
|
1591
|
-
* </p>
|
|
1592
|
-
* </li>
|
|
1593
|
-
* <li>
|
|
1594
|
-
* <p>
|
|
1595
|
-
* <a>GenerateDataKeyPair</a>
|
|
1596
|
-
* </p>
|
|
1597
|
-
* </li>
|
|
1598
|
-
* <li>
|
|
1599
|
-
* <p>
|
|
1600
|
-
* <a>GenerateDataKeyWithoutPlaintext</a>
|
|
1601
|
-
* </p>
|
|
1602
|
-
* </li>
|
|
1603
|
-
* </ul>
|
|
175
|
+
* @see {@link GenerateDataKeyPairWithoutPlaintextCommand}
|
|
1604
176
|
*/
|
|
1605
177
|
generateDataKeyPairWithoutPlaintext(args: GenerateDataKeyPairWithoutPlaintextCommandInput, options?: __HttpHandlerOptions): Promise<GenerateDataKeyPairWithoutPlaintextCommandOutput>;
|
|
1606
178
|
generateDataKeyPairWithoutPlaintext(args: GenerateDataKeyPairWithoutPlaintextCommandInput, cb: (err: any, data?: GenerateDataKeyPairWithoutPlaintextCommandOutput) => void): void;
|
|
1607
179
|
generateDataKeyPairWithoutPlaintext(args: GenerateDataKeyPairWithoutPlaintextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateDataKeyPairWithoutPlaintextCommandOutput) => void): void;
|
|
1608
180
|
/**
|
|
1609
|
-
* @
|
|
1610
|
-
* <p>Returns a unique symmetric data key for use outside of KMS. This operation returns a
|
|
1611
|
-
* data key that is encrypted under a symmetric encryption KMS key that you specify. The bytes in
|
|
1612
|
-
* the key are random; they are not related to the caller or to the KMS key.</p>
|
|
1613
|
-
* <p>
|
|
1614
|
-
* <code>GenerateDataKeyWithoutPlaintext</code> is identical to the <a>GenerateDataKey</a> operation except that it does not return a plaintext copy of the
|
|
1615
|
-
* data key. </p>
|
|
1616
|
-
* <p>This operation is useful for systems that need to encrypt data at some point, but not
|
|
1617
|
-
* immediately. When you need to encrypt the data, you call the <a>Decrypt</a>
|
|
1618
|
-
* operation on the encrypted copy of the key.</p>
|
|
1619
|
-
* <p>It's also useful in distributed systems with different levels of trust. For example, you
|
|
1620
|
-
* might store encrypted data in containers. One component of your system creates new containers
|
|
1621
|
-
* and stores an encrypted data key with each container. Then, a different component puts the
|
|
1622
|
-
* data into the containers. That component first decrypts the data key, uses the plaintext data
|
|
1623
|
-
* key to encrypt data, puts the encrypted data into the container, and then destroys the
|
|
1624
|
-
* plaintext data key. In this system, the component that creates the containers never sees the
|
|
1625
|
-
* plaintext data key.</p>
|
|
1626
|
-
* <p>To request an asymmetric data key pair, use the <a>GenerateDataKeyPair</a> or
|
|
1627
|
-
* <a>GenerateDataKeyPairWithoutPlaintext</a> operations.</p>
|
|
1628
|
-
* <p>To generate a data key, you must specify the symmetric encryption KMS key that is used to
|
|
1629
|
-
* encrypt the data key. You cannot use an asymmetric KMS key or a key in a custom key store to generate a data key. To get the
|
|
1630
|
-
* type of your KMS key, use the <a>DescribeKey</a> operation.</p>
|
|
1631
|
-
* <p>You must also specify the length of the data key. Use either the <code>KeySpec</code> or
|
|
1632
|
-
* <code>NumberOfBytes</code> parameters (but not both). For 128-bit and 256-bit data keys, use
|
|
1633
|
-
* the <code>KeySpec</code> parameter.</p>
|
|
1634
|
-
* <p>To generate an SM4 data key (China Regions only), specify a <code>KeySpec</code> value of
|
|
1635
|
-
* <code>AES_128</code> or <code>NumberOfBytes</code> value of <code>128</code>. The symmetric
|
|
1636
|
-
* encryption key used in China Regions to encrypt your data key is an SM4 encryption key.</p>
|
|
1637
|
-
* <p>If the operation succeeds, you will find the encrypted copy of the data key in the
|
|
1638
|
-
* <code>CiphertextBlob</code> field.</p>
|
|
1639
|
-
* <p>You can use an optional encryption context to add additional security to the encryption
|
|
1640
|
-
* operation. If you specify an <code>EncryptionContext</code>, you must specify the same
|
|
1641
|
-
* encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
|
|
1642
|
-
* Otherwise, the request to decrypt fails with an <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption Context</a> in the
|
|
1643
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
1644
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1645
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1646
|
-
* <p>
|
|
1647
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
1648
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
1649
|
-
* <p>
|
|
1650
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateDataKeyWithoutPlaintext</a> (key
|
|
1651
|
-
* policy)</p>
|
|
1652
|
-
* <p>
|
|
1653
|
-
* <b>Related operations:</b>
|
|
1654
|
-
* </p>
|
|
1655
|
-
* <ul>
|
|
1656
|
-
* <li>
|
|
1657
|
-
* <p>
|
|
1658
|
-
* <a>Decrypt</a>
|
|
1659
|
-
* </p>
|
|
1660
|
-
* </li>
|
|
1661
|
-
* <li>
|
|
1662
|
-
* <p>
|
|
1663
|
-
* <a>Encrypt</a>
|
|
1664
|
-
* </p>
|
|
1665
|
-
* </li>
|
|
1666
|
-
* <li>
|
|
1667
|
-
* <p>
|
|
1668
|
-
* <a>GenerateDataKey</a>
|
|
1669
|
-
* </p>
|
|
1670
|
-
* </li>
|
|
1671
|
-
* <li>
|
|
1672
|
-
* <p>
|
|
1673
|
-
* <a>GenerateDataKeyPair</a>
|
|
1674
|
-
* </p>
|
|
1675
|
-
* </li>
|
|
1676
|
-
* <li>
|
|
1677
|
-
* <p>
|
|
1678
|
-
* <a>GenerateDataKeyPairWithoutPlaintext</a>
|
|
1679
|
-
* </p>
|
|
1680
|
-
* </li>
|
|
1681
|
-
* </ul>
|
|
181
|
+
* @see {@link GenerateDataKeyWithoutPlaintextCommand}
|
|
1682
182
|
*/
|
|
1683
183
|
generateDataKeyWithoutPlaintext(args: GenerateDataKeyWithoutPlaintextCommandInput, options?: __HttpHandlerOptions): Promise<GenerateDataKeyWithoutPlaintextCommandOutput>;
|
|
1684
184
|
generateDataKeyWithoutPlaintext(args: GenerateDataKeyWithoutPlaintextCommandInput, cb: (err: any, data?: GenerateDataKeyWithoutPlaintextCommandOutput) => void): void;
|
|
1685
185
|
generateDataKeyWithoutPlaintext(args: GenerateDataKeyWithoutPlaintextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateDataKeyWithoutPlaintextCommandOutput) => void): void;
|
|
1686
186
|
/**
|
|
1687
|
-
* @
|
|
1688
|
-
* <p>Generates a hash-based message authentication code (HMAC) for a message using an HMAC KMS key and a MAC algorithm that the key supports.
|
|
1689
|
-
* HMAC KMS keys and the HMAC algorithms that KMS uses conform to industry standards defined in <a href="https://datatracker.ietf.org/doc/html/rfc2104">RFC 2104</a>.</p>
|
|
1690
|
-
* <p>You can use value that GenerateMac returns in the <a>VerifyMac</a> operation to
|
|
1691
|
-
* demonstrate that the original message has not changed. Also, because a secret key is used to
|
|
1692
|
-
* create the hash, you can verify that the party that generated the hash has the required secret
|
|
1693
|
-
* key. You can also use the raw result to implement HMAC-based algorithms such as key derivation
|
|
1694
|
-
* functions. This operation is part of KMS support for HMAC KMS keys. For
|
|
1695
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC keys in
|
|
1696
|
-
* KMS</a> in the <i>
|
|
1697
|
-
* <i>Key Management Service Developer Guide</i>
|
|
1698
|
-
* </i>.</p>
|
|
1699
|
-
* <note>
|
|
1700
|
-
* <p>Best practices recommend that you limit the time during which any signing mechanism,
|
|
1701
|
-
* including an HMAC, is effective. This deters an attack where the actor uses a signed message
|
|
1702
|
-
* to establish validity repeatedly or long after the message is superseded. HMAC tags do not
|
|
1703
|
-
* include a timestamp, but you can include a timestamp in the token or message to help you
|
|
1704
|
-
* detect when its time to refresh the HMAC. </p>
|
|
1705
|
-
* </note>
|
|
1706
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1707
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1708
|
-
* <p>
|
|
1709
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
1710
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter. </p>
|
|
1711
|
-
* <p>
|
|
1712
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateMac</a> (key policy)</p>
|
|
1713
|
-
* <p>
|
|
1714
|
-
* <b>Related operations</b>: <a>VerifyMac</a>
|
|
1715
|
-
* </p>
|
|
187
|
+
* @see {@link GenerateMacCommand}
|
|
1716
188
|
*/
|
|
1717
189
|
generateMac(args: GenerateMacCommandInput, options?: __HttpHandlerOptions): Promise<GenerateMacCommandOutput>;
|
|
1718
190
|
generateMac(args: GenerateMacCommandInput, cb: (err: any, data?: GenerateMacCommandOutput) => void): void;
|
|
1719
191
|
generateMac(args: GenerateMacCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateMacCommandOutput) => void): void;
|
|
1720
192
|
/**
|
|
1721
|
-
* @
|
|
1722
|
-
* <p>Returns a random byte string that is cryptographically secure.</p>
|
|
1723
|
-
* <p>You must use the <code>NumberOfBytes</code> parameter to specify the length of the random
|
|
1724
|
-
* byte string. There is no default value for string length.</p>
|
|
1725
|
-
* <p>By default, the random byte string is generated in KMS. To generate the byte string in
|
|
1726
|
-
* the CloudHSM cluster associated with an CloudHSM key store, use the <code>CustomKeyStoreId</code>
|
|
1727
|
-
* parameter.</p>
|
|
1728
|
-
* <p>Applications in Amazon Web Services Nitro Enclaves can call this operation by using the <a href="https://github.com/aws/aws-nitro-enclaves-sdk-c">Amazon Web Services Nitro Enclaves Development Kit</a>. For information about the supporting parameters, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html">How Amazon Web Services Nitro Enclaves use KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1729
|
-
* <p>For more information about entropy and random number generation, see
|
|
1730
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/cryptographic-details/">Key Management Service Cryptographic Details</a>.</p>
|
|
1731
|
-
* <p>
|
|
1732
|
-
* <b>Cross-account use</b>: Not applicable.
|
|
1733
|
-
* <code>GenerateRandom</code> does not use any account-specific resources, such as KMS
|
|
1734
|
-
* keys.</p>
|
|
1735
|
-
* <p>
|
|
1736
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateRandom</a> (IAM policy)</p>
|
|
193
|
+
* @see {@link GenerateRandomCommand}
|
|
1737
194
|
*/
|
|
1738
195
|
generateRandom(args: GenerateRandomCommandInput, options?: __HttpHandlerOptions): Promise<GenerateRandomCommandOutput>;
|
|
1739
196
|
generateRandom(args: GenerateRandomCommandInput, cb: (err: any, data?: GenerateRandomCommandOutput) => void): void;
|
|
1740
197
|
generateRandom(args: GenerateRandomCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateRandomCommandOutput) => void): void;
|
|
1741
198
|
/**
|
|
1742
|
-
* @
|
|
1743
|
-
* <p>Gets a key policy attached to the specified KMS key.</p>
|
|
1744
|
-
* <p>
|
|
1745
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
1746
|
-
* <p>
|
|
1747
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetKeyPolicy</a> (key policy)</p>
|
|
1748
|
-
* <p>
|
|
1749
|
-
* <b>Related operations</b>: <a>PutKeyPolicy</a>
|
|
1750
|
-
* </p>
|
|
199
|
+
* @see {@link GetKeyPolicyCommand}
|
|
1751
200
|
*/
|
|
1752
201
|
getKeyPolicy(args: GetKeyPolicyCommandInput, options?: __HttpHandlerOptions): Promise<GetKeyPolicyCommandOutput>;
|
|
1753
202
|
getKeyPolicy(args: GetKeyPolicyCommandInput, cb: (err: any, data?: GetKeyPolicyCommandOutput) => void): void;
|
|
1754
203
|
getKeyPolicy(args: GetKeyPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetKeyPolicyCommandOutput) => void): void;
|
|
1755
204
|
/**
|
|
1756
|
-
* @
|
|
1757
|
-
* <p>Gets a Boolean value that indicates whether <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic rotation of the key material</a> is
|
|
1758
|
-
* enabled for the specified KMS key.</p>
|
|
1759
|
-
* <p>When you enable automatic rotation for <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed KMS keys</a>, KMS
|
|
1760
|
-
* rotates the key material of the KMS key one year (approximately 365 days) from the enable date
|
|
1761
|
-
* and every year thereafter. You can monitor rotation of the key material for your KMS keys in
|
|
1762
|
-
* CloudTrail and Amazon CloudWatch.</p>
|
|
1763
|
-
* <p>Automatic key rotation is supported only on <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks">symmetric encryption KMS keys</a>.
|
|
1764
|
-
* You cannot enable automatic rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">asymmetric KMS keys</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC KMS keys</a>, KMS keys with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key material</a>, or KMS keys in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To enable or disable automatic rotation of a set of related <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate">multi-Region keys</a>, set the property on the primary key..</p>
|
|
1765
|
-
* <p>You can enable (<a>EnableKeyRotation</a>) and disable automatic rotation (<a>DisableKeyRotation</a>) of the key material in customer managed KMS keys. Key
|
|
1766
|
-
* material rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed KMS keys</a> is not
|
|
1767
|
-
* configurable. KMS always rotates the key material in Amazon Web Services managed KMS keys every year. The
|
|
1768
|
-
* key rotation status for Amazon Web Services managed KMS keys is always <code>true</code>.</p>
|
|
1769
|
-
* <note>
|
|
1770
|
-
* <p>In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three
|
|
1771
|
-
* years to every year. For details, see <a>EnableKeyRotation</a>.</p>
|
|
1772
|
-
* </note>
|
|
1773
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1774
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1775
|
-
* <ul>
|
|
1776
|
-
* <li>
|
|
1777
|
-
* <p>Disabled: The key rotation status does not change when you disable a KMS key. However,
|
|
1778
|
-
* while the KMS key is disabled, KMS does not rotate the key material. When you re-enable
|
|
1779
|
-
* the KMS key, rotation resumes. If the key material in the re-enabled KMS key hasn't been
|
|
1780
|
-
* rotated in one year, KMS rotates it immediately, and every year thereafter. If it's been
|
|
1781
|
-
* less than a year since the key material in the re-enabled KMS key was rotated, the KMS key
|
|
1782
|
-
* resumes its prior rotation schedule.</p>
|
|
1783
|
-
* </li>
|
|
1784
|
-
* <li>
|
|
1785
|
-
* <p>Pending deletion: While a KMS key is pending deletion, its key rotation status is
|
|
1786
|
-
* <code>false</code> and KMS does not rotate the key material. If you cancel the
|
|
1787
|
-
* deletion, the original key rotation status returns to <code>true</code>.</p>
|
|
1788
|
-
* </li>
|
|
1789
|
-
* </ul>
|
|
1790
|
-
* <p>
|
|
1791
|
-
* <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
|
|
1792
|
-
* ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
1793
|
-
* <p>
|
|
1794
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetKeyRotationStatus</a> (key policy)</p>
|
|
1795
|
-
* <p>
|
|
1796
|
-
* <b>Related operations:</b>
|
|
1797
|
-
* </p>
|
|
1798
|
-
* <ul>
|
|
1799
|
-
* <li>
|
|
1800
|
-
* <p>
|
|
1801
|
-
* <a>DisableKeyRotation</a>
|
|
1802
|
-
* </p>
|
|
1803
|
-
* </li>
|
|
1804
|
-
* <li>
|
|
1805
|
-
* <p>
|
|
1806
|
-
* <a>EnableKeyRotation</a>
|
|
1807
|
-
* </p>
|
|
1808
|
-
* </li>
|
|
1809
|
-
* </ul>
|
|
205
|
+
* @see {@link GetKeyRotationStatusCommand}
|
|
1810
206
|
*/
|
|
1811
207
|
getKeyRotationStatus(args: GetKeyRotationStatusCommandInput, options?: __HttpHandlerOptions): Promise<GetKeyRotationStatusCommandOutput>;
|
|
1812
208
|
getKeyRotationStatus(args: GetKeyRotationStatusCommandInput, cb: (err: any, data?: GetKeyRotationStatusCommandOutput) => void): void;
|
|
1813
209
|
getKeyRotationStatus(args: GetKeyRotationStatusCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetKeyRotationStatusCommandOutput) => void): void;
|
|
1814
210
|
/**
|
|
1815
|
-
* @
|
|
1816
|
-
* <p>Returns the items you need to import key material into a symmetric encryption KMS key. For
|
|
1817
|
-
* more information about importing key material into KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing key material</a> in the
|
|
1818
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
1819
|
-
* <p>This operation returns a public key and an import token. Use the public key to encrypt the
|
|
1820
|
-
* symmetric key material. Store the import token to send with a subsequent <a>ImportKeyMaterial</a> request.</p>
|
|
1821
|
-
* <p>You must specify the key ID of the symmetric encryption KMS key into which you will import
|
|
1822
|
-
* key material. The KMS key <code>Origin</code> must be <code>EXTERNAL</code>. You must also
|
|
1823
|
-
* specify the wrapping algorithm and type of wrapping key (public key) that you will use to
|
|
1824
|
-
* encrypt the key material. You cannot perform this operation on an asymmetric KMS key, an HMAC KMS key, or on any KMS key in a different Amazon Web Services account.</p>
|
|
1825
|
-
* <p>To import key material, you must use the public key and import token from the same
|
|
1826
|
-
* response. These items are valid for 24 hours. The expiration date and time appear in the
|
|
1827
|
-
* <code>GetParametersForImport</code> response. You cannot use an expired token in an <a>ImportKeyMaterial</a> request. If your key and token expire, send another
|
|
1828
|
-
* <code>GetParametersForImport</code> request.</p>
|
|
1829
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1830
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1831
|
-
* <p>
|
|
1832
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
1833
|
-
* <p>
|
|
1834
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetParametersForImport</a> (key policy)</p>
|
|
1835
|
-
* <p>
|
|
1836
|
-
* <b>Related operations:</b>
|
|
1837
|
-
* </p>
|
|
1838
|
-
* <ul>
|
|
1839
|
-
* <li>
|
|
1840
|
-
* <p>
|
|
1841
|
-
* <a>ImportKeyMaterial</a>
|
|
1842
|
-
* </p>
|
|
1843
|
-
* </li>
|
|
1844
|
-
* <li>
|
|
1845
|
-
* <p>
|
|
1846
|
-
* <a>DeleteImportedKeyMaterial</a>
|
|
1847
|
-
* </p>
|
|
1848
|
-
* </li>
|
|
1849
|
-
* </ul>
|
|
211
|
+
* @see {@link GetParametersForImportCommand}
|
|
1850
212
|
*/
|
|
1851
213
|
getParametersForImport(args: GetParametersForImportCommandInput, options?: __HttpHandlerOptions): Promise<GetParametersForImportCommandOutput>;
|
|
1852
214
|
getParametersForImport(args: GetParametersForImportCommandInput, cb: (err: any, data?: GetParametersForImportCommandOutput) => void): void;
|
|
1853
215
|
getParametersForImport(args: GetParametersForImportCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetParametersForImportCommandOutput) => void): void;
|
|
1854
216
|
/**
|
|
1855
|
-
* @
|
|
1856
|
-
* <p>Returns the public key of an asymmetric KMS key. Unlike the private key of a asymmetric
|
|
1857
|
-
* KMS key, which never leaves KMS unencrypted, callers with <code>kms:GetPublicKey</code>
|
|
1858
|
-
* permission can download the public key of an asymmetric KMS key. You can share the public key
|
|
1859
|
-
* to allow others to encrypt messages and verify signatures outside of KMS.
|
|
1860
|
-
* For information about asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1861
|
-
* <p>You do not need to download the public key. Instead, you can use the public key within
|
|
1862
|
-
* KMS by calling the <a>Encrypt</a>, <a>ReEncrypt</a>, or <a>Verify</a> operations with the identifier of an asymmetric KMS key. When you use the
|
|
1863
|
-
* public key within KMS, you benefit from the authentication, authorization, and logging that
|
|
1864
|
-
* are part of every KMS operation. You also reduce of risk of encrypting data that cannot be
|
|
1865
|
-
* decrypted. These features are not effective outside of KMS.</p>
|
|
1866
|
-
* <p>To help you use the public key safely outside of KMS, <code>GetPublicKey</code> returns
|
|
1867
|
-
* important information about the public key in the response, including:</p>
|
|
1868
|
-
* <ul>
|
|
1869
|
-
* <li>
|
|
1870
|
-
* <p>
|
|
1871
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec">KeySpec</a>: The type of key material in the public key, such as
|
|
1872
|
-
* <code>RSA_4096</code> or <code>ECC_NIST_P521</code>.</p>
|
|
1873
|
-
* </li>
|
|
1874
|
-
* <li>
|
|
1875
|
-
* <p>
|
|
1876
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage">KeyUsage</a>: Whether the key is used for encryption or signing.</p>
|
|
1877
|
-
* </li>
|
|
1878
|
-
* <li>
|
|
1879
|
-
* <p>
|
|
1880
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms">EncryptionAlgorithms</a> or <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms">SigningAlgorithms</a>: A list of the encryption algorithms or the signing
|
|
1881
|
-
* algorithms for the key.</p>
|
|
1882
|
-
* </li>
|
|
1883
|
-
* </ul>
|
|
1884
|
-
* <p>Although KMS cannot enforce these restrictions on external operations, it is crucial
|
|
1885
|
-
* that you use this information to prevent the public key from being used improperly. For
|
|
1886
|
-
* example, you can prevent a public signing key from being used encrypt data, or prevent a
|
|
1887
|
-
* public key from being used with an encryption algorithm that is not supported by KMS. You
|
|
1888
|
-
* can also avoid errors, such as using the wrong signing algorithm in a verification
|
|
1889
|
-
* operation.</p>
|
|
1890
|
-
* <p>To verify a signature outside of KMS with an SM2 public key (China Regions only), you must
|
|
1891
|
-
* specify the distinguishing ID. By default, KMS uses <code>1234567812345678</code> as the
|
|
1892
|
-
* distinguishing ID. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification">Offline verification
|
|
1893
|
-
* with SM2 key pairs</a>.</p>
|
|
1894
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1895
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1896
|
-
* <p>
|
|
1897
|
-
* <b>Cross-account use</b>:
|
|
1898
|
-
* Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
1899
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
1900
|
-
* <p>
|
|
1901
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetPublicKey</a> (key policy)</p>
|
|
1902
|
-
* <p>
|
|
1903
|
-
* <b>Related operations</b>: <a>CreateKey</a>
|
|
1904
|
-
* </p>
|
|
217
|
+
* @see {@link GetPublicKeyCommand}
|
|
1905
218
|
*/
|
|
1906
219
|
getPublicKey(args: GetPublicKeyCommandInput, options?: __HttpHandlerOptions): Promise<GetPublicKeyCommandOutput>;
|
|
1907
220
|
getPublicKey(args: GetPublicKeyCommandInput, cb: (err: any, data?: GetPublicKeyCommandOutput) => void): void;
|
|
1908
221
|
getPublicKey(args: GetPublicKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPublicKeyCommandOutput) => void): void;
|
|
1909
222
|
/**
|
|
1910
|
-
* @
|
|
1911
|
-
* <p>Imports key material into an existing symmetric encryption KMS key that was created
|
|
1912
|
-
* without key material. After you successfully import key material into a KMS key, you can
|
|
1913
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material">reimport the same key material</a> into that KMS key, but you cannot import different
|
|
1914
|
-
* key material. </p>
|
|
1915
|
-
* <p>You cannot perform this operation on an asymmetric KMS key, an HMAC KMS key, or on any KMS key in a different Amazon Web Services account. For more information about creating KMS keys with no key material
|
|
1916
|
-
* and then importing key material, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key Material</a> in the
|
|
1917
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
1918
|
-
* <p>Before using this operation, call <a>GetParametersForImport</a>. Its response
|
|
1919
|
-
* includes a public key and an import token. Use the public key to encrypt the key material.
|
|
1920
|
-
* Then, submit the import token from the same <code>GetParametersForImport</code>
|
|
1921
|
-
* response.</p>
|
|
1922
|
-
* <p>When calling this operation, you must specify the following values:</p>
|
|
1923
|
-
* <ul>
|
|
1924
|
-
* <li>
|
|
1925
|
-
* <p>The key ID or key ARN of a KMS key with no key material. Its <code>Origin</code> must
|
|
1926
|
-
* be <code>EXTERNAL</code>.</p>
|
|
1927
|
-
* <p>To create a KMS key with no key material, call <a>CreateKey</a> and set the
|
|
1928
|
-
* value of its <code>Origin</code> parameter to <code>EXTERNAL</code>. To get the
|
|
1929
|
-
* <code>Origin</code> of a KMS key, call <a>DescribeKey</a>.)</p>
|
|
1930
|
-
* </li>
|
|
1931
|
-
* <li>
|
|
1932
|
-
* <p>The encrypted key material. To get the public key to encrypt the key material, call
|
|
1933
|
-
* <a>GetParametersForImport</a>.</p>
|
|
1934
|
-
* </li>
|
|
1935
|
-
* <li>
|
|
1936
|
-
* <p>The import token that <a>GetParametersForImport</a> returned. You must use
|
|
1937
|
-
* a public key and token from the same <code>GetParametersForImport</code> response.</p>
|
|
1938
|
-
* </li>
|
|
1939
|
-
* <li>
|
|
1940
|
-
* <p>Whether the key material expires (<code>ExpirationModel</code>) and, if so, when
|
|
1941
|
-
* (<code>ValidTo</code>). If you set an expiration date, on the specified date, KMS
|
|
1942
|
-
* deletes the key material from the KMS key, making the KMS key unusable. To use the KMS key
|
|
1943
|
-
* in cryptographic operations again, you must reimport the same key material. The only way
|
|
1944
|
-
* to change the expiration model or expiration date is by reimporting the same key material
|
|
1945
|
-
* and specifying a new expiration date. </p>
|
|
1946
|
-
* </li>
|
|
1947
|
-
* </ul>
|
|
1948
|
-
* <p>When this operation is successful, the key state of the KMS key changes from
|
|
1949
|
-
* <code>PendingImport</code> to <code>Enabled</code>, and you can use the KMS key.</p>
|
|
1950
|
-
* <p>If this operation fails, use the exception to help determine the problem. If the error is
|
|
1951
|
-
* related to the key material, the import token, or wrapping key, use <a>GetParametersForImport</a> to get a new public key and import token for the KMS key
|
|
1952
|
-
* and repeat the import procedure. For help, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#importing-keys-overview">How To Import Key
|
|
1953
|
-
* Material</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1954
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
1955
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
1956
|
-
* <p>
|
|
1957
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
1958
|
-
* <p>
|
|
1959
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ImportKeyMaterial</a> (key policy)</p>
|
|
1960
|
-
* <p>
|
|
1961
|
-
* <b>Related operations:</b>
|
|
1962
|
-
* </p>
|
|
1963
|
-
* <ul>
|
|
1964
|
-
* <li>
|
|
1965
|
-
* <p>
|
|
1966
|
-
* <a>DeleteImportedKeyMaterial</a>
|
|
1967
|
-
* </p>
|
|
1968
|
-
* </li>
|
|
1969
|
-
* <li>
|
|
1970
|
-
* <p>
|
|
1971
|
-
* <a>GetParametersForImport</a>
|
|
1972
|
-
* </p>
|
|
1973
|
-
* </li>
|
|
1974
|
-
* </ul>
|
|
223
|
+
* @see {@link ImportKeyMaterialCommand}
|
|
1975
224
|
*/
|
|
1976
225
|
importKeyMaterial(args: ImportKeyMaterialCommandInput, options?: __HttpHandlerOptions): Promise<ImportKeyMaterialCommandOutput>;
|
|
1977
226
|
importKeyMaterial(args: ImportKeyMaterialCommandInput, cb: (err: any, data?: ImportKeyMaterialCommandOutput) => void): void;
|
|
1978
227
|
importKeyMaterial(args: ImportKeyMaterialCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ImportKeyMaterialCommandOutput) => void): void;
|
|
1979
228
|
/**
|
|
1980
|
-
* @
|
|
1981
|
-
* <p>Gets a list of aliases in the caller's Amazon Web Services account and region. For more information
|
|
1982
|
-
* about aliases, see <a>CreateAlias</a>.</p>
|
|
1983
|
-
* <p>By default, the <code>ListAliases</code> operation returns all aliases in the account and
|
|
1984
|
-
* region. To get only the aliases associated with a particular KMS key, use the
|
|
1985
|
-
* <code>KeyId</code> parameter.</p>
|
|
1986
|
-
* <p>The <code>ListAliases</code> response can include aliases that you created and associated
|
|
1987
|
-
* with your customer managed keys, and aliases that Amazon Web Services created and associated with Amazon Web Services
|
|
1988
|
-
* managed keys in your account. You can recognize Amazon Web Services aliases because their names have the
|
|
1989
|
-
* format <code>aws/<service-name></code>, such as <code>aws/dynamodb</code>.</p>
|
|
1990
|
-
* <p>The response might also include aliases that have no <code>TargetKeyId</code> field. These
|
|
1991
|
-
* are predefined aliases that Amazon Web Services has created but has not yet associated with a KMS key.
|
|
1992
|
-
* Aliases that Amazon Web Services creates in your account, including predefined aliases, do not count against
|
|
1993
|
-
* your <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit">KMS aliases
|
|
1994
|
-
* quota</a>.</p>
|
|
1995
|
-
* <p>
|
|
1996
|
-
* <b>Cross-account use</b>: No. <code>ListAliases</code> does not
|
|
1997
|
-
* return aliases in other Amazon Web Services accounts.</p>
|
|
1998
|
-
* <p>
|
|
1999
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListAliases</a> (IAM policy)</p>
|
|
2000
|
-
* <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the
|
|
2001
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
2002
|
-
* <p>
|
|
2003
|
-
* <b>Related operations:</b>
|
|
2004
|
-
* </p>
|
|
2005
|
-
* <ul>
|
|
2006
|
-
* <li>
|
|
2007
|
-
* <p>
|
|
2008
|
-
* <a>CreateAlias</a>
|
|
2009
|
-
* </p>
|
|
2010
|
-
* </li>
|
|
2011
|
-
* <li>
|
|
2012
|
-
* <p>
|
|
2013
|
-
* <a>DeleteAlias</a>
|
|
2014
|
-
* </p>
|
|
2015
|
-
* </li>
|
|
2016
|
-
* <li>
|
|
2017
|
-
* <p>
|
|
2018
|
-
* <a>UpdateAlias</a>
|
|
2019
|
-
* </p>
|
|
2020
|
-
* </li>
|
|
2021
|
-
* </ul>
|
|
229
|
+
* @see {@link ListAliasesCommand}
|
|
2022
230
|
*/
|
|
2023
231
|
listAliases(args: ListAliasesCommandInput, options?: __HttpHandlerOptions): Promise<ListAliasesCommandOutput>;
|
|
2024
232
|
listAliases(args: ListAliasesCommandInput, cb: (err: any, data?: ListAliasesCommandOutput) => void): void;
|
|
2025
233
|
listAliases(args: ListAliasesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAliasesCommandOutput) => void): void;
|
|
2026
234
|
/**
|
|
2027
|
-
* @
|
|
2028
|
-
* <p>Gets a list of all grants for the specified KMS key. </p>
|
|
2029
|
-
* <p>You must specify the KMS key in all requests. You can filter the grant list by grant ID or
|
|
2030
|
-
* grantee principal.</p>
|
|
2031
|
-
* <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Grants in KMS</a> in the
|
|
2032
|
-
* <i>
|
|
2033
|
-
* <i>Key Management Service Developer Guide</i>
|
|
2034
|
-
* </i>. For examples of working with grants in several
|
|
2035
|
-
* programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
|
|
2036
|
-
* <note>
|
|
2037
|
-
* <p>The <code>GranteePrincipal</code> field in the <code>ListGrants</code> response usually contains the
|
|
2038
|
-
* user or role designated as the grantee principal in the grant. However, when the grantee
|
|
2039
|
-
* principal in the grant is an Amazon Web Services service, the <code>GranteePrincipal</code> field contains
|
|
2040
|
-
* the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">service
|
|
2041
|
-
* principal</a>, which might represent several different grantee principals.</p>
|
|
2042
|
-
* </note>
|
|
2043
|
-
* <p>
|
|
2044
|
-
* <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
|
|
2045
|
-
* ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
2046
|
-
* <p>
|
|
2047
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListGrants</a> (key policy)</p>
|
|
2048
|
-
* <p>
|
|
2049
|
-
* <b>Related operations:</b>
|
|
2050
|
-
* </p>
|
|
2051
|
-
* <ul>
|
|
2052
|
-
* <li>
|
|
2053
|
-
* <p>
|
|
2054
|
-
* <a>CreateGrant</a>
|
|
2055
|
-
* </p>
|
|
2056
|
-
* </li>
|
|
2057
|
-
* <li>
|
|
2058
|
-
* <p>
|
|
2059
|
-
* <a>ListRetirableGrants</a>
|
|
2060
|
-
* </p>
|
|
2061
|
-
* </li>
|
|
2062
|
-
* <li>
|
|
2063
|
-
* <p>
|
|
2064
|
-
* <a>RetireGrant</a>
|
|
2065
|
-
* </p>
|
|
2066
|
-
* </li>
|
|
2067
|
-
* <li>
|
|
2068
|
-
* <p>
|
|
2069
|
-
* <a>RevokeGrant</a>
|
|
2070
|
-
* </p>
|
|
2071
|
-
* </li>
|
|
2072
|
-
* </ul>
|
|
235
|
+
* @see {@link ListGrantsCommand}
|
|
2073
236
|
*/
|
|
2074
237
|
listGrants(args: ListGrantsCommandInput, options?: __HttpHandlerOptions): Promise<ListGrantsCommandOutput>;
|
|
2075
238
|
listGrants(args: ListGrantsCommandInput, cb: (err: any, data?: ListGrantsCommandOutput) => void): void;
|
|
2076
239
|
listGrants(args: ListGrantsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListGrantsCommandOutput) => void): void;
|
|
2077
240
|
/**
|
|
2078
|
-
* @
|
|
2079
|
-
* <p>Gets the names of the key policies that are attached to a KMS key. This operation is
|
|
2080
|
-
* designed to get policy names that you can use in a <a>GetKeyPolicy</a> operation.
|
|
2081
|
-
* However, the only valid policy name is <code>default</code>. </p>
|
|
2082
|
-
* <p>
|
|
2083
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
2084
|
-
* <p>
|
|
2085
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListKeyPolicies</a> (key policy)</p>
|
|
2086
|
-
* <p>
|
|
2087
|
-
* <b>Related operations:</b>
|
|
2088
|
-
* </p>
|
|
2089
|
-
* <ul>
|
|
2090
|
-
* <li>
|
|
2091
|
-
* <p>
|
|
2092
|
-
* <a>GetKeyPolicy</a>
|
|
2093
|
-
* </p>
|
|
2094
|
-
* </li>
|
|
2095
|
-
* <li>
|
|
2096
|
-
* <p>
|
|
2097
|
-
* <a>PutKeyPolicy</a>
|
|
2098
|
-
* </p>
|
|
2099
|
-
* </li>
|
|
2100
|
-
* </ul>
|
|
241
|
+
* @see {@link ListKeyPoliciesCommand}
|
|
2101
242
|
*/
|
|
2102
243
|
listKeyPolicies(args: ListKeyPoliciesCommandInput, options?: __HttpHandlerOptions): Promise<ListKeyPoliciesCommandOutput>;
|
|
2103
244
|
listKeyPolicies(args: ListKeyPoliciesCommandInput, cb: (err: any, data?: ListKeyPoliciesCommandOutput) => void): void;
|
|
2104
245
|
listKeyPolicies(args: ListKeyPoliciesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListKeyPoliciesCommandOutput) => void): void;
|
|
2105
246
|
/**
|
|
2106
|
-
* @
|
|
2107
|
-
* <p>Gets a list of all KMS keys in the caller's Amazon Web Services account and Region.</p>
|
|
2108
|
-
* <p>
|
|
2109
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
2110
|
-
* <p>
|
|
2111
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListKeys</a> (IAM policy)</p>
|
|
2112
|
-
* <p>
|
|
2113
|
-
* <b>Related operations:</b>
|
|
2114
|
-
* </p>
|
|
2115
|
-
* <ul>
|
|
2116
|
-
* <li>
|
|
2117
|
-
* <p>
|
|
2118
|
-
* <a>CreateKey</a>
|
|
2119
|
-
* </p>
|
|
2120
|
-
* </li>
|
|
2121
|
-
* <li>
|
|
2122
|
-
* <p>
|
|
2123
|
-
* <a>DescribeKey</a>
|
|
2124
|
-
* </p>
|
|
2125
|
-
* </li>
|
|
2126
|
-
* <li>
|
|
2127
|
-
* <p>
|
|
2128
|
-
* <a>ListAliases</a>
|
|
2129
|
-
* </p>
|
|
2130
|
-
* </li>
|
|
2131
|
-
* <li>
|
|
2132
|
-
* <p>
|
|
2133
|
-
* <a>ListResourceTags</a>
|
|
2134
|
-
* </p>
|
|
2135
|
-
* </li>
|
|
2136
|
-
* </ul>
|
|
247
|
+
* @see {@link ListKeysCommand}
|
|
2137
248
|
*/
|
|
2138
249
|
listKeys(args: ListKeysCommandInput, options?: __HttpHandlerOptions): Promise<ListKeysCommandOutput>;
|
|
2139
250
|
listKeys(args: ListKeysCommandInput, cb: (err: any, data?: ListKeysCommandOutput) => void): void;
|
|
2140
251
|
listKeys(args: ListKeysCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListKeysCommandOutput) => void): void;
|
|
2141
252
|
/**
|
|
2142
|
-
* @
|
|
2143
|
-
* <p>Returns all tags on the specified KMS key.</p>
|
|
2144
|
-
* <p>For general information about tags, including the format and syntax, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in
|
|
2145
|
-
* the <i>Amazon Web Services General Reference</i>. For information about using
|
|
2146
|
-
* tags in KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging
|
|
2147
|
-
* keys</a>.</p>
|
|
2148
|
-
* <p>
|
|
2149
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
2150
|
-
* <p>
|
|
2151
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListResourceTags</a> (key policy)</p>
|
|
2152
|
-
* <p>
|
|
2153
|
-
* <b>Related operations:</b>
|
|
2154
|
-
* </p>
|
|
2155
|
-
* <ul>
|
|
2156
|
-
* <li>
|
|
2157
|
-
* <p>
|
|
2158
|
-
* <a>CreateKey</a>
|
|
2159
|
-
* </p>
|
|
2160
|
-
* </li>
|
|
2161
|
-
* <li>
|
|
2162
|
-
* <p>
|
|
2163
|
-
* <a>ReplicateKey</a>
|
|
2164
|
-
* </p>
|
|
2165
|
-
* </li>
|
|
2166
|
-
* <li>
|
|
2167
|
-
* <p>
|
|
2168
|
-
* <a>TagResource</a>
|
|
2169
|
-
* </p>
|
|
2170
|
-
* </li>
|
|
2171
|
-
* <li>
|
|
2172
|
-
* <p>
|
|
2173
|
-
* <a>UntagResource</a>
|
|
2174
|
-
* </p>
|
|
2175
|
-
* </li>
|
|
2176
|
-
* </ul>
|
|
253
|
+
* @see {@link ListResourceTagsCommand}
|
|
2177
254
|
*/
|
|
2178
255
|
listResourceTags(args: ListResourceTagsCommandInput, options?: __HttpHandlerOptions): Promise<ListResourceTagsCommandOutput>;
|
|
2179
256
|
listResourceTags(args: ListResourceTagsCommandInput, cb: (err: any, data?: ListResourceTagsCommandOutput) => void): void;
|
|
2180
257
|
listResourceTags(args: ListResourceTagsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListResourceTagsCommandOutput) => void): void;
|
|
2181
258
|
/**
|
|
2182
|
-
* @
|
|
2183
|
-
* <p>Returns information about all grants in the Amazon Web Services account and Region that have the
|
|
2184
|
-
* specified retiring principal. </p>
|
|
2185
|
-
* <p>You can specify any principal in your Amazon Web Services account. The grants that are returned include
|
|
2186
|
-
* grants for KMS keys in your Amazon Web Services account and other Amazon Web Services accounts. You might use this
|
|
2187
|
-
* operation to determine which grants you may retire. To retire a grant, use the <a>RetireGrant</a> operation.</p>
|
|
2188
|
-
* <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Grants in KMS</a> in the
|
|
2189
|
-
* <i>
|
|
2190
|
-
* <i>Key Management Service Developer Guide</i>
|
|
2191
|
-
* </i>. For examples of working with grants in several
|
|
2192
|
-
* programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
|
|
2193
|
-
* <p>
|
|
2194
|
-
* <b>Cross-account use</b>: You must specify a principal in your
|
|
2195
|
-
* Amazon Web Services account. However, this operation can return grants in any Amazon Web Services account. You do not need
|
|
2196
|
-
* <code>kms:ListRetirableGrants</code> permission (or any other additional permission) in any
|
|
2197
|
-
* Amazon Web Services account other than your own.</p>
|
|
2198
|
-
* <p>
|
|
2199
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListRetirableGrants</a> (IAM policy) in your
|
|
2200
|
-
* Amazon Web Services account.</p>
|
|
2201
|
-
* <p>
|
|
2202
|
-
* <b>Related operations:</b>
|
|
2203
|
-
* </p>
|
|
2204
|
-
* <ul>
|
|
2205
|
-
* <li>
|
|
2206
|
-
* <p>
|
|
2207
|
-
* <a>CreateGrant</a>
|
|
2208
|
-
* </p>
|
|
2209
|
-
* </li>
|
|
2210
|
-
* <li>
|
|
2211
|
-
* <p>
|
|
2212
|
-
* <a>ListGrants</a>
|
|
2213
|
-
* </p>
|
|
2214
|
-
* </li>
|
|
2215
|
-
* <li>
|
|
2216
|
-
* <p>
|
|
2217
|
-
* <a>RetireGrant</a>
|
|
2218
|
-
* </p>
|
|
2219
|
-
* </li>
|
|
2220
|
-
* <li>
|
|
2221
|
-
* <p>
|
|
2222
|
-
* <a>RevokeGrant</a>
|
|
2223
|
-
* </p>
|
|
2224
|
-
* </li>
|
|
2225
|
-
* </ul>
|
|
259
|
+
* @see {@link ListRetirableGrantsCommand}
|
|
2226
260
|
*/
|
|
2227
261
|
listRetirableGrants(args: ListRetirableGrantsCommandInput, options?: __HttpHandlerOptions): Promise<ListRetirableGrantsCommandOutput>;
|
|
2228
262
|
listRetirableGrants(args: ListRetirableGrantsCommandInput, cb: (err: any, data?: ListRetirableGrantsCommandOutput) => void): void;
|
|
2229
263
|
listRetirableGrants(args: ListRetirableGrantsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListRetirableGrantsCommandOutput) => void): void;
|
|
2230
264
|
/**
|
|
2231
|
-
* @
|
|
2232
|
-
* <p>Attaches a key policy to the specified KMS key. </p>
|
|
2233
|
-
* <p>For more information about key policies, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">Key Policies</a> in the <i>Key Management Service Developer Guide</i>.
|
|
2234
|
-
* For help writing and formatting a JSON policy document, see the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html">IAM JSON Policy Reference</a> in the <i>
|
|
2235
|
-
* <i>Identity and Access Management User Guide</i>
|
|
2236
|
-
* </i>. For examples of adding a key policy in multiple programming languages,
|
|
2237
|
-
* see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-key-policies.html#put-policy">Setting a key policy</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2238
|
-
* <p>
|
|
2239
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
2240
|
-
* <p>
|
|
2241
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:PutKeyPolicy</a> (key policy)</p>
|
|
2242
|
-
* <p>
|
|
2243
|
-
* <b>Related operations</b>: <a>GetKeyPolicy</a>
|
|
2244
|
-
* </p>
|
|
265
|
+
* @see {@link PutKeyPolicyCommand}
|
|
2245
266
|
*/
|
|
2246
267
|
putKeyPolicy(args: PutKeyPolicyCommandInput, options?: __HttpHandlerOptions): Promise<PutKeyPolicyCommandOutput>;
|
|
2247
268
|
putKeyPolicy(args: PutKeyPolicyCommandInput, cb: (err: any, data?: PutKeyPolicyCommandOutput) => void): void;
|
|
2248
269
|
putKeyPolicy(args: PutKeyPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutKeyPolicyCommandOutput) => void): void;
|
|
2249
270
|
/**
|
|
2250
|
-
* @
|
|
2251
|
-
* <p>Decrypts ciphertext and then reencrypts it entirely within KMS. You can use this
|
|
2252
|
-
* operation to change the KMS key under which data is encrypted, such as when you <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-manually">manually
|
|
2253
|
-
* rotate</a> a KMS key or change the KMS key that protects a ciphertext. You can also use
|
|
2254
|
-
* it to reencrypt ciphertext under the same KMS key, such as to change the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">encryption
|
|
2255
|
-
* context</a> of a ciphertext.</p>
|
|
2256
|
-
* <p>The <code>ReEncrypt</code> operation can decrypt ciphertext that was encrypted by using a
|
|
2257
|
-
* KMS key in an KMS operation, such as <a>Encrypt</a> or <a>GenerateDataKey</a>. It can also decrypt ciphertext that was encrypted by using the
|
|
2258
|
-
* public key of an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks">asymmetric KMS key</a>
|
|
2259
|
-
* outside of KMS. However, it cannot decrypt ciphertext produced by other libraries, such as
|
|
2260
|
-
* the <a href="https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/">Amazon Web Services Encryption SDK</a> or
|
|
2261
|
-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3
|
|
2262
|
-
* client-side encryption</a>. These libraries return a ciphertext format that is
|
|
2263
|
-
* incompatible with KMS.</p>
|
|
2264
|
-
* <p>When you use the <code>ReEncrypt</code> operation, you need to provide information for the
|
|
2265
|
-
* decrypt operation and the subsequent encrypt operation.</p>
|
|
2266
|
-
* <ul>
|
|
2267
|
-
* <li>
|
|
2268
|
-
* <p>If your ciphertext was encrypted under an asymmetric KMS key, you must use the
|
|
2269
|
-
* <code>SourceKeyId</code> parameter to identify the KMS key that encrypted the
|
|
2270
|
-
* ciphertext. You must also supply the encryption algorithm that was used. This information
|
|
2271
|
-
* is required to decrypt the data.</p>
|
|
2272
|
-
* </li>
|
|
2273
|
-
* <li>
|
|
2274
|
-
* <p>If your ciphertext was encrypted under a symmetric encryption KMS key, the
|
|
2275
|
-
* <code>SourceKeyId</code> parameter is optional. KMS can get this information from
|
|
2276
|
-
* metadata that it adds to the symmetric ciphertext blob. This feature adds durability to
|
|
2277
|
-
* your implementation by ensuring that authorized users can decrypt ciphertext decades after
|
|
2278
|
-
* it was encrypted, even if they've lost track of the key ID. However, specifying the source
|
|
2279
|
-
* KMS key is always recommended as a best practice. When you use the
|
|
2280
|
-
* <code>SourceKeyId</code> parameter to specify a KMS key, KMS uses only the KMS key you
|
|
2281
|
-
* specify. If the ciphertext was encrypted under a different KMS key, the
|
|
2282
|
-
* <code>ReEncrypt</code> operation fails. This practice ensures that you use the KMS key
|
|
2283
|
-
* that you intend.</p>
|
|
2284
|
-
* </li>
|
|
2285
|
-
* <li>
|
|
2286
|
-
* <p>To reencrypt the data, you must use the <code>DestinationKeyId</code> parameter to
|
|
2287
|
-
* specify the KMS key that re-encrypts the data after it is decrypted. If the destination
|
|
2288
|
-
* KMS key is an asymmetric KMS key, you must also provide the encryption algorithm. The
|
|
2289
|
-
* algorithm that you choose must be compatible with the KMS key.</p>
|
|
2290
|
-
* <important>
|
|
2291
|
-
* <p>When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.</p>
|
|
2292
|
-
* <p>You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.</p>
|
|
2293
|
-
* </important>
|
|
2294
|
-
* </li>
|
|
2295
|
-
* </ul>
|
|
2296
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
2297
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2298
|
-
* <p>
|
|
2299
|
-
* <b>Cross-account use</b>: Yes. The source KMS key and
|
|
2300
|
-
* destination KMS key can be in different Amazon Web Services accounts. Either or both KMS keys can be in a
|
|
2301
|
-
* different account than the caller. To specify a KMS key in a different account, you must use
|
|
2302
|
-
* its key ARN or alias ARN.</p>
|
|
2303
|
-
* <p>
|
|
2304
|
-
* <b>Required permissions</b>:</p>
|
|
2305
|
-
* <ul>
|
|
2306
|
-
* <li>
|
|
2307
|
-
* <p>
|
|
2308
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ReEncryptFrom</a>
|
|
2309
|
-
* permission on the source KMS key (key policy)</p>
|
|
2310
|
-
* </li>
|
|
2311
|
-
* <li>
|
|
2312
|
-
* <p>
|
|
2313
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ReEncryptTo</a>
|
|
2314
|
-
* permission on the destination KMS key (key policy)</p>
|
|
2315
|
-
* </li>
|
|
2316
|
-
* </ul>
|
|
2317
|
-
* <p>To permit reencryption from or to a KMS key, include the <code>"kms:ReEncrypt*"</code>
|
|
2318
|
-
* permission in your <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">key policy</a>. This permission is
|
|
2319
|
-
* automatically included in the key policy when you use the console to create a KMS key. But you
|
|
2320
|
-
* must include it manually when you create a KMS key programmatically or when you use the <a>PutKeyPolicy</a> operation to set a key policy.</p>
|
|
2321
|
-
* <p>
|
|
2322
|
-
* <b>Related operations:</b>
|
|
2323
|
-
* </p>
|
|
2324
|
-
* <ul>
|
|
2325
|
-
* <li>
|
|
2326
|
-
* <p>
|
|
2327
|
-
* <a>Decrypt</a>
|
|
2328
|
-
* </p>
|
|
2329
|
-
* </li>
|
|
2330
|
-
* <li>
|
|
2331
|
-
* <p>
|
|
2332
|
-
* <a>Encrypt</a>
|
|
2333
|
-
* </p>
|
|
2334
|
-
* </li>
|
|
2335
|
-
* <li>
|
|
2336
|
-
* <p>
|
|
2337
|
-
* <a>GenerateDataKey</a>
|
|
2338
|
-
* </p>
|
|
2339
|
-
* </li>
|
|
2340
|
-
* <li>
|
|
2341
|
-
* <p>
|
|
2342
|
-
* <a>GenerateDataKeyPair</a>
|
|
2343
|
-
* </p>
|
|
2344
|
-
* </li>
|
|
2345
|
-
* </ul>
|
|
271
|
+
* @see {@link ReEncryptCommand}
|
|
2346
272
|
*/
|
|
2347
273
|
reEncrypt(args: ReEncryptCommandInput, options?: __HttpHandlerOptions): Promise<ReEncryptCommandOutput>;
|
|
2348
274
|
reEncrypt(args: ReEncryptCommandInput, cb: (err: any, data?: ReEncryptCommandOutput) => void): void;
|
|
2349
275
|
reEncrypt(args: ReEncryptCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ReEncryptCommandOutput) => void): void;
|
|
2350
276
|
/**
|
|
2351
|
-
* @
|
|
2352
|
-
* <p>Replicates a multi-Region key into the specified Region. This operation creates a
|
|
2353
|
-
* multi-Region replica key based on a multi-Region primary key in a different Region of the same
|
|
2354
|
-
* Amazon Web Services partition. You can create multiple replicas of a primary key, but each must be in a
|
|
2355
|
-
* different Region. To create a multi-Region primary key, use the <a>CreateKey</a>
|
|
2356
|
-
* operation.</p>
|
|
2357
|
-
* <p>This operation supports <i>multi-Region keys</i>, an KMS feature that lets you create multiple
|
|
2358
|
-
* interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key
|
|
2359
|
-
* material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt
|
|
2360
|
-
* it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Multi-Region keys in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2361
|
-
* <p>A <i>replica key</i> is a fully-functional KMS key that can be used
|
|
2362
|
-
* independently of its primary and peer replica keys. A primary key and its replica keys share
|
|
2363
|
-
* properties that make them interoperable. They have the same <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id">key ID</a> and key material. They also
|
|
2364
|
-
* have the same <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec">key
|
|
2365
|
-
* spec</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage">key
|
|
2366
|
-
* usage</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin">key
|
|
2367
|
-
* material origin</a>, and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic key rotation status</a>. KMS automatically synchronizes these shared
|
|
2368
|
-
* properties among related multi-Region keys. All other properties of a replica key can differ,
|
|
2369
|
-
* including its <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">key
|
|
2370
|
-
* policy</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">tags</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html">aliases</a>, and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a>. KMS pricing and quotas for KMS keys apply to each
|
|
2371
|
-
* primary key and replica key.</p>
|
|
2372
|
-
* <p>When this operation completes, the new replica key has a transient key state of
|
|
2373
|
-
* <code>Creating</code>. This key state changes to <code>Enabled</code> (or
|
|
2374
|
-
* <code>PendingImport</code>) after a few seconds when the process of creating the new replica
|
|
2375
|
-
* key is complete. While the key state is <code>Creating</code>, you can manage key, but you
|
|
2376
|
-
* cannot yet use it in cryptographic operations. If you are creating and using the replica key
|
|
2377
|
-
* programmatically, retry on <code>KMSInvalidStateException</code> or call
|
|
2378
|
-
* <code>DescribeKey</code> to check its <code>KeyState</code> value before using it. For
|
|
2379
|
-
* details about the <code>Creating</code> key state, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the
|
|
2380
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
2381
|
-
* <p>You cannot create more than one replica of a primary key in any Region. If the Region
|
|
2382
|
-
* already includes a replica of the key you're trying to replicate, <code>ReplicateKey</code>
|
|
2383
|
-
* returns an <code>AlreadyExistsException</code> error. If the key state of the existing replica
|
|
2384
|
-
* is <code>PendingDeletion</code>, you can cancel the scheduled key deletion (<a>CancelKeyDeletion</a>) or wait for the key to be deleted. The new replica key you
|
|
2385
|
-
* create will have the same <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-sync-properties">shared
|
|
2386
|
-
* properties</a> as the original replica key.</p>
|
|
2387
|
-
* <p>The CloudTrail log of a <code>ReplicateKey</code> operation records a
|
|
2388
|
-
* <code>ReplicateKey</code> operation in the primary key's Region and a <a>CreateKey</a> operation in the replica key's Region.</p>
|
|
2389
|
-
* <p>If you replicate a multi-Region primary key with imported key material, the replica key is
|
|
2390
|
-
* created with no key material. You must import the same key material that you imported into the
|
|
2391
|
-
* primary key. For details, see <a href="kms/latest/developerguide/multi-region-keys-import.html">Importing key material into multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2392
|
-
* <p>To convert a replica key to a primary key, use the <a>UpdatePrimaryRegion</a>
|
|
2393
|
-
* operation.</p>
|
|
2394
|
-
* <note>
|
|
2395
|
-
* <p>
|
|
2396
|
-
* <code>ReplicateKey</code> uses different default values for the <code>KeyPolicy</code>
|
|
2397
|
-
* and <code>Tags</code> parameters than those used in the KMS console. For details, see the
|
|
2398
|
-
* parameter descriptions.</p>
|
|
2399
|
-
* </note>
|
|
2400
|
-
* <p>
|
|
2401
|
-
* <b>Cross-account use</b>: No. You cannot use this operation to
|
|
2402
|
-
* create a replica key in a different Amazon Web Services account. </p>
|
|
2403
|
-
* <p>
|
|
2404
|
-
* <b>Required permissions</b>: </p>
|
|
2405
|
-
* <ul>
|
|
2406
|
-
* <li>
|
|
2407
|
-
* <p>
|
|
2408
|
-
* <code>kms:ReplicateKey</code> on the primary key (in the primary key's Region).
|
|
2409
|
-
* Include this permission in the primary key's key policy.</p>
|
|
2410
|
-
* </li>
|
|
2411
|
-
* <li>
|
|
2412
|
-
* <p>
|
|
2413
|
-
* <code>kms:CreateKey</code> in an IAM policy in the replica Region.</p>
|
|
2414
|
-
* </li>
|
|
2415
|
-
* <li>
|
|
2416
|
-
* <p>To use the <code>Tags</code> parameter, <code>kms:TagResource</code> in an IAM policy
|
|
2417
|
-
* in the replica Region.</p>
|
|
2418
|
-
* </li>
|
|
2419
|
-
* </ul>
|
|
2420
|
-
* <p>
|
|
2421
|
-
* <b>Related operations</b>
|
|
2422
|
-
* </p>
|
|
2423
|
-
* <ul>
|
|
2424
|
-
* <li>
|
|
2425
|
-
* <p>
|
|
2426
|
-
* <a>CreateKey</a>
|
|
2427
|
-
* </p>
|
|
2428
|
-
* </li>
|
|
2429
|
-
* <li>
|
|
2430
|
-
* <p>
|
|
2431
|
-
* <a>UpdatePrimaryRegion</a>
|
|
2432
|
-
* </p>
|
|
2433
|
-
* </li>
|
|
2434
|
-
* </ul>
|
|
277
|
+
* @see {@link ReplicateKeyCommand}
|
|
2435
278
|
*/
|
|
2436
279
|
replicateKey(args: ReplicateKeyCommandInput, options?: __HttpHandlerOptions): Promise<ReplicateKeyCommandOutput>;
|
|
2437
280
|
replicateKey(args: ReplicateKeyCommandInput, cb: (err: any, data?: ReplicateKeyCommandOutput) => void): void;
|
|
2438
281
|
replicateKey(args: ReplicateKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ReplicateKeyCommandOutput) => void): void;
|
|
2439
282
|
/**
|
|
2440
|
-
* @
|
|
2441
|
-
* <p>Deletes a grant. Typically, you retire a grant when you no longer need its permissions. To
|
|
2442
|
-
* identify the grant to retire, use a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">grant token</a>, or both the grant ID and a
|
|
2443
|
-
* key identifier (key ID or key ARN) of the KMS key. The <a>CreateGrant</a> operation
|
|
2444
|
-
* returns both values.</p>
|
|
2445
|
-
* <p>This operation can be called by the <i>retiring principal</i> for a grant,
|
|
2446
|
-
* by the <i>grantee principal</i> if the grant allows the <code>RetireGrant</code>
|
|
2447
|
-
* operation, and by the Amazon Web Services account in which the grant is created. It can also be called by
|
|
2448
|
-
* principals to whom permission for retiring a grant is delegated. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete">Retiring and revoking
|
|
2449
|
-
* grants</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2450
|
-
* <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Grants in KMS</a> in the
|
|
2451
|
-
* <i>
|
|
2452
|
-
* <i>Key Management Service Developer Guide</i>
|
|
2453
|
-
* </i>. For examples of working with grants in several
|
|
2454
|
-
* programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
|
|
2455
|
-
* <p>
|
|
2456
|
-
* <b>Cross-account use</b>: Yes. You can retire a grant on a KMS
|
|
2457
|
-
* key in a different Amazon Web Services account.</p>
|
|
2458
|
-
* <p>
|
|
2459
|
-
* <b>Required permissions:</b>:Permission to retire a grant is
|
|
2460
|
-
* determined primarily by the grant. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete">Retiring and revoking grants</a> in
|
|
2461
|
-
* the <i>Key Management Service Developer Guide</i>.</p>
|
|
2462
|
-
* <p>
|
|
2463
|
-
* <b>Related operations:</b>
|
|
2464
|
-
* </p>
|
|
2465
|
-
* <ul>
|
|
2466
|
-
* <li>
|
|
2467
|
-
* <p>
|
|
2468
|
-
* <a>CreateGrant</a>
|
|
2469
|
-
* </p>
|
|
2470
|
-
* </li>
|
|
2471
|
-
* <li>
|
|
2472
|
-
* <p>
|
|
2473
|
-
* <a>ListGrants</a>
|
|
2474
|
-
* </p>
|
|
2475
|
-
* </li>
|
|
2476
|
-
* <li>
|
|
2477
|
-
* <p>
|
|
2478
|
-
* <a>ListRetirableGrants</a>
|
|
2479
|
-
* </p>
|
|
2480
|
-
* </li>
|
|
2481
|
-
* <li>
|
|
2482
|
-
* <p>
|
|
2483
|
-
* <a>RevokeGrant</a>
|
|
2484
|
-
* </p>
|
|
2485
|
-
* </li>
|
|
2486
|
-
* </ul>
|
|
283
|
+
* @see {@link RetireGrantCommand}
|
|
2487
284
|
*/
|
|
2488
285
|
retireGrant(args: RetireGrantCommandInput, options?: __HttpHandlerOptions): Promise<RetireGrantCommandOutput>;
|
|
2489
286
|
retireGrant(args: RetireGrantCommandInput, cb: (err: any, data?: RetireGrantCommandOutput) => void): void;
|
|
2490
287
|
retireGrant(args: RetireGrantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetireGrantCommandOutput) => void): void;
|
|
2491
288
|
/**
|
|
2492
|
-
* @
|
|
2493
|
-
* <p>Deletes the specified grant. You revoke a grant to terminate the permissions that the
|
|
2494
|
-
* grant allows. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/managing-grants.html#grant-delete">Retiring and revoking grants</a> in
|
|
2495
|
-
* the <i>
|
|
2496
|
-
* <i>Key Management Service Developer Guide</i>
|
|
2497
|
-
* </i>.</p>
|
|
2498
|
-
* <p>When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as <i>eventual consistency</i>. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency">Eventual consistency</a> in
|
|
2499
|
-
* the <i>
|
|
2500
|
-
* <i>Key Management Service Developer Guide</i>
|
|
2501
|
-
* </i>. </p>
|
|
2502
|
-
* <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Grants in KMS</a> in the
|
|
2503
|
-
* <i>
|
|
2504
|
-
* <i>Key Management Service Developer Guide</i>
|
|
2505
|
-
* </i>. For examples of working with grants in several
|
|
2506
|
-
* programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
|
|
2507
|
-
* <p>
|
|
2508
|
-
* <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
|
|
2509
|
-
* ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
2510
|
-
* <p>
|
|
2511
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:RevokeGrant</a> (key policy).</p>
|
|
2512
|
-
* <p>
|
|
2513
|
-
* <b>Related operations:</b>
|
|
2514
|
-
* </p>
|
|
2515
|
-
* <ul>
|
|
2516
|
-
* <li>
|
|
2517
|
-
* <p>
|
|
2518
|
-
* <a>CreateGrant</a>
|
|
2519
|
-
* </p>
|
|
2520
|
-
* </li>
|
|
2521
|
-
* <li>
|
|
2522
|
-
* <p>
|
|
2523
|
-
* <a>ListGrants</a>
|
|
2524
|
-
* </p>
|
|
2525
|
-
* </li>
|
|
2526
|
-
* <li>
|
|
2527
|
-
* <p>
|
|
2528
|
-
* <a>ListRetirableGrants</a>
|
|
2529
|
-
* </p>
|
|
2530
|
-
* </li>
|
|
2531
|
-
* <li>
|
|
2532
|
-
* <p>
|
|
2533
|
-
* <a>RetireGrant</a>
|
|
2534
|
-
* </p>
|
|
2535
|
-
* </li>
|
|
2536
|
-
* </ul>
|
|
289
|
+
* @see {@link RevokeGrantCommand}
|
|
2537
290
|
*/
|
|
2538
291
|
revokeGrant(args: RevokeGrantCommandInput, options?: __HttpHandlerOptions): Promise<RevokeGrantCommandOutput>;
|
|
2539
292
|
revokeGrant(args: RevokeGrantCommandInput, cb: (err: any, data?: RevokeGrantCommandOutput) => void): void;
|
|
2540
293
|
revokeGrant(args: RevokeGrantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RevokeGrantCommandOutput) => void): void;
|
|
2541
294
|
/**
|
|
2542
|
-
* @
|
|
2543
|
-
* <p>Schedules the deletion of a KMS key. By default, KMS applies a waiting period of 30
|
|
2544
|
-
* days, but you can specify a waiting period of 7-30 days. When this operation is successful,
|
|
2545
|
-
* the key state of the KMS key changes to <code>PendingDeletion</code> and the key can't be used
|
|
2546
|
-
* in any cryptographic operations. It remains in this state for the duration of the waiting
|
|
2547
|
-
* period. Before the waiting period ends, you can use <a>CancelKeyDeletion</a> to
|
|
2548
|
-
* cancel the deletion of the KMS key. After the waiting period ends, KMS deletes the KMS key,
|
|
2549
|
-
* its key material, and all KMS data associated with it, including all aliases that refer to
|
|
2550
|
-
* it.</p>
|
|
2551
|
-
* <important>
|
|
2552
|
-
* <p>Deleting a KMS key is a destructive and potentially dangerous operation. When a KMS key
|
|
2553
|
-
* is deleted, all data that was encrypted under the KMS key is unrecoverable. (The only
|
|
2554
|
-
* exception is a multi-Region replica key.) To prevent the use of a KMS key without deleting
|
|
2555
|
-
* it, use <a>DisableKey</a>. </p>
|
|
2556
|
-
* </important>
|
|
2557
|
-
* <p>You can schedule the deletion of a multi-Region primary key and its replica keys at any
|
|
2558
|
-
* time. However, KMS will not delete a multi-Region primary key with existing replica keys. If
|
|
2559
|
-
* you schedule the deletion of a primary key with replicas, its key state changes to
|
|
2560
|
-
* <code>PendingReplicaDeletion</code> and it cannot be replicated or used in cryptographic
|
|
2561
|
-
* operations. This status can continue indefinitely. When the last of its replicas keys is
|
|
2562
|
-
* deleted (not just scheduled), the key state of the primary key changes to
|
|
2563
|
-
* <code>PendingDeletion</code> and its waiting period (<code>PendingWindowInDays</code>)
|
|
2564
|
-
* begins. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html">Deleting multi-Region keys</a> in the
|
|
2565
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
2566
|
-
* <p>When KMS <a href="https://docs.aws.amazon.com/kms/latest/developerguide/delete-cmk-keystore.html">deletes
|
|
2567
|
-
* a KMS key from an CloudHSM key store</a>, it makes a best effort to delete the associated
|
|
2568
|
-
* key material from the associated CloudHSM cluster. However, you might need to manually <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key">delete
|
|
2569
|
-
* the orphaned key material</a> from the cluster and its backups. <a href="https://docs.aws.amazon.com/kms/latest/developerguide/delete-xks-key.html">Deleting a KMS key from an
|
|
2570
|
-
* external key store</a> has no effect on the associated external key. However, for both
|
|
2571
|
-
* types of custom key stores, deleting a KMS key is destructive and irreversible. You cannot
|
|
2572
|
-
* decrypt ciphertext encrypted under the KMS key by using only its associated external key or
|
|
2573
|
-
* CloudHSM key. Also, you cannot recreate a KMS key in an external key store by creating a new KMS
|
|
2574
|
-
* key with the same key material.</p>
|
|
2575
|
-
* <p>For more information about scheduling a KMS key for deletion, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html">Deleting KMS keys</a> in the
|
|
2576
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
2577
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
2578
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2579
|
-
* <p>
|
|
2580
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
2581
|
-
* <p>
|
|
2582
|
-
* <b>Required permissions</b>: kms:ScheduleKeyDeletion (key
|
|
2583
|
-
* policy)</p>
|
|
2584
|
-
* <p>
|
|
2585
|
-
* <b>Related operations</b>
|
|
2586
|
-
* </p>
|
|
2587
|
-
* <ul>
|
|
2588
|
-
* <li>
|
|
2589
|
-
* <p>
|
|
2590
|
-
* <a>CancelKeyDeletion</a>
|
|
2591
|
-
* </p>
|
|
2592
|
-
* </li>
|
|
2593
|
-
* <li>
|
|
2594
|
-
* <p>
|
|
2595
|
-
* <a>DisableKey</a>
|
|
2596
|
-
* </p>
|
|
2597
|
-
* </li>
|
|
2598
|
-
* </ul>
|
|
295
|
+
* @see {@link ScheduleKeyDeletionCommand}
|
|
2599
296
|
*/
|
|
2600
297
|
scheduleKeyDeletion(args: ScheduleKeyDeletionCommandInput, options?: __HttpHandlerOptions): Promise<ScheduleKeyDeletionCommandOutput>;
|
|
2601
298
|
scheduleKeyDeletion(args: ScheduleKeyDeletionCommandInput, cb: (err: any, data?: ScheduleKeyDeletionCommandOutput) => void): void;
|
|
2602
299
|
scheduleKeyDeletion(args: ScheduleKeyDeletionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ScheduleKeyDeletionCommandOutput) => void): void;
|
|
2603
300
|
/**
|
|
2604
|
-
* @
|
|
2605
|
-
* <p>Creates a <a href="https://en.wikipedia.org/wiki/Digital_signature">digital
|
|
2606
|
-
* signature</a> for a message or message digest by using the private key in an asymmetric
|
|
2607
|
-
* signing KMS key. To verify the signature, use the <a>Verify</a> operation, or use
|
|
2608
|
-
* the public key in the same asymmetric KMS key outside of KMS. For information about asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2609
|
-
* <p>Digital signatures are generated and verified by using asymmetric key pair, such as an RSA
|
|
2610
|
-
* or ECC pair that is represented by an asymmetric KMS key. The key owner (or an authorized
|
|
2611
|
-
* user) uses their private key to sign a message. Anyone with the public key can verify that the
|
|
2612
|
-
* message was signed with that particular private key and that the message hasn't changed since
|
|
2613
|
-
* it was signed. </p>
|
|
2614
|
-
* <p>To use the <code>Sign</code> operation, provide the following information:</p>
|
|
2615
|
-
* <ul>
|
|
2616
|
-
* <li>
|
|
2617
|
-
* <p>Use the <code>KeyId</code> parameter to identify an asymmetric KMS key with a
|
|
2618
|
-
* <code>KeyUsage</code> value of <code>SIGN_VERIFY</code>. To get the
|
|
2619
|
-
* <code>KeyUsage</code> value of a KMS key, use the <a>DescribeKey</a>
|
|
2620
|
-
* operation. The caller must have <code>kms:Sign</code> permission on the KMS key.</p>
|
|
2621
|
-
* </li>
|
|
2622
|
-
* <li>
|
|
2623
|
-
* <p>Use the <code>Message</code> parameter to specify the message or message digest to
|
|
2624
|
-
* sign. You can submit messages of up to 4096 bytes. To sign a larger message, generate a
|
|
2625
|
-
* hash digest of the message, and then provide the hash digest in the <code>Message</code>
|
|
2626
|
-
* parameter. To indicate whether the message is a full message or a digest, use the
|
|
2627
|
-
* <code>MessageType</code> parameter.</p>
|
|
2628
|
-
* </li>
|
|
2629
|
-
* <li>
|
|
2630
|
-
* <p>Choose a signing algorithm that is compatible with the KMS key. </p>
|
|
2631
|
-
* </li>
|
|
2632
|
-
* </ul>
|
|
2633
|
-
* <important>
|
|
2634
|
-
* <p>When signing a message, be sure to record the KMS key and the signing algorithm. This
|
|
2635
|
-
* information is required to verify the signature.</p>
|
|
2636
|
-
* </important>
|
|
2637
|
-
* <note>
|
|
2638
|
-
* <p>Best practices recommend that you limit the time during which any signature is
|
|
2639
|
-
* effective. This deters an attack where the actor uses a signed message to establish validity
|
|
2640
|
-
* repeatedly or long after the message is superseded. Signatures do not include a timestamp,
|
|
2641
|
-
* but you can include a timestamp in the signed message to help you detect when its time to
|
|
2642
|
-
* refresh the signature. </p>
|
|
2643
|
-
* </note>
|
|
2644
|
-
* <p>To verify the signature that this operation generates, use the <a>Verify</a>
|
|
2645
|
-
* operation. Or use the <a>GetPublicKey</a> operation to download the public key and
|
|
2646
|
-
* then use the public key to verify the signature outside of KMS. </p>
|
|
2647
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
2648
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2649
|
-
* <p>
|
|
2650
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
2651
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
2652
|
-
* <p>
|
|
2653
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Sign</a> (key policy)</p>
|
|
2654
|
-
* <p>
|
|
2655
|
-
* <b>Related operations</b>: <a>Verify</a>
|
|
2656
|
-
* </p>
|
|
301
|
+
* @see {@link SignCommand}
|
|
2657
302
|
*/
|
|
2658
303
|
sign(args: SignCommandInput, options?: __HttpHandlerOptions): Promise<SignCommandOutput>;
|
|
2659
304
|
sign(args: SignCommandInput, cb: (err: any, data?: SignCommandOutput) => void): void;
|
|
2660
305
|
sign(args: SignCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SignCommandOutput) => void): void;
|
|
2661
306
|
/**
|
|
2662
|
-
* @
|
|
2663
|
-
* <p>Adds or edits tags on a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>.</p>
|
|
2664
|
-
* <note>
|
|
2665
|
-
* <p>Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">ABAC for KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2666
|
-
* </note>
|
|
2667
|
-
* <p>Each tag consists of a tag key and a tag value, both of which are case-sensitive strings.
|
|
2668
|
-
* The tag value can be an empty (null) string. To add a tag, specify a new tag key and a tag
|
|
2669
|
-
* value. To edit a tag, specify an existing tag key and a new tag value.</p>
|
|
2670
|
-
* <p>You can use this operation to tag a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>, but you cannot
|
|
2671
|
-
* tag an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services
|
|
2672
|
-
* managed key</a>, an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned key</a>, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#keystore-concept">custom key
|
|
2673
|
-
* store</a>, or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#alias-concept">alias</a>.</p>
|
|
2674
|
-
* <p>You can also add tags to a KMS key while creating it (<a>CreateKey</a>) or
|
|
2675
|
-
* replicating it (<a>ReplicateKey</a>).</p>
|
|
2676
|
-
* <p>For information about using tags in KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging keys</a>. For general information about
|
|
2677
|
-
* tags, including the format and syntax, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon
|
|
2678
|
-
* Web Services General Reference</i>. </p>
|
|
2679
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
2680
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2681
|
-
* <p>
|
|
2682
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account. </p>
|
|
2683
|
-
* <p>
|
|
2684
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:TagResource</a> (key policy)</p>
|
|
2685
|
-
* <p>
|
|
2686
|
-
* <b>Related operations</b>
|
|
2687
|
-
* </p>
|
|
2688
|
-
* <ul>
|
|
2689
|
-
* <li>
|
|
2690
|
-
* <p>
|
|
2691
|
-
* <a>CreateKey</a>
|
|
2692
|
-
* </p>
|
|
2693
|
-
* </li>
|
|
2694
|
-
* <li>
|
|
2695
|
-
* <p>
|
|
2696
|
-
* <a>ListResourceTags</a>
|
|
2697
|
-
* </p>
|
|
2698
|
-
* </li>
|
|
2699
|
-
* <li>
|
|
2700
|
-
* <p>
|
|
2701
|
-
* <a>ReplicateKey</a>
|
|
2702
|
-
* </p>
|
|
2703
|
-
* </li>
|
|
2704
|
-
* <li>
|
|
2705
|
-
* <p>
|
|
2706
|
-
* <a>UntagResource</a>
|
|
2707
|
-
* </p>
|
|
2708
|
-
* </li>
|
|
2709
|
-
* </ul>
|
|
307
|
+
* @see {@link TagResourceCommand}
|
|
2710
308
|
*/
|
|
2711
309
|
tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
|
|
2712
310
|
tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
2713
311
|
tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
2714
312
|
/**
|
|
2715
|
-
* @
|
|
2716
|
-
* <p>Deletes tags from a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>. To delete a tag,
|
|
2717
|
-
* specify the tag key and the KMS key.</p>
|
|
2718
|
-
* <note>
|
|
2719
|
-
* <p>Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">ABAC for KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2720
|
-
* </note>
|
|
2721
|
-
* <p>When it succeeds, the <code>UntagResource</code> operation doesn't return any output.
|
|
2722
|
-
* Also, if the specified tag key isn't found on the KMS key, it doesn't throw an exception or
|
|
2723
|
-
* return a response. To confirm that the operation worked, use the <a>ListResourceTags</a> operation.</p>
|
|
2724
|
-
* <p>For information about using tags in KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging keys</a>. For general information about
|
|
2725
|
-
* tags, including the format and syntax, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon
|
|
2726
|
-
* Web Services General Reference</i>. </p>
|
|
2727
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
2728
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2729
|
-
* <p>
|
|
2730
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
|
2731
|
-
* <p>
|
|
2732
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UntagResource</a> (key policy)</p>
|
|
2733
|
-
* <p>
|
|
2734
|
-
* <b>Related operations</b>
|
|
2735
|
-
* </p>
|
|
2736
|
-
* <ul>
|
|
2737
|
-
* <li>
|
|
2738
|
-
* <p>
|
|
2739
|
-
* <a>CreateKey</a>
|
|
2740
|
-
* </p>
|
|
2741
|
-
* </li>
|
|
2742
|
-
* <li>
|
|
2743
|
-
* <p>
|
|
2744
|
-
* <a>ListResourceTags</a>
|
|
2745
|
-
* </p>
|
|
2746
|
-
* </li>
|
|
2747
|
-
* <li>
|
|
2748
|
-
* <p>
|
|
2749
|
-
* <a>ReplicateKey</a>
|
|
2750
|
-
* </p>
|
|
2751
|
-
* </li>
|
|
2752
|
-
* <li>
|
|
2753
|
-
* <p>
|
|
2754
|
-
* <a>TagResource</a>
|
|
2755
|
-
* </p>
|
|
2756
|
-
* </li>
|
|
2757
|
-
* </ul>
|
|
313
|
+
* @see {@link UntagResourceCommand}
|
|
2758
314
|
*/
|
|
2759
315
|
untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
|
|
2760
316
|
untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
2761
317
|
untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
2762
318
|
/**
|
|
2763
|
-
* @
|
|
2764
|
-
* <p>Associates an existing KMS alias with a different KMS key. Each alias is associated with
|
|
2765
|
-
* only one KMS key at a time, although a KMS key can have multiple aliases. The alias and the
|
|
2766
|
-
* KMS key must be in the same Amazon Web Services account and Region.</p>
|
|
2767
|
-
* <note>
|
|
2768
|
-
* <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">ABAC for KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2769
|
-
* </note>
|
|
2770
|
-
* <p>The current and new KMS key must be the same type (both symmetric or both asymmetric or
|
|
2771
|
-
* both HMAC), and they must have the same key usage. This restriction prevents errors in code
|
|
2772
|
-
* that uses aliases. If you must assign an alias to a different type of KMS key, use <a>DeleteAlias</a> to delete the old alias and <a>CreateAlias</a> to create
|
|
2773
|
-
* a new alias.</p>
|
|
2774
|
-
* <p>You cannot use <code>UpdateAlias</code> to change an alias name. To change an alias name,
|
|
2775
|
-
* use <a>DeleteAlias</a> to delete the old alias and <a>CreateAlias</a> to
|
|
2776
|
-
* create a new alias.</p>
|
|
2777
|
-
* <p>Because an alias is not a property of a KMS key, you can create, update, and delete the
|
|
2778
|
-
* aliases of a KMS key without affecting the KMS key. Also, aliases do not appear in the
|
|
2779
|
-
* response from the <a>DescribeKey</a> operation. To get the aliases of all KMS keys
|
|
2780
|
-
* in the account, use the <a>ListAliases</a> operation. </p>
|
|
2781
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
2782
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2783
|
-
* <p>
|
|
2784
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account. </p>
|
|
2785
|
-
* <p>
|
|
2786
|
-
* <b>Required permissions</b>
|
|
2787
|
-
* </p>
|
|
2788
|
-
* <ul>
|
|
2789
|
-
* <li>
|
|
2790
|
-
* <p>
|
|
2791
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on
|
|
2792
|
-
* the alias (IAM policy).</p>
|
|
2793
|
-
* </li>
|
|
2794
|
-
* <li>
|
|
2795
|
-
* <p>
|
|
2796
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on
|
|
2797
|
-
* the current KMS key (key policy).</p>
|
|
2798
|
-
* </li>
|
|
2799
|
-
* <li>
|
|
2800
|
-
* <p>
|
|
2801
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on
|
|
2802
|
-
* the new KMS key (key policy).</p>
|
|
2803
|
-
* </li>
|
|
2804
|
-
* </ul>
|
|
2805
|
-
* <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the
|
|
2806
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
2807
|
-
* <p>
|
|
2808
|
-
* <b>Related operations:</b>
|
|
2809
|
-
* </p>
|
|
2810
|
-
* <ul>
|
|
2811
|
-
* <li>
|
|
2812
|
-
* <p>
|
|
2813
|
-
* <a>CreateAlias</a>
|
|
2814
|
-
* </p>
|
|
2815
|
-
* </li>
|
|
2816
|
-
* <li>
|
|
2817
|
-
* <p>
|
|
2818
|
-
* <a>DeleteAlias</a>
|
|
2819
|
-
* </p>
|
|
2820
|
-
* </li>
|
|
2821
|
-
* <li>
|
|
2822
|
-
* <p>
|
|
2823
|
-
* <a>ListAliases</a>
|
|
2824
|
-
* </p>
|
|
2825
|
-
* </li>
|
|
2826
|
-
* </ul>
|
|
319
|
+
* @see {@link UpdateAliasCommand}
|
|
2827
320
|
*/
|
|
2828
321
|
updateAlias(args: UpdateAliasCommandInput, options?: __HttpHandlerOptions): Promise<UpdateAliasCommandOutput>;
|
|
2829
322
|
updateAlias(args: UpdateAliasCommandInput, cb: (err: any, data?: UpdateAliasCommandOutput) => void): void;
|
|
2830
323
|
updateAlias(args: UpdateAliasCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateAliasCommandOutput) => void): void;
|
|
2831
324
|
/**
|
|
2832
|
-
* @
|
|
2833
|
-
* <p>Changes the properties of a custom key store. You can use this operation to change the
|
|
2834
|
-
* properties of an CloudHSM key store or an external key store.</p>
|
|
2835
|
-
* <p>Use the required <code>CustomKeyStoreId</code> parameter to identify the custom key store.
|
|
2836
|
-
* Use the remaining optional parameters to change its properties. This operation does not return
|
|
2837
|
-
* any property values. To verify the updated property values, use the <a>DescribeCustomKeyStores</a> operation.</p>
|
|
2838
|
-
* <p> This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> feature in KMS, which
|
|
2839
|
-
* combines the convenience and extensive integration of KMS with the isolation and control of a
|
|
2840
|
-
* key store that you own and manage.</p>
|
|
2841
|
-
* <important>
|
|
2842
|
-
* <p>When updating the properties of an external key store, verify that the updated settings
|
|
2843
|
-
* connect your key store, via the external key store proxy, to the same external key manager
|
|
2844
|
-
* as the previous settings, or to a backup or snapshot of the external key manager with the
|
|
2845
|
-
* same cryptographic keys. If the updated connection settings fail, you can fix them and
|
|
2846
|
-
* retry, although an extended delay might disrupt Amazon Web Services services. However, if KMS
|
|
2847
|
-
* permanently loses its access to cryptographic keys, ciphertext encrypted under those keys is
|
|
2848
|
-
* unrecoverable.</p>
|
|
2849
|
-
* </important>
|
|
2850
|
-
* <note>
|
|
2851
|
-
* <p>For external key stores:</p>
|
|
2852
|
-
* <p>Some external key managers provide a simpler method for updating an external key store.
|
|
2853
|
-
* For details, see your external key manager documentation.</p>
|
|
2854
|
-
* <p>When updating an external key store in the KMS console, you can upload a JSON-based
|
|
2855
|
-
* proxy configuration file with the desired values. You cannot upload the proxy configuration
|
|
2856
|
-
* file to the <code>UpdateCustomKeyStore</code> operation. However, you can use the file to
|
|
2857
|
-
* help you determine the correct values for the <code>UpdateCustomKeyStore</code>
|
|
2858
|
-
* parameters.</p>
|
|
2859
|
-
* </note>
|
|
2860
|
-
* <p>For an CloudHSM key store, you can use this operation to change the custom key store friendly
|
|
2861
|
-
* name (<code>NewCustomKeyStoreName</code>), to tell KMS about a change to the
|
|
2862
|
-
* <code>kmsuser</code> crypto user password (<code>KeyStorePassword</code>), or to associate
|
|
2863
|
-
* the custom key store with a different, but related, CloudHSM cluster
|
|
2864
|
-
* (<code>CloudHsmClusterId</code>). To update any property of an CloudHSM key store, the
|
|
2865
|
-
* <code>ConnectionState</code> of the CloudHSM key store must be <code>DISCONNECTED</code>. </p>
|
|
2866
|
-
* <p>For an external key store, you can use this operation to change the custom key store
|
|
2867
|
-
* friendly name (<code>NewCustomKeyStoreName</code>), or to tell KMS about a change to the
|
|
2868
|
-
* external key store proxy authentication credentials
|
|
2869
|
-
* (<code>XksProxyAuthenticationCredential</code>), connection method
|
|
2870
|
-
* (<code>XksProxyConnectivity</code>), external proxy endpoint
|
|
2871
|
-
* (<code>XksProxyUriEndpoint</code>) and path (<code>XksProxyUriPath</code>). For external key
|
|
2872
|
-
* stores with an <code>XksProxyConnectivity</code> of <code>VPC_ENDPOINT_SERVICE</code>, you can
|
|
2873
|
-
* also update the Amazon VPC endpoint service name (<code>XksProxyVpcEndpointServiceName</code>). To
|
|
2874
|
-
* update most properties of an external key store, the <code>ConnectionState</code> of the
|
|
2875
|
-
* external key store must be <code>DISCONNECTED</code>. However, you can update the
|
|
2876
|
-
* <code>CustomKeyStoreName</code>, <code>XksProxyAuthenticationCredential</code>, and
|
|
2877
|
-
* <code>XksProxyUriPath</code> of an external key store when it is in the CONNECTED or
|
|
2878
|
-
* DISCONNECTED state. </p>
|
|
2879
|
-
* <p>If your update requires a <code>DISCONNECTED</code> state, before using
|
|
2880
|
-
* <code>UpdateCustomKeyStore</code>, use the <a>DisconnectCustomKeyStore</a>
|
|
2881
|
-
* operation to disconnect the custom key store. After the <code>UpdateCustomKeyStore</code>
|
|
2882
|
-
* operation completes, use the <a>ConnectCustomKeyStore</a> to reconnect the custom
|
|
2883
|
-
* key store. To find the <code>ConnectionState</code> of the custom key store, use the <a>DescribeCustomKeyStores</a> operation. </p>
|
|
2884
|
-
* <p>
|
|
2885
|
-
* </p>
|
|
2886
|
-
* <p>Before updating the custom key store, verify that the new values allow KMS to connect
|
|
2887
|
-
* the custom key store to its backing key store. For example, before you change the
|
|
2888
|
-
* <code>XksProxyUriPath</code> value, verify that the external key store proxy is reachable at
|
|
2889
|
-
* the new path.</p>
|
|
2890
|
-
* <p>If the operation succeeds, it returns a JSON object with no
|
|
2891
|
-
* properties.</p>
|
|
2892
|
-
* <p>
|
|
2893
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
|
|
2894
|
-
* <p>
|
|
2895
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateCustomKeyStore</a> (IAM policy)</p>
|
|
2896
|
-
* <p>
|
|
2897
|
-
* <b>Related operations:</b>
|
|
2898
|
-
* </p>
|
|
2899
|
-
* <ul>
|
|
2900
|
-
* <li>
|
|
2901
|
-
* <p>
|
|
2902
|
-
* <a>ConnectCustomKeyStore</a>
|
|
2903
|
-
* </p>
|
|
2904
|
-
* </li>
|
|
2905
|
-
* <li>
|
|
2906
|
-
* <p>
|
|
2907
|
-
* <a>CreateCustomKeyStore</a>
|
|
2908
|
-
* </p>
|
|
2909
|
-
* </li>
|
|
2910
|
-
* <li>
|
|
2911
|
-
* <p>
|
|
2912
|
-
* <a>DeleteCustomKeyStore</a>
|
|
2913
|
-
* </p>
|
|
2914
|
-
* </li>
|
|
2915
|
-
* <li>
|
|
2916
|
-
* <p>
|
|
2917
|
-
* <a>DescribeCustomKeyStores</a>
|
|
2918
|
-
* </p>
|
|
2919
|
-
* </li>
|
|
2920
|
-
* <li>
|
|
2921
|
-
* <p>
|
|
2922
|
-
* <a>DisconnectCustomKeyStore</a>
|
|
2923
|
-
* </p>
|
|
2924
|
-
* </li>
|
|
2925
|
-
* </ul>
|
|
325
|
+
* @see {@link UpdateCustomKeyStoreCommand}
|
|
2926
326
|
*/
|
|
2927
327
|
updateCustomKeyStore(args: UpdateCustomKeyStoreCommandInput, options?: __HttpHandlerOptions): Promise<UpdateCustomKeyStoreCommandOutput>;
|
|
2928
328
|
updateCustomKeyStore(args: UpdateCustomKeyStoreCommandInput, cb: (err: any, data?: UpdateCustomKeyStoreCommandOutput) => void): void;
|
|
2929
329
|
updateCustomKeyStore(args: UpdateCustomKeyStoreCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateCustomKeyStoreCommandOutput) => void): void;
|
|
2930
330
|
/**
|
|
2931
|
-
* @
|
|
2932
|
-
* <p>Updates the description of a KMS key. To see the description of a KMS key, use <a>DescribeKey</a>. </p>
|
|
2933
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
2934
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2935
|
-
* <p>
|
|
2936
|
-
* <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account. </p>
|
|
2937
|
-
* <p>
|
|
2938
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateKeyDescription</a> (key policy)</p>
|
|
2939
|
-
* <p>
|
|
2940
|
-
* <b>Related operations</b>
|
|
2941
|
-
* </p>
|
|
2942
|
-
* <ul>
|
|
2943
|
-
* <li>
|
|
2944
|
-
* <p>
|
|
2945
|
-
* <a>CreateKey</a>
|
|
2946
|
-
* </p>
|
|
2947
|
-
* </li>
|
|
2948
|
-
* <li>
|
|
2949
|
-
* <p>
|
|
2950
|
-
* <a>DescribeKey</a>
|
|
2951
|
-
* </p>
|
|
2952
|
-
* </li>
|
|
2953
|
-
* </ul>
|
|
331
|
+
* @see {@link UpdateKeyDescriptionCommand}
|
|
2954
332
|
*/
|
|
2955
333
|
updateKeyDescription(args: UpdateKeyDescriptionCommandInput, options?: __HttpHandlerOptions): Promise<UpdateKeyDescriptionCommandOutput>;
|
|
2956
334
|
updateKeyDescription(args: UpdateKeyDescriptionCommandInput, cb: (err: any, data?: UpdateKeyDescriptionCommandOutput) => void): void;
|
|
2957
335
|
updateKeyDescription(args: UpdateKeyDescriptionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateKeyDescriptionCommandOutput) => void): void;
|
|
2958
336
|
/**
|
|
2959
|
-
* @
|
|
2960
|
-
* <p>Changes the primary key of a multi-Region key. </p>
|
|
2961
|
-
* <p>This operation changes the replica key in the specified Region to a primary key and
|
|
2962
|
-
* changes the former primary key to a replica key. For example, suppose you have a primary key
|
|
2963
|
-
* in <code>us-east-1</code> and a replica key in <code>eu-west-2</code>. If you run
|
|
2964
|
-
* <code>UpdatePrimaryRegion</code> with a <code>PrimaryRegion</code> value of
|
|
2965
|
-
* <code>eu-west-2</code>, the primary key is now the key in <code>eu-west-2</code>, and the
|
|
2966
|
-
* key in <code>us-east-1</code> becomes a replica key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-update">Updating the primary Region</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2967
|
-
* <p>This operation supports <i>multi-Region keys</i>, an KMS feature that lets you create multiple
|
|
2968
|
-
* interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key
|
|
2969
|
-
* material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt
|
|
2970
|
-
* it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Multi-Region keys in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2971
|
-
* <p>The <i>primary key</i> of a multi-Region key is the source for properties
|
|
2972
|
-
* that are always shared by primary and replica keys, including the key material, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id">key ID</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec">key spec</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage">key usage</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin">key material
|
|
2973
|
-
* origin</a>, and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic
|
|
2974
|
-
* key rotation</a>. It's the only key that can be replicated. You cannot <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html">delete the primary
|
|
2975
|
-
* key</a> until all replica keys are deleted.</p>
|
|
2976
|
-
* <p>The key ID and primary Region that you specify uniquely identify the replica key that will
|
|
2977
|
-
* become the primary key. The primary Region must already have a replica key. This operation
|
|
2978
|
-
* does not create a KMS key in the specified Region. To find the replica keys, use the <a>DescribeKey</a> operation on the primary key or any replica key. To create a replica
|
|
2979
|
-
* key, use the <a>ReplicateKey</a> operation.</p>
|
|
2980
|
-
* <p>You can run this operation while using the affected multi-Region keys in cryptographic
|
|
2981
|
-
* operations. This operation should not delay, interrupt, or cause failures in cryptographic
|
|
2982
|
-
* operations. </p>
|
|
2983
|
-
* <p>Even after this operation completes, the process of updating the primary Region might
|
|
2984
|
-
* still be in progress for a few more seconds. Operations such as <code>DescribeKey</code> might
|
|
2985
|
-
* display both the old and new primary keys as replicas. The old and new primary keys have a
|
|
2986
|
-
* transient key state of <code>Updating</code>. The original key state is restored when the
|
|
2987
|
-
* update is complete. While the key state is <code>Updating</code>, you can use the keys in
|
|
2988
|
-
* cryptographic operations, but you cannot replicate the new primary key or perform certain
|
|
2989
|
-
* management operations, such as enabling or disabling these keys. For details about the
|
|
2990
|
-
* <code>Updating</code> key state, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
2991
|
-
* <p>This operation does not return any output. To verify that primary key is changed, use the
|
|
2992
|
-
* <a>DescribeKey</a> operation.</p>
|
|
2993
|
-
* <p>
|
|
2994
|
-
* <b>Cross-account use</b>: No. You cannot use this operation in a
|
|
2995
|
-
* different Amazon Web Services account. </p>
|
|
2996
|
-
* <p>
|
|
2997
|
-
* <b>Required permissions</b>: </p>
|
|
2998
|
-
* <ul>
|
|
2999
|
-
* <li>
|
|
3000
|
-
* <p>
|
|
3001
|
-
* <code>kms:UpdatePrimaryRegion</code> on the current primary key (in the primary key's
|
|
3002
|
-
* Region). Include this permission primary key's key policy.</p>
|
|
3003
|
-
* </li>
|
|
3004
|
-
* <li>
|
|
3005
|
-
* <p>
|
|
3006
|
-
* <code>kms:UpdatePrimaryRegion</code> on the current replica key (in the replica key's
|
|
3007
|
-
* Region). Include this permission in the replica key's key policy.</p>
|
|
3008
|
-
* </li>
|
|
3009
|
-
* </ul>
|
|
3010
|
-
* <p>
|
|
3011
|
-
* <b>Related operations</b>
|
|
3012
|
-
* </p>
|
|
3013
|
-
* <ul>
|
|
3014
|
-
* <li>
|
|
3015
|
-
* <p>
|
|
3016
|
-
* <a>CreateKey</a>
|
|
3017
|
-
* </p>
|
|
3018
|
-
* </li>
|
|
3019
|
-
* <li>
|
|
3020
|
-
* <p>
|
|
3021
|
-
* <a>ReplicateKey</a>
|
|
3022
|
-
* </p>
|
|
3023
|
-
* </li>
|
|
3024
|
-
* </ul>
|
|
337
|
+
* @see {@link UpdatePrimaryRegionCommand}
|
|
3025
338
|
*/
|
|
3026
339
|
updatePrimaryRegion(args: UpdatePrimaryRegionCommandInput, options?: __HttpHandlerOptions): Promise<UpdatePrimaryRegionCommandOutput>;
|
|
3027
340
|
updatePrimaryRegion(args: UpdatePrimaryRegionCommandInput, cb: (err: any, data?: UpdatePrimaryRegionCommandOutput) => void): void;
|
|
3028
341
|
updatePrimaryRegion(args: UpdatePrimaryRegionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdatePrimaryRegionCommandOutput) => void): void;
|
|
3029
342
|
/**
|
|
3030
|
-
* @
|
|
3031
|
-
* <p>Verifies a digital signature that was generated by the <a>Sign</a> operation. </p>
|
|
3032
|
-
* <p></p>
|
|
3033
|
-
* <p>Verification confirms that an authorized user signed the message with the specified KMS
|
|
3034
|
-
* key and signing algorithm, and the message hasn't changed since it was signed. If the
|
|
3035
|
-
* signature is verified, the value of the <code>SignatureValid</code> field in the response is
|
|
3036
|
-
* <code>True</code>. If the signature verification fails, the <code>Verify</code> operation
|
|
3037
|
-
* fails with an <code>KMSInvalidSignatureException</code> exception.</p>
|
|
3038
|
-
* <p>A digital signature is generated by using the private key in an asymmetric KMS key. The
|
|
3039
|
-
* signature is verified by using the public key in the same asymmetric KMS key.
|
|
3040
|
-
* For information about asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
3041
|
-
* <p>To use the <code>Verify</code> operation, specify the
|
|
3042
|
-
* same asymmetric KMS key, message, and signing algorithm that were used to produce the
|
|
3043
|
-
* signature. The message type does not need to be the same as the one used for signing, but it must
|
|
3044
|
-
* indicate whether the value of the <code>Message</code> parameter should be
|
|
3045
|
-
* hashed as part of the verification process.</p>
|
|
3046
|
-
* <p>You can also verify the digital signature by using the public key of the KMS key outside
|
|
3047
|
-
* of KMS. Use the <a>GetPublicKey</a> operation to download the public key in the
|
|
3048
|
-
* asymmetric KMS key and then use the public key to verify the signature outside of KMS. The
|
|
3049
|
-
* advantage of using the <code>Verify</code> operation is that it is performed within KMS. As
|
|
3050
|
-
* a result, it's easy to call, the operation is performed within the FIPS boundary, it is logged
|
|
3051
|
-
* in CloudTrail, and you can use key policy and IAM policy to determine who is authorized to use
|
|
3052
|
-
* the KMS key to verify signatures.</p>
|
|
3053
|
-
* <p>To verify a signature outside of KMS with an SM2 public key (China Regions only), you must
|
|
3054
|
-
* specify the distinguishing ID. By default, KMS uses <code>1234567812345678</code> as the
|
|
3055
|
-
* distinguishing ID. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification">Offline verification
|
|
3056
|
-
* with SM2 key pairs</a>.</p>
|
|
3057
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
3058
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
3059
|
-
* <p>
|
|
3060
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
3061
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter. </p>
|
|
3062
|
-
* <p>
|
|
3063
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Verify</a> (key policy)</p>
|
|
3064
|
-
* <p>
|
|
3065
|
-
* <b>Related operations</b>: <a>Sign</a>
|
|
3066
|
-
* </p>
|
|
343
|
+
* @see {@link VerifyCommand}
|
|
3067
344
|
*/
|
|
3068
345
|
verify(args: VerifyCommandInput, options?: __HttpHandlerOptions): Promise<VerifyCommandOutput>;
|
|
3069
346
|
verify(args: VerifyCommandInput, cb: (err: any, data?: VerifyCommandOutput) => void): void;
|
|
3070
347
|
verify(args: VerifyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyCommandOutput) => void): void;
|
|
3071
348
|
/**
|
|
3072
|
-
* @
|
|
3073
|
-
* <p>Verifies the hash-based message authentication code (HMAC) for a specified message, HMAC
|
|
3074
|
-
* KMS key, and MAC algorithm. To verify the HMAC, <code>VerifyMac</code> computes an HMAC using
|
|
3075
|
-
* the message, HMAC KMS key, and MAC algorithm that you specify, and compares the computed HMAC
|
|
3076
|
-
* to the HMAC that you specify. If the HMACs are identical, the verification succeeds;
|
|
3077
|
-
* otherwise, it fails. Verification indicates that the message hasn't changed since the HMAC was
|
|
3078
|
-
* calculated, and the specified key was used to generate and verify the HMAC.</p>
|
|
3079
|
-
* <p>HMAC KMS keys and the HMAC algorithms that KMS uses conform to industry standards
|
|
3080
|
-
* defined in <a href="https://datatracker.ietf.org/doc/html/rfc2104">RFC 2104</a>.</p>
|
|
3081
|
-
* <p>This operation is part of KMS support for HMAC KMS keys. For details, see
|
|
3082
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC keys in KMS</a> in the
|
|
3083
|
-
* <i>Key Management Service Developer Guide</i>.</p>
|
|
3084
|
-
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
3085
|
-
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
3086
|
-
* <p>
|
|
3087
|
-
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
3088
|
-
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter. </p>
|
|
3089
|
-
* <p>
|
|
3090
|
-
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:VerifyMac</a> (key policy)</p>
|
|
3091
|
-
* <p>
|
|
3092
|
-
* <b>Related operations</b>: <a>GenerateMac</a>
|
|
3093
|
-
* </p>
|
|
349
|
+
* @see {@link VerifyMacCommand}
|
|
3094
350
|
*/
|
|
3095
351
|
verifyMac(args: VerifyMacCommandInput, options?: __HttpHandlerOptions): Promise<VerifyMacCommandOutput>;
|
|
3096
352
|
verifyMac(args: VerifyMacCommandInput, cb: (err: any, data?: VerifyMacCommandOutput) => void): void;
|
|
3097
353
|
verifyMac(args: VerifyMacCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyMacCommandOutput) => void): void;
|
|
3098
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* @public
|
|
357
|
+
* <fullname>Key Management Service</fullname>
|
|
358
|
+
* <p>Key Management Service (KMS) is an encryption and key management web service. This guide describes
|
|
359
|
+
* the KMS operations that you can call programmatically. For general information about KMS,
|
|
360
|
+
* see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/">
|
|
361
|
+
* <i>Key Management Service Developer Guide</i>
|
|
362
|
+
* </a>.</p>
|
|
363
|
+
* <note>
|
|
364
|
+
* <p>KMS has replaced the term <i>customer master key (CMK)</i> with <i>KMS key</i> and <i>KMS key</i>. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.</p>
|
|
365
|
+
* <p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
|
|
366
|
+
* languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a
|
|
367
|
+
* convenient way to create programmatic access to KMS and other Amazon Web Services services. For example,
|
|
368
|
+
* the SDKs take care of tasks such as signing requests (see below), managing errors, and
|
|
369
|
+
* retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to
|
|
370
|
+
* download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web
|
|
371
|
+
* Services</a>.</p>
|
|
372
|
+
* </note>
|
|
373
|
+
* <p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.</p>
|
|
374
|
+
* <p>If you need to use FIPS 140-2 validated cryptographic modules when communicating with
|
|
375
|
+
* Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the
|
|
376
|
+
* available FIPS endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service endpoints</a> in the Key Management Service topic of
|
|
377
|
+
* the <i>Amazon Web Services General Reference</i>.</p>
|
|
378
|
+
* <p>All KMS API calls must be signed and be transmitted using Transport Layer Security
|
|
379
|
+
* (TLS). KMS recommends you always use the latest supported TLS version. Clients must also
|
|
380
|
+
* support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral Diffie-Hellman
|
|
381
|
+
* (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7
|
|
382
|
+
* and later support these modes.</p>
|
|
383
|
+
* <p>
|
|
384
|
+
* <b>Signing Requests</b>
|
|
385
|
+
* </p>
|
|
386
|
+
* <p>Requests must be signed using an access key ID and a secret access key. We strongly
|
|
387
|
+
* recommend that you do not use your Amazon Web Services account root access key ID and secret access key for
|
|
388
|
+
* everyday work. You can use the access key ID and secret access key for an IAM user or you
|
|
389
|
+
* can use the Security Token Service (STS) to generate temporary security credentials and use those to sign
|
|
390
|
+
* requests. </p>
|
|
391
|
+
* <p>All KMS requests must be signed with <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4</a>.</p>
|
|
392
|
+
* <p>
|
|
393
|
+
* <b>Logging API Requests</b>
|
|
394
|
+
* </p>
|
|
395
|
+
* <p>KMS supports CloudTrail, a service that logs Amazon Web Services API calls and related events for your
|
|
396
|
+
* Amazon Web Services account and delivers them to an Amazon S3 bucket that you specify. By using the
|
|
397
|
+
* information collected by CloudTrail, you can determine what requests were made to KMS, who made
|
|
398
|
+
* the request, when it was made, and so on. To learn more about CloudTrail, including how to turn it
|
|
399
|
+
* on and find your log files, see the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/">CloudTrail User Guide</a>.</p>
|
|
400
|
+
* <p>
|
|
401
|
+
* <b>Additional Resources</b>
|
|
402
|
+
* </p>
|
|
403
|
+
* <p>For more information about credentials and request signing, see the following:</p>
|
|
404
|
+
* <ul>
|
|
405
|
+
* <li>
|
|
406
|
+
* <p>
|
|
407
|
+
* <a href="https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html">Amazon Web Services
|
|
408
|
+
* Security Credentials</a> - This topic provides general information about the types
|
|
409
|
+
* of credentials used to access Amazon Web Services.</p>
|
|
410
|
+
* </li>
|
|
411
|
+
* <li>
|
|
412
|
+
* <p>
|
|
413
|
+
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary
|
|
414
|
+
* Security Credentials</a> - This section of the <i>IAM User Guide</i>
|
|
415
|
+
* describes how to create and use temporary security credentials.</p>
|
|
416
|
+
* </li>
|
|
417
|
+
* <li>
|
|
418
|
+
* <p>
|
|
419
|
+
* <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version
|
|
420
|
+
* 4 Signing Process</a> - This set of topics walks you through the process of signing
|
|
421
|
+
* a request using an access key ID and a secret access key.</p>
|
|
422
|
+
* </li>
|
|
423
|
+
* </ul>
|
|
424
|
+
* <p>
|
|
425
|
+
* <b>Commonly Used API Operations</b>
|
|
426
|
+
* </p>
|
|
427
|
+
* <p>Of the API operations discussed in this guide, the following will prove the most useful
|
|
428
|
+
* for most applications. You will likely perform operations other than these, such as creating
|
|
429
|
+
* keys and assigning policies, by using the console.</p>
|
|
430
|
+
* <ul>
|
|
431
|
+
* <li>
|
|
432
|
+
* <p>
|
|
433
|
+
* <a>Encrypt</a>
|
|
434
|
+
* </p>
|
|
435
|
+
* </li>
|
|
436
|
+
* <li>
|
|
437
|
+
* <p>
|
|
438
|
+
* <a>Decrypt</a>
|
|
439
|
+
* </p>
|
|
440
|
+
* </li>
|
|
441
|
+
* <li>
|
|
442
|
+
* <p>
|
|
443
|
+
* <a>GenerateDataKey</a>
|
|
444
|
+
* </p>
|
|
445
|
+
* </li>
|
|
446
|
+
* <li>
|
|
447
|
+
* <p>
|
|
448
|
+
* <a>GenerateDataKeyWithoutPlaintext</a>
|
|
449
|
+
* </p>
|
|
450
|
+
* </li>
|
|
451
|
+
* </ul>
|
|
452
|
+
*/
|
|
453
|
+
export declare class KMS extends KMSClient implements KMS {
|
|
454
|
+
}
|