@aws-sdk/client-kms 3.288.0 → 3.290.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.
Files changed (51) hide show
  1. package/dist-types/commands/CancelKeyDeletionCommand.d.ts +51 -0
  2. package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +96 -0
  3. package/dist-types/commands/CreateAliasCommand.d.ts +54 -0
  4. package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +193 -0
  5. package/dist-types/commands/CreateGrantCommand.d.ts +67 -0
  6. package/dist-types/commands/CreateKeyCommand.d.ts +405 -0
  7. package/dist-types/commands/DecryptCommand.d.ts +94 -0
  8. package/dist-types/commands/DeleteAliasCommand.d.ts +42 -0
  9. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +62 -0
  10. package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +50 -0
  11. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +114 -0
  12. package/dist-types/commands/DescribeKeyCommand.d.ts +245 -0
  13. package/dist-types/commands/DisableKeyCommand.d.ts +46 -0
  14. package/dist-types/commands/DisableKeyRotationCommand.d.ts +53 -0
  15. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +56 -0
  16. package/dist-types/commands/EnableKeyCommand.d.ts +50 -0
  17. package/dist-types/commands/EnableKeyRotationCommand.d.ts +53 -0
  18. package/dist-types/commands/EncryptCommand.d.ts +80 -0
  19. package/dist-types/commands/GenerateDataKeyCommand.d.ts +81 -0
  20. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +87 -0
  21. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +86 -0
  22. package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +80 -0
  23. package/dist-types/commands/GenerateMacCommand.d.ts +78 -0
  24. package/dist-types/commands/GenerateRandomCommand.d.ts +69 -0
  25. package/dist-types/commands/GetKeyPolicyCommand.d.ts +52 -0
  26. package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +55 -0
  27. package/dist-types/commands/GetParametersForImportCommand.d.ts +60 -0
  28. package/dist-types/commands/GetPublicKeyCommand.d.ts +93 -0
  29. package/dist-types/commands/ImportKeyMaterialCommand.d.ts +73 -0
  30. package/dist-types/commands/ListAliasesCommand.d.ts +77 -0
  31. package/dist-types/commands/ListGrantsCommand.d.ts +111 -0
  32. package/dist-types/commands/ListKeyPoliciesCommand.d.ts +54 -0
  33. package/dist-types/commands/ListKeysCommand.d.ts +57 -0
  34. package/dist-types/commands/ListResourceTagsCommand.d.ts +47 -0
  35. package/dist-types/commands/ListRetirableGrantsCommand.d.ts +51 -0
  36. package/dist-types/commands/PutKeyPolicyCommand.d.ts +60 -0
  37. package/dist-types/commands/ReEncryptCommand.d.ts +95 -0
  38. package/dist-types/commands/ReplicateKeyCommand.d.ts +101 -0
  39. package/dist-types/commands/RetireGrantCommand.d.ts +53 -0
  40. package/dist-types/commands/RevokeGrantCommand.d.ts +50 -0
  41. package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +53 -0
  42. package/dist-types/commands/SignCommand.d.ts +104 -0
  43. package/dist-types/commands/TagResourceCommand.d.ts +55 -0
  44. package/dist-types/commands/UntagResourceCommand.d.ts +49 -0
  45. package/dist-types/commands/UpdateAliasCommand.d.ts +47 -0
  46. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +234 -0
  47. package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +47 -0
  48. package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +54 -0
  49. package/dist-types/commands/VerifyCommand.d.ts +111 -0
  50. package/dist-types/commands/VerifyMacCommand.d.ts +84 -0
  51. package/package.json +29 -29
@@ -57,6 +57,56 @@ export interface DeleteImportedKeyMaterialCommandOutput extends __MetadataBearer
57
57
  * @see {@link DeleteImportedKeyMaterialCommandOutput} for command's `response` shape.
58
58
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
59
59
  *
60
+ * @throws {@link DependencyTimeoutException} (server fault)
61
+ * <p>The system timed out while trying to fulfill the request. You can retry the
62
+ * request.</p>
63
+ *
64
+ * @throws {@link InvalidArnException} (client fault)
65
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
66
+ * valid.</p>
67
+ *
68
+ * @throws {@link KMSInternalException} (server fault)
69
+ * <p>The request was rejected because an internal exception occurred. The request can be
70
+ * retried.</p>
71
+ *
72
+ * @throws {@link KMSInvalidStateException} (client fault)
73
+ * <p>The request was rejected because the state of the specified resource is not valid for this
74
+ * request.</p>
75
+ * <p>This exceptions means one of the following:</p>
76
+ * <ul>
77
+ * <li>
78
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
79
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
80
+ * information about which key states are compatible with each KMS operation, see
81
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
82
+ * <i>Key Management Service Developer Guide</i>
83
+ * </i>.</p>
84
+ * </li>
85
+ * <li>
86
+ * <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
87
+ * </li>
88
+ * </ul>
89
+ *
90
+ * @throws {@link NotFoundException} (client fault)
91
+ * <p>The request was rejected because the specified entity or resource could not be
92
+ * found.</p>
93
+ *
94
+ * @throws {@link UnsupportedOperationException} (client fault)
95
+ * <p>The request was rejected because a specified parameter is not supported or a specified
96
+ * resource is not valid for this operation.</p>
97
+ *
98
+ *
99
+ * @example To delete imported key material
100
+ * ```javascript
101
+ * // The following example deletes the imported key material from the specified KMS key.
102
+ * const input = {
103
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
104
+ * };
105
+ * const command = new DeleteImportedKeyMaterialCommand(input);
106
+ * await client.send(command);
107
+ * // example id: to-delete-imported-key-material-1478561674507
108
+ * ```
109
+ *
60
110
  */
61
111
  export declare class DeleteImportedKeyMaterialCommand extends $Command<DeleteImportedKeyMaterialCommandInput, DeleteImportedKeyMaterialCommandOutput, KMSClientResolvedConfig> {
62
112
  readonly input: DeleteImportedKeyMaterialCommandInput;
@@ -87,6 +87,120 @@ export interface DescribeCustomKeyStoresCommandOutput extends DescribeCustomKeyS
87
87
  * @see {@link DescribeCustomKeyStoresCommandOutput} for command's `response` shape.
88
88
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
89
89
  *
90
+ * @throws {@link CustomKeyStoreNotFoundException} (client fault)
91
+ * <p>The request was rejected because KMS cannot find a custom key store with the specified
92
+ * key store name or ID.</p>
93
+ *
94
+ * @throws {@link InvalidMarkerException} (client fault)
95
+ * <p>The request was rejected because the marker that specifies where pagination should next
96
+ * begin is not valid.</p>
97
+ *
98
+ * @throws {@link KMSInternalException} (server fault)
99
+ * <p>The request was rejected because an internal exception occurred. The request can be
100
+ * retried.</p>
101
+ *
102
+ *
103
+ * @example To get detailed information about custom key stores in the account and Region
104
+ * ```javascript
105
+ * // This example gets detailed information about all AWS KMS custom key stores in an AWS account and Region. To get all key stores, do not enter a custom key store name or ID.
106
+ * const input = {};
107
+ * const command = new DescribeCustomKeyStoresCommand(input);
108
+ * const response = await client.send(command);
109
+ * /* response ==
110
+ * {
111
+ * "CustomKeyStores": []
112
+ * }
113
+ * *\/
114
+ * // example id: to-get-detailed-information-about-custom-key-stores-in-the-account-and-region-1
115
+ * ```
116
+ *
117
+ * @example To get detailed information about an AWS CloudHSM key store by specifying its friendly name
118
+ * ```javascript
119
+ * // This example gets detailed information about a particular AWS CloudHSM key store by specifying its friendly name. To limit the output to a particular custom key store, provide either the custom key store name or ID.
120
+ * const input = {
121
+ * "CustomKeyStoreName": "ExampleKeyStore"
122
+ * };
123
+ * const command = new DescribeCustomKeyStoresCommand(input);
124
+ * const response = await client.send(command);
125
+ * /* response ==
126
+ * {
127
+ * "CustomKeyStores": [
128
+ * {
129
+ * "CloudHsmClusterId": "cluster-1a23b4cdefg",
130
+ * "ConnectionState": "CONNECTED",
131
+ * "CreationDate": "1.499288695918E9",
132
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
133
+ * "CustomKeyStoreName": "ExampleKeyStore",
134
+ * "CustomKeyStoreType": "AWS_CLOUDHSM",
135
+ * "TrustAnchorCertificate": "<certificate appears here>"
136
+ * }
137
+ * ]
138
+ * }
139
+ * *\/
140
+ * // example id: to-get-detailed-information-about-a-cloudhsm-custom-key-store-by-name-2
141
+ * ```
142
+ *
143
+ * @example To get detailed information about an external key store by specifying its ID
144
+ * ```javascript
145
+ * // This example gets detailed information about an external key store by specifying its ID. The example external key store proxy uses public endpoint connectivity.
146
+ * const input = {
147
+ * "CustomKeyStoreId": "cks-9876543210fedcba9"
148
+ * };
149
+ * const command = new DescribeCustomKeyStoresCommand(input);
150
+ * const response = await client.send(command);
151
+ * /* response ==
152
+ * {
153
+ * "CustomKeyStores": [
154
+ * {
155
+ * "ConnectionState": "CONNECTED",
156
+ * "CreationDate": "1.599288695918E9",
157
+ * "CustomKeyStoreId": "cks-9876543210fedcba9",
158
+ * "CustomKeyStoreName": "ExampleExternalKeyStore",
159
+ * "CustomKeyStoreType": "EXTERNAL_KEY_STORE",
160
+ * "XksProxyConfiguration": {
161
+ * "AccessKeyId": "ABCDE12345670EXAMPLE",
162
+ * "Connectivity": "PUBLIC_ENDPOINT",
163
+ * "UriEndpoint": "https://myproxy.xks.example.com",
164
+ * "UriPath": "/kms/xks/v1"
165
+ * }
166
+ * }
167
+ * ]
168
+ * }
169
+ * *\/
170
+ * // example id: to-get-detailed-information-about-an-external-key-store--3
171
+ * ```
172
+ *
173
+ * @example To get detailed information about an external key store VPC endpoint connectivity by specifying its friendly name
174
+ * ```javascript
175
+ * // This example gets detailed information about a particular external key store by specifying its friendly name. To limit the output to a particular custom key store, provide either the custom key store name or ID. The proxy URI path for this external key store includes an optional prefix. Also, because this example external key store uses VPC endpoint connectivity, the response includes the associated VPC endpoint service name.
176
+ * const input = {
177
+ * "CustomKeyStoreName": "VPCExternalKeystore"
178
+ * };
179
+ * const command = new DescribeCustomKeyStoresCommand(input);
180
+ * const response = await client.send(command);
181
+ * /* response ==
182
+ * {
183
+ * "CustomKeyStores": [
184
+ * {
185
+ * "ConnectionState": "CONNECTED",
186
+ * "CreationDate": "1.643057863.842",
187
+ * "CustomKeyStoreId": "cks-876543210fedcba98",
188
+ * "CustomKeyStoreName": "ExampleVPCExternalKeyStore",
189
+ * "CustomKeyStoreType": "EXTERNAL_KEY_STORE",
190
+ * "XksProxyConfiguration": {
191
+ * "AccessKeyId": "ABCDE12345670EXAMPLE",
192
+ * "Connectivity": "VPC_ENDPOINT_SERVICE",
193
+ * "UriEndpoint": "https://myproxy-private.xks.example.com",
194
+ * "UriPath": "/example-prefix/kms/xks/v1",
195
+ * "VpcEndpointServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-example1"
196
+ * }
197
+ * }
198
+ * ]
199
+ * }
200
+ * *\/
201
+ * // example id: to-get-detailed-information-about-an-external-custom-key-store-by-name-4
202
+ * ```
203
+ *
90
204
  */
91
205
  export declare class DescribeCustomKeyStoresCommand extends $Command<DescribeCustomKeyStoresCommandInput, DescribeCustomKeyStoresCommandOutput, KMSClientResolvedConfig> {
92
206
  readonly input: DescribeCustomKeyStoresCommandInput;
@@ -111,6 +111,251 @@ export interface DescribeKeyCommandOutput extends DescribeKeyResponse, __Metadat
111
111
  * @see {@link DescribeKeyCommandOutput} for command's `response` shape.
112
112
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
113
113
  *
114
+ * @throws {@link DependencyTimeoutException} (server fault)
115
+ * <p>The system timed out while trying to fulfill the request. You can retry the
116
+ * request.</p>
117
+ *
118
+ * @throws {@link InvalidArnException} (client fault)
119
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
120
+ * valid.</p>
121
+ *
122
+ * @throws {@link KMSInternalException} (server fault)
123
+ * <p>The request was rejected because an internal exception occurred. The request can be
124
+ * retried.</p>
125
+ *
126
+ * @throws {@link NotFoundException} (client fault)
127
+ * <p>The request was rejected because the specified entity or resource could not be
128
+ * found.</p>
129
+ *
130
+ *
131
+ * @example To get details about a KMS key
132
+ * ```javascript
133
+ * // The following example gets metadata for a symmetric encryption KMS key.
134
+ * const input = {
135
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
136
+ * };
137
+ * const command = new DescribeKeyCommand(input);
138
+ * const response = await client.send(command);
139
+ * /* response ==
140
+ * {
141
+ * "KeyMetadata": {
142
+ * "AWSAccountId": "111122223333",
143
+ * "Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
144
+ * "CreationDate": "2017-07-05T14:04:55-07:00",
145
+ * "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
146
+ * "Description": "",
147
+ * "Enabled": true,
148
+ * "EncryptionAlgorithms": [
149
+ * "SYMMETRIC_DEFAULT"
150
+ * ],
151
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
152
+ * "KeyManager": "CUSTOMER",
153
+ * "KeySpec": "SYMMETRIC_DEFAULT",
154
+ * "KeyState": "Enabled",
155
+ * "KeyUsage": "ENCRYPT_DECRYPT",
156
+ * "MultiRegion": false,
157
+ * "Origin": "AWS_KMS"
158
+ * }
159
+ * }
160
+ * *\/
161
+ * // example id: get-key-details-1
162
+ * ```
163
+ *
164
+ * @example To get details about an RSA asymmetric KMS key
165
+ * ```javascript
166
+ * // The following example gets metadata for an asymmetric RSA KMS key used for signing and verification.
167
+ * const input = {
168
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
169
+ * };
170
+ * const command = new DescribeKeyCommand(input);
171
+ * const response = await client.send(command);
172
+ * /* response ==
173
+ * {
174
+ * "KeyMetadata": {
175
+ * "AWSAccountId": "111122223333",
176
+ * "Arn": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
177
+ * "CreationDate": 1571767572.317,
178
+ * "CustomerMasterKeySpec": "RSA_2048",
179
+ * "Description": "",
180
+ * "Enabled": false,
181
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
182
+ * "KeyManager": "CUSTOMER",
183
+ * "KeySpec": "RSA_2048",
184
+ * "KeyState": "Disabled",
185
+ * "KeyUsage": "SIGN_VERIFY",
186
+ * "MultiRegion": false,
187
+ * "Origin": "AWS_KMS",
188
+ * "SigningAlgorithms": [
189
+ * "RSASSA_PKCS1_V1_5_SHA_256",
190
+ * "RSASSA_PKCS1_V1_5_SHA_384",
191
+ * "RSASSA_PKCS1_V1_5_SHA_512",
192
+ * "RSASSA_PSS_SHA_256",
193
+ * "RSASSA_PSS_SHA_384",
194
+ * "RSASSA_PSS_SHA_512"
195
+ * ]
196
+ * }
197
+ * }
198
+ * *\/
199
+ * // example id: to-get-details-about-an-rsa-asymmetric-kms-key-2
200
+ * ```
201
+ *
202
+ * @example To get details about a multi-Region key
203
+ * ```javascript
204
+ * // The following example gets metadata for a multi-Region replica key. This multi-Region key is a symmetric encryption key. DescribeKey returns information about the primary key and all of its replicas.
205
+ * const input = {
206
+ * "KeyId": "arn:aws:kms:ap-northeast-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab"
207
+ * };
208
+ * const command = new DescribeKeyCommand(input);
209
+ * const response = await client.send(command);
210
+ * /* response ==
211
+ * {
212
+ * "KeyMetadata": {
213
+ * "AWSAccountId": "111122223333",
214
+ * "Arn": "arn:aws:kms:ap-northeast-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
215
+ * "CreationDate": 1586329200.918,
216
+ * "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
217
+ * "Description": "",
218
+ * "Enabled": true,
219
+ * "EncryptionAlgorithms": [
220
+ * "SYMMETRIC_DEFAULT"
221
+ * ],
222
+ * "KeyId": "mrk-1234abcd12ab34cd56ef1234567890ab",
223
+ * "KeyManager": "CUSTOMER",
224
+ * "KeyState": "Enabled",
225
+ * "KeyUsage": "ENCRYPT_DECRYPT",
226
+ * "MultiRegion": true,
227
+ * "MultiRegionConfiguration": {
228
+ * "MultiRegionKeyType": "PRIMARY",
229
+ * "PrimaryKey": {
230
+ * "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
231
+ * "Region": "us-west-2"
232
+ * },
233
+ * "ReplicaKeys": [
234
+ * {
235
+ * "Arn": "arn:aws:kms:eu-west-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
236
+ * "Region": "eu-west-1"
237
+ * },
238
+ * {
239
+ * "Arn": "arn:aws:kms:ap-northeast-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
240
+ * "Region": "ap-northeast-1"
241
+ * },
242
+ * {
243
+ * "Arn": "arn:aws:kms:sa-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
244
+ * "Region": "sa-east-1"
245
+ * }
246
+ * ]
247
+ * },
248
+ * "Origin": "AWS_KMS"
249
+ * }
250
+ * }
251
+ * *\/
252
+ * // example id: to-get-details-about-a-multi-region-key-3
253
+ * ```
254
+ *
255
+ * @example To get details about an HMAC KMS key
256
+ * ```javascript
257
+ * // The following example gets the metadata of an HMAC KMS key.
258
+ * const input = {
259
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
260
+ * };
261
+ * const command = new DescribeKeyCommand(input);
262
+ * const response = await client.send(command);
263
+ * /* response ==
264
+ * {
265
+ * "KeyMetadata": {
266
+ * "AWSAccountId": "123456789012",
267
+ * "Arn": "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
268
+ * "CreationDate": 1566160362.664,
269
+ * "CustomerMasterKeySpec": "HMAC_256",
270
+ * "Description": "Development test key",
271
+ * "Enabled": true,
272
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
273
+ * "KeyManager": "CUSTOMER",
274
+ * "KeyState": "Enabled",
275
+ * "KeyUsage": "GENERATE_VERIFY_MAC",
276
+ * "MacAlgorithms": [
277
+ * "HMAC_SHA_256"
278
+ * ],
279
+ * "MultiRegion": false,
280
+ * "Origin": "AWS_KMS"
281
+ * }
282
+ * }
283
+ * *\/
284
+ * // example id: to-get-details-about-an-hmac-kms-key-4
285
+ * ```
286
+ *
287
+ * @example To get details about a KMS key in an AWS CloudHSM key store
288
+ * ```javascript
289
+ * // The following example gets the metadata of a KMS key in an AWS CloudHSM key store.
290
+ * const input = {
291
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
292
+ * };
293
+ * const command = new DescribeKeyCommand(input);
294
+ * const response = await client.send(command);
295
+ * /* response ==
296
+ * {
297
+ * "KeyMetadata": {
298
+ * "AWSAccountId": "123456789012",
299
+ * "Arn": "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
300
+ * "CloudHsmClusterId": "cluster-1a23b4cdefg",
301
+ * "CreationDate": 1646160362.664,
302
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
303
+ * "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
304
+ * "Description": "CloudHSM key store test key",
305
+ * "Enabled": true,
306
+ * "EncryptionAlgorithms": [
307
+ * "SYMMETRIC_DEFAULT"
308
+ * ],
309
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
310
+ * "KeyManager": "CUSTOMER",
311
+ * "KeySpec": "SYMMETRIC_DEFAULT",
312
+ * "KeyState": "Enabled",
313
+ * "KeyUsage": "ENCRYPT_DECRYPT",
314
+ * "MultiRegion": false,
315
+ * "Origin": "AWS_CLOUDHSM"
316
+ * }
317
+ * }
318
+ * *\/
319
+ * // example id: to-get-details-about-a-kms-key-in-an-AWS-CloudHSM-key-store-5
320
+ * ```
321
+ *
322
+ * @example To get details about a KMS key in an external key store
323
+ * ```javascript
324
+ * // The following example gets the metadata of a KMS key in an external key store.
325
+ * const input = {
326
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
327
+ * };
328
+ * const command = new DescribeKeyCommand(input);
329
+ * const response = await client.send(command);
330
+ * /* response ==
331
+ * {
332
+ * "KeyMetadata": {
333
+ * "AWSAccountId": "123456789012",
334
+ * "Arn": "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
335
+ * "CreationDate": 1646160362.664,
336
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
337
+ * "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
338
+ * "Description": "External key store test key",
339
+ * "Enabled": true,
340
+ * "EncryptionAlgorithms": [
341
+ * "SYMMETRIC_DEFAULT"
342
+ * ],
343
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
344
+ * "KeyManager": "CUSTOMER",
345
+ * "KeySpec": "SYMMETRIC_DEFAULT",
346
+ * "KeyState": "Enabled",
347
+ * "KeyUsage": "ENCRYPT_DECRYPT",
348
+ * "MultiRegion": false,
349
+ * "Origin": "EXTERNAL_KEY_STORE",
350
+ * "XksKeyConfiguration": {
351
+ * "Id": "bb8562717f809024"
352
+ * }
353
+ * }
354
+ * }
355
+ * *\/
356
+ * // example id: to-get-details-about-a-kms-key-in-an-external-key-store-6
357
+ * ```
358
+ *
114
359
  */
115
360
  export declare class DescribeKeyCommand extends $Command<DescribeKeyCommandInput, DescribeKeyCommandOutput, KMSClientResolvedConfig> {
116
361
  readonly input: DescribeKeyCommandInput;
@@ -43,6 +43,52 @@ export interface DisableKeyCommandOutput extends __MetadataBearer {
43
43
  * @see {@link DisableKeyCommandOutput} for command's `response` shape.
44
44
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
45
45
  *
46
+ * @throws {@link DependencyTimeoutException} (server fault)
47
+ * <p>The system timed out while trying to fulfill the request. You can retry the
48
+ * request.</p>
49
+ *
50
+ * @throws {@link InvalidArnException} (client fault)
51
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
52
+ * valid.</p>
53
+ *
54
+ * @throws {@link KMSInternalException} (server fault)
55
+ * <p>The request was rejected because an internal exception occurred. The request can be
56
+ * retried.</p>
57
+ *
58
+ * @throws {@link KMSInvalidStateException} (client fault)
59
+ * <p>The request was rejected because the state of the specified resource is not valid for this
60
+ * request.</p>
61
+ * <p>This exceptions means one of the following:</p>
62
+ * <ul>
63
+ * <li>
64
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
65
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
66
+ * information about which key states are compatible with each KMS operation, see
67
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
68
+ * <i>Key Management Service Developer Guide</i>
69
+ * </i>.</p>
70
+ * </li>
71
+ * <li>
72
+ * <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
73
+ * </li>
74
+ * </ul>
75
+ *
76
+ * @throws {@link NotFoundException} (client fault)
77
+ * <p>The request was rejected because the specified entity or resource could not be
78
+ * found.</p>
79
+ *
80
+ *
81
+ * @example To disable a KMS key
82
+ * ```javascript
83
+ * // The following example disables the specified KMS key.
84
+ * const input = {
85
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
86
+ * };
87
+ * const command = new DisableKeyCommand(input);
88
+ * await client.send(command);
89
+ * // example id: to-disable-a-cmk-1478566583659
90
+ * ```
91
+ *
46
92
  */
47
93
  export declare class DisableKeyCommand extends $Command<DisableKeyCommandInput, DisableKeyCommandOutput, KMSClientResolvedConfig> {
48
94
  readonly input: DisableKeyCommandInput;
@@ -61,6 +61,59 @@ export interface DisableKeyRotationCommandOutput extends __MetadataBearer {
61
61
  * @see {@link DisableKeyRotationCommandOutput} for command's `response` shape.
62
62
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
63
63
  *
64
+ * @throws {@link DependencyTimeoutException} (server fault)
65
+ * <p>The system timed out while trying to fulfill the request. You can retry the
66
+ * request.</p>
67
+ *
68
+ * @throws {@link DisabledException} (client fault)
69
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
70
+ *
71
+ * @throws {@link InvalidArnException} (client fault)
72
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
73
+ * valid.</p>
74
+ *
75
+ * @throws {@link KMSInternalException} (server fault)
76
+ * <p>The request was rejected because an internal exception occurred. The request can be
77
+ * retried.</p>
78
+ *
79
+ * @throws {@link KMSInvalidStateException} (client fault)
80
+ * <p>The request was rejected because the state of the specified resource is not valid for this
81
+ * request.</p>
82
+ * <p>This exceptions means one of the following:</p>
83
+ * <ul>
84
+ * <li>
85
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
86
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
87
+ * information about which key states are compatible with each KMS operation, see
88
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
89
+ * <i>Key Management Service Developer Guide</i>
90
+ * </i>.</p>
91
+ * </li>
92
+ * <li>
93
+ * <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
94
+ * </li>
95
+ * </ul>
96
+ *
97
+ * @throws {@link NotFoundException} (client fault)
98
+ * <p>The request was rejected because the specified entity or resource could not be
99
+ * found.</p>
100
+ *
101
+ * @throws {@link UnsupportedOperationException} (client fault)
102
+ * <p>The request was rejected because a specified parameter is not supported or a specified
103
+ * resource is not valid for this operation.</p>
104
+ *
105
+ *
106
+ * @example To disable automatic rotation of key material
107
+ * ```javascript
108
+ * // The following example disables automatic annual rotation of the key material for the specified KMS key.
109
+ * const input = {
110
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
111
+ * };
112
+ * const command = new DisableKeyRotationCommand(input);
113
+ * await client.send(command);
114
+ * // example id: to-disable-automatic-rotation-of-key-material-1478624396092
115
+ * ```
116
+ *
64
117
  */
65
118
  export declare class DisableKeyRotationCommand extends $Command<DisableKeyRotationCommandInput, DisableKeyRotationCommandOutput, KMSClientResolvedConfig> {
66
119
  readonly input: DisableKeyRotationCommandInput;
@@ -80,6 +80,62 @@ export interface DisconnectCustomKeyStoreCommandOutput extends DisconnectCustomK
80
80
  * @see {@link DisconnectCustomKeyStoreCommandOutput} for command's `response` shape.
81
81
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
82
82
  *
83
+ * @throws {@link CustomKeyStoreInvalidStateException} (client fault)
84
+ * <p>The request was rejected because of the <code>ConnectionState</code> of the custom key
85
+ * store. To get the <code>ConnectionState</code> of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
86
+ * <p>This exception is thrown under the following conditions:</p>
87
+ * <ul>
88
+ * <li>
89
+ * <p>You requested the <a>ConnectCustomKeyStore</a> operation on a custom key
90
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
91
+ * <code>FAILED</code>. This operation is valid for all other <code>ConnectionState</code>
92
+ * values. To reconnect a custom key store in a <code>FAILED</code> state, disconnect it
93
+ * (<a>DisconnectCustomKeyStore</a>), then connect it
94
+ * (<code>ConnectCustomKeyStore</code>).</p>
95
+ * </li>
96
+ * <li>
97
+ * <p>You requested the <a>CreateKey</a> operation in a custom key store that is
98
+ * not connected. This operations is valid only when the custom key store
99
+ * <code>ConnectionState</code> is <code>CONNECTED</code>.</p>
100
+ * </li>
101
+ * <li>
102
+ * <p>You requested the <a>DisconnectCustomKeyStore</a> operation on a custom key
103
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
104
+ * <code>DISCONNECTED</code>. This operation is valid for all other
105
+ * <code>ConnectionState</code> values.</p>
106
+ * </li>
107
+ * <li>
108
+ * <p>You requested the <a>UpdateCustomKeyStore</a> or <a>DeleteCustomKeyStore</a> operation on a custom key store that is not
109
+ * disconnected. This operation is valid only when the custom key store
110
+ * <code>ConnectionState</code> is <code>DISCONNECTED</code>.</p>
111
+ * </li>
112
+ * <li>
113
+ * <p>You requested the <a>GenerateRandom</a> operation in an CloudHSM key store
114
+ * that is not connected. This operation is valid only when the CloudHSM key store
115
+ * <code>ConnectionState</code> is <code>CONNECTED</code>. </p>
116
+ * </li>
117
+ * </ul>
118
+ *
119
+ * @throws {@link CustomKeyStoreNotFoundException} (client fault)
120
+ * <p>The request was rejected because KMS cannot find a custom key store with the specified
121
+ * key store name or ID.</p>
122
+ *
123
+ * @throws {@link KMSInternalException} (server fault)
124
+ * <p>The request was rejected because an internal exception occurred. The request can be
125
+ * retried.</p>
126
+ *
127
+ *
128
+ * @example To disconnect a custom key store from its CloudHSM cluster
129
+ * ```javascript
130
+ * // This example disconnects an AWS KMS custom key store from its backing key store. For an AWS CloudHSM key store, it disconnects the key store from its AWS CloudHSM cluster. For an external key store, it disconnects the key store from the external key store proxy that communicates with your external key manager. This operation doesn't return any data. To verify that the custom key store is disconnected, use the <code>DescribeCustomKeyStores</code> operation.
131
+ * const input = {
132
+ * "CustomKeyStoreId": "cks-1234567890abcdef0"
133
+ * };
134
+ * const command = new DisconnectCustomKeyStoreCommand(input);
135
+ * await client.send(command);
136
+ * // example id: to-disconnect-a-custom-key-store-from-its-cloudhsm-cluster-1628627955156
137
+ * ```
138
+ *
83
139
  */
84
140
  export declare class DisconnectCustomKeyStoreCommand extends $Command<DisconnectCustomKeyStoreCommandInput, DisconnectCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
85
141
  readonly input: DisconnectCustomKeyStoreCommandInput;
@@ -39,6 +39,56 @@ export interface EnableKeyCommandOutput extends __MetadataBearer {
39
39
  * @see {@link EnableKeyCommandOutput} for command's `response` shape.
40
40
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
41
41
  *
42
+ * @throws {@link DependencyTimeoutException} (server fault)
43
+ * <p>The system timed out while trying to fulfill the request. You can retry the
44
+ * request.</p>
45
+ *
46
+ * @throws {@link InvalidArnException} (client fault)
47
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
48
+ * valid.</p>
49
+ *
50
+ * @throws {@link KMSInternalException} (server fault)
51
+ * <p>The request was rejected because an internal exception occurred. The request can be
52
+ * retried.</p>
53
+ *
54
+ * @throws {@link KMSInvalidStateException} (client fault)
55
+ * <p>The request was rejected because the state of the specified resource is not valid for this
56
+ * request.</p>
57
+ * <p>This exceptions means one of the following:</p>
58
+ * <ul>
59
+ * <li>
60
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
61
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
62
+ * information about which key states are compatible with each KMS operation, see
63
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
64
+ * <i>Key Management Service Developer Guide</i>
65
+ * </i>.</p>
66
+ * </li>
67
+ * <li>
68
+ * <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
69
+ * </li>
70
+ * </ul>
71
+ *
72
+ * @throws {@link LimitExceededException} (client fault)
73
+ * <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
74
+ * <i>Key Management Service Developer Guide</i>.</p>
75
+ *
76
+ * @throws {@link NotFoundException} (client fault)
77
+ * <p>The request was rejected because the specified entity or resource could not be
78
+ * found.</p>
79
+ *
80
+ *
81
+ * @example To enable a KMS key
82
+ * ```javascript
83
+ * // The following example enables the specified KMS key.
84
+ * const input = {
85
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
86
+ * };
87
+ * const command = new EnableKeyCommand(input);
88
+ * await client.send(command);
89
+ * // example id: to-enable-a-cmk-1478627501129
90
+ * ```
91
+ *
42
92
  */
43
93
  export declare class EnableKeyCommand extends $Command<EnableKeyCommandInput, EnableKeyCommandOutput, KMSClientResolvedConfig> {
44
94
  readonly input: EnableKeyCommandInput;