@aws-sdk/client-kms 3.325.0 → 3.326.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 +6 -0
  2. package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +4 -0
  3. package/dist-types/commands/CreateAliasCommand.d.ts +4 -0
  4. package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +7 -1
  5. package/dist-types/commands/CreateGrantCommand.d.ts +7 -0
  6. package/dist-types/commands/CreateKeyCommand.d.ts +52 -1
  7. package/dist-types/commands/DecryptCommand.d.ts +55 -3
  8. package/dist-types/commands/DeleteAliasCommand.d.ts +4 -0
  9. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +4 -0
  10. package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +4 -0
  11. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +27 -1
  12. package/dist-types/commands/DescribeKeyCommand.d.ts +52 -1
  13. package/dist-types/commands/DisableKeyCommand.d.ts +4 -0
  14. package/dist-types/commands/DisableKeyRotationCommand.d.ts +4 -0
  15. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +5 -1
  16. package/dist-types/commands/EnableKeyCommand.d.ts +4 -0
  17. package/dist-types/commands/EnableKeyRotationCommand.d.ts +4 -0
  18. package/dist-types/commands/EncryptCommand.d.ts +32 -3
  19. package/dist-types/commands/GenerateDataKeyCommand.d.ts +33 -1
  20. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +37 -1
  21. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +9 -0
  22. package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +7 -0
  23. package/dist-types/commands/GenerateMacCommand.d.ts +8 -0
  24. package/dist-types/commands/GenerateRandomCommand.d.ts +28 -1
  25. package/dist-types/commands/GetKeyPolicyCommand.d.ts +6 -0
  26. package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +6 -0
  27. package/dist-types/commands/GetParametersForImportCommand.d.ts +9 -0
  28. package/dist-types/commands/GetPublicKeyCommand.d.ts +16 -0
  29. package/dist-types/commands/ImportKeyMaterialCommand.d.ts +4 -0
  30. package/dist-types/commands/ListAliasesCommand.d.ts +16 -0
  31. package/dist-types/commands/ListGrantsCommand.d.ts +29 -0
  32. package/dist-types/commands/ListKeyPoliciesCommand.d.ts +10 -0
  33. package/dist-types/commands/ListKeysCommand.d.ts +13 -0
  34. package/dist-types/commands/ListResourceTagsCommand.d.ts +13 -0
  35. package/dist-types/commands/ListRetirableGrantsCommand.d.ts +29 -0
  36. package/dist-types/commands/PutKeyPolicyCommand.d.ts +4 -0
  37. package/dist-types/commands/ReEncryptCommand.d.ts +10 -0
  38. package/dist-types/commands/ReplicateKeyCommand.d.ts +58 -0
  39. package/dist-types/commands/RetireGrantCommand.d.ts +4 -0
  40. package/dist-types/commands/RevokeGrantCommand.d.ts +4 -0
  41. package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +9 -0
  42. package/dist-types/commands/SignCommand.d.ts +8 -0
  43. package/dist-types/commands/TagResourceCommand.d.ts +4 -0
  44. package/dist-types/commands/UntagResourceCommand.d.ts +4 -0
  45. package/dist-types/commands/UpdateAliasCommand.d.ts +4 -0
  46. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +5 -1
  47. package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +4 -0
  48. package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +4 -0
  49. package/dist-types/commands/VerifyCommand.d.ts +8 -0
  50. package/dist-types/commands/VerifyMacCommand.d.ts +8 -0
  51. package/package.json +3 -3
@@ -43,6 +43,10 @@ export interface CancelKeyDeletionCommandOutput extends CancelKeyDeletionRespons
43
43
  * };
44
44
  * const command = new CancelKeyDeletionCommand(input);
45
45
  * const response = await client.send(command);
46
+ * // { // CancelKeyDeletionResponse
47
+ * // KeyId: "STRING_VALUE",
48
+ * // };
49
+ *
46
50
  * ```
47
51
  *
48
52
  * @param CancelKeyDeletionCommandInput - {@link CancelKeyDeletionCommandInput}
@@ -85,6 +89,8 @@ export interface CancelKeyDeletionCommandOutput extends CancelKeyDeletionRespons
85
89
  * <p>The request was rejected because the specified entity or resource could not be
86
90
  * found.</p>
87
91
  *
92
+ * @throws {@link KMSServiceException}
93
+ * <p>Base exception class for all service exceptions from KMS service.</p>
88
94
  *
89
95
  * @example To cancel deletion of a KMS key
90
96
  * ```javascript
@@ -117,6 +117,8 @@ export interface ConnectCustomKeyStoreCommandOutput extends ConnectCustomKeyStor
117
117
  * };
118
118
  * const command = new ConnectCustomKeyStoreCommand(input);
119
119
  * const response = await client.send(command);
120
+ * // {};
121
+ *
120
122
  * ```
121
123
  *
122
124
  * @param ConnectCustomKeyStoreCommandInput - {@link ConnectCustomKeyStoreCommandInput}
@@ -209,6 +211,8 @@ export interface ConnectCustomKeyStoreCommandOutput extends ConnectCustomKeyStor
209
211
  * <p>The request was rejected because an internal exception occurred. The request can be
210
212
  * retried.</p>
211
213
  *
214
+ * @throws {@link KMSServiceException}
215
+ * <p>Base exception class for all service exceptions from KMS service.</p>
212
216
  *
213
217
  * @example To connect a custom key store
214
218
  * ```javascript
@@ -88,6 +88,8 @@ export interface CreateAliasCommandOutput extends __MetadataBearer {
88
88
  * };
89
89
  * const command = new CreateAliasCommand(input);
90
90
  * const response = await client.send(command);
91
+ * // {};
92
+ *
91
93
  * ```
92
94
  *
93
95
  * @param CreateAliasCommandInput - {@link CreateAliasCommandInput}
@@ -137,6 +139,8 @@ export interface CreateAliasCommandOutput extends __MetadataBearer {
137
139
  * <p>The request was rejected because the specified entity or resource could not be
138
140
  * found.</p>
139
141
  *
142
+ * @throws {@link KMSServiceException}
143
+ * <p>Base exception class for all service exceptions from KMS service.</p>
140
144
  *
141
145
  * @example To create an alias
142
146
  * ```javascript
@@ -130,6 +130,10 @@ export interface CreateCustomKeyStoreCommandOutput extends CreateCustomKeyStoreR
130
130
  * };
131
131
  * const command = new CreateCustomKeyStoreCommand(input);
132
132
  * const response = await client.send(command);
133
+ * // { // CreateCustomKeyStoreResponse
134
+ * // CustomKeyStoreId: "STRING_VALUE",
135
+ * // };
136
+ *
133
137
  * ```
134
138
  *
135
139
  * @param CreateCustomKeyStoreCommandInput - {@link CreateCustomKeyStoreCommandInput}
@@ -262,12 +266,14 @@ export interface CreateCustomKeyStoreCommandOutput extends CreateCustomKeyStoreR
262
266
  * endpoint service includes the KMS service principal for the Region, such as
263
267
  * <code>cks.kms.us-east-1.amazonaws.com</code>.</p>
264
268
  *
269
+ * @throws {@link KMSServiceException}
270
+ * <p>Base exception class for all service exceptions from KMS service.</p>
265
271
  *
266
272
  * @example To create an AWS CloudHSM key store
267
273
  * ```javascript
268
274
  * // This example creates a custom key store that is associated with an AWS CloudHSM cluster.
269
275
  * const input = {
270
- * "CloudHsmClusterId": "cluster-1a23b4cdefg",
276
+ * "CloudHsmClusterId": "cluster-234abcdefABC",
271
277
  * "CustomKeyStoreName": "ExampleKeyStore",
272
278
  * "KeyStorePassword": "kmsPswd",
273
279
  * "TrustAnchorCertificate": "<certificate-goes-here>"
@@ -109,6 +109,11 @@ export interface CreateGrantCommandOutput extends CreateGrantResponse, __Metadat
109
109
  * };
110
110
  * const command = new CreateGrantCommand(input);
111
111
  * const response = await client.send(command);
112
+ * // { // CreateGrantResponse
113
+ * // GrantToken: "STRING_VALUE",
114
+ * // GrantId: "STRING_VALUE",
115
+ * // };
116
+ *
112
117
  * ```
113
118
  *
114
119
  * @param CreateGrantCommandInput - {@link CreateGrantCommandInput}
@@ -161,6 +166,8 @@ export interface CreateGrantCommandOutput extends CreateGrantResponse, __Metadat
161
166
  * <p>The request was rejected because the specified entity or resource could not be
162
167
  * found.</p>
163
168
  *
169
+ * @throws {@link KMSServiceException}
170
+ * <p>Base exception class for all service exceptions from KMS service.</p>
164
171
  *
165
172
  * @example To create a grant
166
173
  * ```javascript
@@ -212,6 +212,55 @@ export interface CreateKeyCommandOutput extends CreateKeyResponse, __MetadataBea
212
212
  * };
213
213
  * const command = new CreateKeyCommand(input);
214
214
  * const response = await client.send(command);
215
+ * // { // CreateKeyResponse
216
+ * // KeyMetadata: { // KeyMetadata
217
+ * // AWSAccountId: "STRING_VALUE",
218
+ * // KeyId: "STRING_VALUE", // required
219
+ * // Arn: "STRING_VALUE",
220
+ * // CreationDate: new Date("TIMESTAMP"),
221
+ * // Enabled: true || false,
222
+ * // Description: "STRING_VALUE",
223
+ * // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC",
224
+ * // KeyState: "Creating" || "Enabled" || "Disabled" || "PendingDeletion" || "PendingImport" || "PendingReplicaDeletion" || "Unavailable" || "Updating",
225
+ * // DeletionDate: new Date("TIMESTAMP"),
226
+ * // ValidTo: new Date("TIMESTAMP"),
227
+ * // Origin: "AWS_KMS" || "EXTERNAL" || "AWS_CLOUDHSM" || "EXTERNAL_KEY_STORE",
228
+ * // CustomKeyStoreId: "STRING_VALUE",
229
+ * // CloudHsmClusterId: "STRING_VALUE",
230
+ * // ExpirationModel: "KEY_MATERIAL_EXPIRES" || "KEY_MATERIAL_DOES_NOT_EXPIRE",
231
+ * // KeyManager: "AWS" || "CUSTOMER",
232
+ * // CustomerMasterKeySpec: "RSA_2048" || "RSA_3072" || "RSA_4096" || "ECC_NIST_P256" || "ECC_NIST_P384" || "ECC_NIST_P521" || "ECC_SECG_P256K1" || "SYMMETRIC_DEFAULT" || "HMAC_224" || "HMAC_256" || "HMAC_384" || "HMAC_512" || "SM2",
233
+ * // KeySpec: "RSA_2048" || "RSA_3072" || "RSA_4096" || "ECC_NIST_P256" || "ECC_NIST_P384" || "ECC_NIST_P521" || "ECC_SECG_P256K1" || "SYMMETRIC_DEFAULT" || "HMAC_224" || "HMAC_256" || "HMAC_384" || "HMAC_512" || "SM2",
234
+ * // EncryptionAlgorithms: [ // EncryptionAlgorithmSpecList
235
+ * // "SYMMETRIC_DEFAULT" || "RSAES_OAEP_SHA_1" || "RSAES_OAEP_SHA_256" || "SM2PKE",
236
+ * // ],
237
+ * // SigningAlgorithms: [ // SigningAlgorithmSpecList
238
+ * // "RSASSA_PSS_SHA_256" || "RSASSA_PSS_SHA_384" || "RSASSA_PSS_SHA_512" || "RSASSA_PKCS1_V1_5_SHA_256" || "RSASSA_PKCS1_V1_5_SHA_384" || "RSASSA_PKCS1_V1_5_SHA_512" || "ECDSA_SHA_256" || "ECDSA_SHA_384" || "ECDSA_SHA_512" || "SM2DSA",
239
+ * // ],
240
+ * // MultiRegion: true || false,
241
+ * // MultiRegionConfiguration: { // MultiRegionConfiguration
242
+ * // MultiRegionKeyType: "PRIMARY" || "REPLICA",
243
+ * // PrimaryKey: { // MultiRegionKey
244
+ * // Arn: "STRING_VALUE",
245
+ * // Region: "STRING_VALUE",
246
+ * // },
247
+ * // ReplicaKeys: [ // MultiRegionKeyList
248
+ * // {
249
+ * // Arn: "STRING_VALUE",
250
+ * // Region: "STRING_VALUE",
251
+ * // },
252
+ * // ],
253
+ * // },
254
+ * // PendingDeletionWindowInDays: Number("int"),
255
+ * // MacAlgorithms: [ // MacAlgorithmSpecList
256
+ * // "HMAC_SHA_224" || "HMAC_SHA_256" || "HMAC_SHA_384" || "HMAC_SHA_512",
257
+ * // ],
258
+ * // XksKeyConfiguration: { // XksKeyConfigurationType
259
+ * // Id: "STRING_VALUE",
260
+ * // },
261
+ * // },
262
+ * // };
263
+ *
215
264
  * ```
216
265
  *
217
266
  * @param CreateKeyCommandInput - {@link CreateKeyCommandInput}
@@ -341,6 +390,8 @@ export interface CreateKeyCommandOutput extends CreateKeyResponse, __MetadataBea
341
390
  * For details, see the documentation provided with your external key store proxy or key
342
391
  * manager.</p>
343
392
  *
393
+ * @throws {@link KMSServiceException}
394
+ * <p>Base exception class for all service exceptions from KMS service.</p>
344
395
  *
345
396
  * @example To create a KMS key
346
397
  * ```javascript
@@ -564,7 +615,7 @@ export interface CreateKeyCommandOutput extends CreateKeyResponse, __MetadataBea
564
615
  * "KeyMetadata": {
565
616
  * "AWSAccountId": "111122223333",
566
617
  * "Arn": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
567
- * "CloudHsmClusterId": "cluster-1a23b4cdefg",
618
+ * "CloudHsmClusterId": "cluster-234abcdefABC",
568
619
  * "CreationDate": "2019-12-02T07:48:55-07:00",
569
620
  * "CustomKeyStoreId": "cks-1234567890abcdef0",
570
621
  * "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
@@ -136,6 +136,12 @@ export interface DecryptCommandOutput extends DecryptResponse, __MetadataBearer
136
136
  * };
137
137
  * const command = new DecryptCommand(input);
138
138
  * const response = await client.send(command);
139
+ * // { // DecryptResponse
140
+ * // KeyId: "STRING_VALUE",
141
+ * // Plaintext: "BLOB_VALUE",
142
+ * // EncryptionAlgorithm: "SYMMETRIC_DEFAULT" || "RSAES_OAEP_SHA_1" || "RSAES_OAEP_SHA_256" || "SM2PKE",
143
+ * // };
144
+ *
139
145
  * ```
140
146
  *
141
147
  * @param DecryptCommandInput - {@link DecryptCommandInput}
@@ -219,10 +225,12 @@ export interface DecryptCommandOutput extends DecryptResponse, __MetadataBearer
219
225
  * <p>The request was rejected because the specified entity or resource could not be
220
226
  * found.</p>
221
227
  *
228
+ * @throws {@link KMSServiceException}
229
+ * <p>Base exception class for all service exceptions from KMS service.</p>
222
230
  *
223
- * @example To decrypt data
231
+ * @example To decrypt data with a symmetric encryption KMS key
224
232
  * ```javascript
225
- * // The following example decrypts data that was encrypted with a KMS key.
233
+ * // The following example decrypts data that was encrypted with a symmetric encryption KMS key. The KeyId is not required when decrypting with a symmetric encryption key, but it is a best practice.
226
234
  * const input = {
227
235
  * "CiphertextBlob": "<binary data>",
228
236
  * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
@@ -231,11 +239,55 @@ export interface DecryptCommandOutput extends DecryptResponse, __MetadataBearer
231
239
  * const response = await client.send(command);
232
240
  * /* response ==
233
241
  * {
242
+ * "EncryptionAlgorithm": "SYMMETRIC_DEFAULT",
234
243
  * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
235
244
  * "Plaintext": "<binary data>"
236
245
  * }
237
246
  * *\/
238
- * // example id: to-decrypt-data-1478281622886
247
+ * // example id: to-decrypt-data-1
248
+ * ```
249
+ *
250
+ * @example To decrypt data with an asymmetric encryption KMS key
251
+ * ```javascript
252
+ * // The following example decrypts data that was encrypted with an asymmetric encryption KMS key. When the KMS encryption key is asymmetric, you must specify the KMS key ID and the encryption algorithm that was used to encrypt the data.
253
+ * const input = {
254
+ * "CiphertextBlob": "<binary data>",
255
+ * "EncryptionAlgorithm": "RSAES_OAEP_SHA_256",
256
+ * "KeyId": "0987dcba-09fe-87dc-65ba-ab0987654321"
257
+ * };
258
+ * const command = new DecryptCommand(input);
259
+ * const response = await client.send(command);
260
+ * /* response ==
261
+ * {
262
+ * "EncryptionAlgorithm": "RSAES_OAEP_SHA_256",
263
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
264
+ * "Plaintext": "<binary data>"
265
+ * }
266
+ * *\/
267
+ * // example id: to-decrypt-data-2
268
+ * ```
269
+ *
270
+ * @example To decrypt data for a Nitro enclave
271
+ * ```javascript
272
+ * // The following Decrypt example includes the Recipient parameter with a signed attestation document from an AWS Nitro enclave. Instead of returning the decrypted data in plaintext (Plaintext), the operation returns the decrypted data encrypted by the public key from the attestation document (CiphertextForRecipient).
273
+ * const input = {
274
+ * "CiphertextBlob": "<binary data>",
275
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
276
+ * "Recipient": {
277
+ * "AttestationDocument": "<attestation document>",
278
+ * "KeyEncryptionAlgorithm": "RSAES_OAEP_SHA_256"
279
+ * }
280
+ * };
281
+ * const command = new DecryptCommand(input);
282
+ * const response = await client.send(command);
283
+ * /* response ==
284
+ * {
285
+ * "CiphertextForRecipient": "<binary data>",
286
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
287
+ * "Plaintext": ""
288
+ * }
289
+ * *\/
290
+ * // example id: to-decrypt-data-for-a-nitro-enclave-2
239
291
  * ```
240
292
  *
241
293
  * @example To decrypt data with an asymmetric encryption KMS key
@@ -78,6 +78,8 @@ export interface DeleteAliasCommandOutput extends __MetadataBearer {
78
78
  * };
79
79
  * const command = new DeleteAliasCommand(input);
80
80
  * const response = await client.send(command);
81
+ * // {};
82
+ *
81
83
  * ```
82
84
  *
83
85
  * @param DeleteAliasCommandInput - {@link DeleteAliasCommandInput}
@@ -116,6 +118,8 @@ export interface DeleteAliasCommandOutput extends __MetadataBearer {
116
118
  * <p>The request was rejected because the specified entity or resource could not be
117
119
  * found.</p>
118
120
  *
121
+ * @throws {@link KMSServiceException}
122
+ * <p>Base exception class for all service exceptions from KMS service.</p>
119
123
  *
120
124
  * @example To delete an alias
121
125
  * ```javascript
@@ -89,6 +89,8 @@ export interface DeleteCustomKeyStoreCommandOutput extends DeleteCustomKeyStoreR
89
89
  * };
90
90
  * const command = new DeleteCustomKeyStoreCommand(input);
91
91
  * const response = await client.send(command);
92
+ * // {};
93
+ *
92
94
  * ```
93
95
  *
94
96
  * @param DeleteCustomKeyStoreCommandInput - {@link DeleteCustomKeyStoreCommandInput}
@@ -147,6 +149,8 @@ export interface DeleteCustomKeyStoreCommandOutput extends DeleteCustomKeyStoreR
147
149
  * <p>The request was rejected because an internal exception occurred. The request can be
148
150
  * retried.</p>
149
151
  *
152
+ * @throws {@link KMSServiceException}
153
+ * <p>Base exception class for all service exceptions from KMS service.</p>
150
154
  *
151
155
  * @example To delete a custom key store from AWS KMS
152
156
  * ```javascript
@@ -59,6 +59,8 @@ export interface DeleteImportedKeyMaterialCommandOutput extends __MetadataBearer
59
59
  * };
60
60
  * const command = new DeleteImportedKeyMaterialCommand(input);
61
61
  * const response = await client.send(command);
62
+ * // {};
63
+ *
62
64
  * ```
63
65
  *
64
66
  * @param DeleteImportedKeyMaterialCommandInput - {@link DeleteImportedKeyMaterialCommandInput}
@@ -105,6 +107,8 @@ export interface DeleteImportedKeyMaterialCommandOutput extends __MetadataBearer
105
107
  * <p>The request was rejected because a specified parameter is not supported or a specified
106
108
  * resource is not valid for this operation.</p>
107
109
  *
110
+ * @throws {@link KMSServiceException}
111
+ * <p>Base exception class for all service exceptions from KMS service.</p>
108
112
  *
109
113
  * @example To delete imported key material
110
114
  * ```javascript
@@ -92,6 +92,30 @@ export interface DescribeCustomKeyStoresCommandOutput extends DescribeCustomKeyS
92
92
  * };
93
93
  * const command = new DescribeCustomKeyStoresCommand(input);
94
94
  * const response = await client.send(command);
95
+ * // { // DescribeCustomKeyStoresResponse
96
+ * // CustomKeyStores: [ // CustomKeyStoresList
97
+ * // { // CustomKeyStoresListEntry
98
+ * // CustomKeyStoreId: "STRING_VALUE",
99
+ * // CustomKeyStoreName: "STRING_VALUE",
100
+ * // CloudHsmClusterId: "STRING_VALUE",
101
+ * // TrustAnchorCertificate: "STRING_VALUE",
102
+ * // ConnectionState: "CONNECTED" || "CONNECTING" || "FAILED" || "DISCONNECTED" || "DISCONNECTING",
103
+ * // ConnectionErrorCode: "INVALID_CREDENTIALS" || "CLUSTER_NOT_FOUND" || "NETWORK_ERRORS" || "INTERNAL_ERROR" || "INSUFFICIENT_CLOUDHSM_HSMS" || "USER_LOCKED_OUT" || "USER_NOT_FOUND" || "USER_LOGGED_IN" || "SUBNET_NOT_FOUND" || "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET" || "XKS_PROXY_ACCESS_DENIED" || "XKS_PROXY_NOT_REACHABLE" || "XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND" || "XKS_PROXY_INVALID_RESPONSE" || "XKS_PROXY_INVALID_CONFIGURATION" || "XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION" || "XKS_PROXY_TIMED_OUT" || "XKS_PROXY_INVALID_TLS_CONFIGURATION",
104
+ * // CreationDate: new Date("TIMESTAMP"),
105
+ * // CustomKeyStoreType: "AWS_CLOUDHSM" || "EXTERNAL_KEY_STORE",
106
+ * // XksProxyConfiguration: { // XksProxyConfigurationType
107
+ * // Connectivity: "PUBLIC_ENDPOINT" || "VPC_ENDPOINT_SERVICE",
108
+ * // AccessKeyId: "STRING_VALUE",
109
+ * // UriEndpoint: "STRING_VALUE",
110
+ * // UriPath: "STRING_VALUE",
111
+ * // VpcEndpointServiceName: "STRING_VALUE",
112
+ * // },
113
+ * // },
114
+ * // ],
115
+ * // NextMarker: "STRING_VALUE",
116
+ * // Truncated: true || false,
117
+ * // };
118
+ *
95
119
  * ```
96
120
  *
97
121
  * @param DescribeCustomKeyStoresCommandInput - {@link DescribeCustomKeyStoresCommandInput}
@@ -112,6 +136,8 @@ export interface DescribeCustomKeyStoresCommandOutput extends DescribeCustomKeyS
112
136
  * <p>The request was rejected because an internal exception occurred. The request can be
113
137
  * retried.</p>
114
138
  *
139
+ * @throws {@link KMSServiceException}
140
+ * <p>Base exception class for all service exceptions from KMS service.</p>
115
141
  *
116
142
  * @example To get detailed information about custom key stores in the account and Region
117
143
  * ```javascript
@@ -139,7 +165,7 @@ export interface DescribeCustomKeyStoresCommandOutput extends DescribeCustomKeyS
139
165
  * {
140
166
  * "CustomKeyStores": [
141
167
  * {
142
- * "CloudHsmClusterId": "cluster-1a23b4cdefg",
168
+ * "CloudHsmClusterId": "cluster-234abcdefABC",
143
169
  * "ConnectionState": "CONNECTED",
144
170
  * "CreationDate": "1.499288695918E9",
145
171
  * "CustomKeyStoreId": "cks-1234567890abcdef0",
@@ -116,6 +116,55 @@ export interface DescribeKeyCommandOutput extends DescribeKeyResponse, __Metadat
116
116
  * };
117
117
  * const command = new DescribeKeyCommand(input);
118
118
  * const response = await client.send(command);
119
+ * // { // DescribeKeyResponse
120
+ * // KeyMetadata: { // KeyMetadata
121
+ * // AWSAccountId: "STRING_VALUE",
122
+ * // KeyId: "STRING_VALUE", // required
123
+ * // Arn: "STRING_VALUE",
124
+ * // CreationDate: new Date("TIMESTAMP"),
125
+ * // Enabled: true || false,
126
+ * // Description: "STRING_VALUE",
127
+ * // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC",
128
+ * // KeyState: "Creating" || "Enabled" || "Disabled" || "PendingDeletion" || "PendingImport" || "PendingReplicaDeletion" || "Unavailable" || "Updating",
129
+ * // DeletionDate: new Date("TIMESTAMP"),
130
+ * // ValidTo: new Date("TIMESTAMP"),
131
+ * // Origin: "AWS_KMS" || "EXTERNAL" || "AWS_CLOUDHSM" || "EXTERNAL_KEY_STORE",
132
+ * // CustomKeyStoreId: "STRING_VALUE",
133
+ * // CloudHsmClusterId: "STRING_VALUE",
134
+ * // ExpirationModel: "KEY_MATERIAL_EXPIRES" || "KEY_MATERIAL_DOES_NOT_EXPIRE",
135
+ * // KeyManager: "AWS" || "CUSTOMER",
136
+ * // CustomerMasterKeySpec: "RSA_2048" || "RSA_3072" || "RSA_4096" || "ECC_NIST_P256" || "ECC_NIST_P384" || "ECC_NIST_P521" || "ECC_SECG_P256K1" || "SYMMETRIC_DEFAULT" || "HMAC_224" || "HMAC_256" || "HMAC_384" || "HMAC_512" || "SM2",
137
+ * // KeySpec: "RSA_2048" || "RSA_3072" || "RSA_4096" || "ECC_NIST_P256" || "ECC_NIST_P384" || "ECC_NIST_P521" || "ECC_SECG_P256K1" || "SYMMETRIC_DEFAULT" || "HMAC_224" || "HMAC_256" || "HMAC_384" || "HMAC_512" || "SM2",
138
+ * // EncryptionAlgorithms: [ // EncryptionAlgorithmSpecList
139
+ * // "SYMMETRIC_DEFAULT" || "RSAES_OAEP_SHA_1" || "RSAES_OAEP_SHA_256" || "SM2PKE",
140
+ * // ],
141
+ * // SigningAlgorithms: [ // SigningAlgorithmSpecList
142
+ * // "RSASSA_PSS_SHA_256" || "RSASSA_PSS_SHA_384" || "RSASSA_PSS_SHA_512" || "RSASSA_PKCS1_V1_5_SHA_256" || "RSASSA_PKCS1_V1_5_SHA_384" || "RSASSA_PKCS1_V1_5_SHA_512" || "ECDSA_SHA_256" || "ECDSA_SHA_384" || "ECDSA_SHA_512" || "SM2DSA",
143
+ * // ],
144
+ * // MultiRegion: true || false,
145
+ * // MultiRegionConfiguration: { // MultiRegionConfiguration
146
+ * // MultiRegionKeyType: "PRIMARY" || "REPLICA",
147
+ * // PrimaryKey: { // MultiRegionKey
148
+ * // Arn: "STRING_VALUE",
149
+ * // Region: "STRING_VALUE",
150
+ * // },
151
+ * // ReplicaKeys: [ // MultiRegionKeyList
152
+ * // {
153
+ * // Arn: "STRING_VALUE",
154
+ * // Region: "STRING_VALUE",
155
+ * // },
156
+ * // ],
157
+ * // },
158
+ * // PendingDeletionWindowInDays: Number("int"),
159
+ * // MacAlgorithms: [ // MacAlgorithmSpecList
160
+ * // "HMAC_SHA_224" || "HMAC_SHA_256" || "HMAC_SHA_384" || "HMAC_SHA_512",
161
+ * // ],
162
+ * // XksKeyConfiguration: { // XksKeyConfigurationType
163
+ * // Id: "STRING_VALUE",
164
+ * // },
165
+ * // },
166
+ * // };
167
+ *
119
168
  * ```
120
169
  *
121
170
  * @param DescribeKeyCommandInput - {@link DescribeKeyCommandInput}
@@ -140,6 +189,8 @@ export interface DescribeKeyCommandOutput extends DescribeKeyResponse, __Metadat
140
189
  * <p>The request was rejected because the specified entity or resource could not be
141
190
  * found.</p>
142
191
  *
192
+ * @throws {@link KMSServiceException}
193
+ * <p>Base exception class for all service exceptions from KMS service.</p>
143
194
  *
144
195
  * @example To get details about a KMS key
145
196
  * ```javascript
@@ -310,7 +361,7 @@ export interface DescribeKeyCommandOutput extends DescribeKeyResponse, __Metadat
310
361
  * "KeyMetadata": {
311
362
  * "AWSAccountId": "123456789012",
312
363
  * "Arn": "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
313
- * "CloudHsmClusterId": "cluster-1a23b4cdefg",
364
+ * "CloudHsmClusterId": "cluster-234abcdefABC",
314
365
  * "CreationDate": 1646160362.664,
315
366
  * "CustomKeyStoreId": "cks-1234567890abcdef0",
316
367
  * "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
@@ -45,6 +45,8 @@ export interface DisableKeyCommandOutput extends __MetadataBearer {
45
45
  * };
46
46
  * const command = new DisableKeyCommand(input);
47
47
  * const response = await client.send(command);
48
+ * // {};
49
+ *
48
50
  * ```
49
51
  *
50
52
  * @param DisableKeyCommandInput - {@link DisableKeyCommandInput}
@@ -87,6 +89,8 @@ export interface DisableKeyCommandOutput extends __MetadataBearer {
87
89
  * <p>The request was rejected because the specified entity or resource could not be
88
90
  * found.</p>
89
91
  *
92
+ * @throws {@link KMSServiceException}
93
+ * <p>Base exception class for all service exceptions from KMS service.</p>
90
94
  *
91
95
  * @example To disable a KMS key
92
96
  * ```javascript
@@ -63,6 +63,8 @@ export interface DisableKeyRotationCommandOutput extends __MetadataBearer {
63
63
  * };
64
64
  * const command = new DisableKeyRotationCommand(input);
65
65
  * const response = await client.send(command);
66
+ * // {};
67
+ *
66
68
  * ```
67
69
  *
68
70
  * @param DisableKeyRotationCommandInput - {@link DisableKeyRotationCommandInput}
@@ -112,6 +114,8 @@ export interface DisableKeyRotationCommandOutput extends __MetadataBearer {
112
114
  * <p>The request was rejected because a specified parameter is not supported or a specified
113
115
  * resource is not valid for this operation.</p>
114
116
  *
117
+ * @throws {@link KMSServiceException}
118
+ * <p>Base exception class for all service exceptions from KMS service.</p>
115
119
  *
116
120
  * @example To disable automatic rotation of key material
117
121
  * ```javascript
@@ -82,6 +82,8 @@ export interface DisconnectCustomKeyStoreCommandOutput extends DisconnectCustomK
82
82
  * };
83
83
  * const command = new DisconnectCustomKeyStoreCommand(input);
84
84
  * const response = await client.send(command);
85
+ * // {};
86
+ *
85
87
  * ```
86
88
  *
87
89
  * @param DisconnectCustomKeyStoreCommandInput - {@link DisconnectCustomKeyStoreCommandInput}
@@ -134,6 +136,8 @@ export interface DisconnectCustomKeyStoreCommandOutput extends DisconnectCustomK
134
136
  * <p>The request was rejected because an internal exception occurred. The request can be
135
137
  * retried.</p>
136
138
  *
139
+ * @throws {@link KMSServiceException}
140
+ * <p>Base exception class for all service exceptions from KMS service.</p>
137
141
  *
138
142
  * @example To disconnect a custom key store from its CloudHSM cluster
139
143
  * ```javascript
@@ -143,7 +147,7 @@ export interface DisconnectCustomKeyStoreCommandOutput extends DisconnectCustomK
143
147
  * };
144
148
  * const command = new DisconnectCustomKeyStoreCommand(input);
145
149
  * await client.send(command);
146
- * // example id: to-disconnect-a-custom-key-store-from-its-cloudhsm-cluster-1628627955156
150
+ * // example id: to-disconnect-a-custom-key-store-from-its-cloudhsm-cluster-234abcdefABC
147
151
  * ```
148
152
  *
149
153
  * @example To disconnect a custom key store from its CloudHSM cluster
@@ -41,6 +41,8 @@ export interface EnableKeyCommandOutput extends __MetadataBearer {
41
41
  * };
42
42
  * const command = new EnableKeyCommand(input);
43
43
  * const response = await client.send(command);
44
+ * // {};
45
+ *
44
46
  * ```
45
47
  *
46
48
  * @param EnableKeyCommandInput - {@link EnableKeyCommandInput}
@@ -87,6 +89,8 @@ export interface EnableKeyCommandOutput extends __MetadataBearer {
87
89
  * <p>The request was rejected because the specified entity or resource could not be
88
90
  * found.</p>
89
91
  *
92
+ * @throws {@link KMSServiceException}
93
+ * <p>Base exception class for all service exceptions from KMS service.</p>
90
94
  *
91
95
  * @example To enable a KMS key
92
96
  * ```javascript
@@ -71,6 +71,8 @@ export interface EnableKeyRotationCommandOutput extends __MetadataBearer {
71
71
  * };
72
72
  * const command = new EnableKeyRotationCommand(input);
73
73
  * const response = await client.send(command);
74
+ * // {};
75
+ *
74
76
  * ```
75
77
  *
76
78
  * @param EnableKeyRotationCommandInput - {@link EnableKeyRotationCommandInput}
@@ -120,6 +122,8 @@ export interface EnableKeyRotationCommandOutput extends __MetadataBearer {
120
122
  * <p>The request was rejected because a specified parameter is not supported or a specified
121
123
  * resource is not valid for this operation.</p>
122
124
  *
125
+ * @throws {@link KMSServiceException}
126
+ * <p>Base exception class for all service exceptions from KMS service.</p>
123
127
  *
124
128
  * @example To enable automatic rotation of key material
125
129
  * ```javascript
@@ -148,6 +148,12 @@ export interface EncryptCommandOutput extends EncryptResponse, __MetadataBearer
148
148
  * };
149
149
  * const command = new EncryptCommand(input);
150
150
  * const response = await client.send(command);
151
+ * // { // EncryptResponse
152
+ * // CiphertextBlob: "BLOB_VALUE",
153
+ * // KeyId: "STRING_VALUE",
154
+ * // EncryptionAlgorithm: "SYMMETRIC_DEFAULT" || "RSAES_OAEP_SHA_1" || "RSAES_OAEP_SHA_256" || "SM2PKE",
155
+ * // };
156
+ *
151
157
  * ```
152
158
  *
153
159
  * @param EncryptCommandInput - {@link EncryptCommandInput}
@@ -217,10 +223,12 @@ export interface EncryptCommandOutput extends EncryptResponse, __MetadataBearer
217
223
  * <p>The request was rejected because the specified entity or resource could not be
218
224
  * found.</p>
219
225
  *
226
+ * @throws {@link KMSServiceException}
227
+ * <p>Base exception class for all service exceptions from KMS service.</p>
220
228
  *
221
- * @example To encrypt data
229
+ * @example To encrypt data with a symmetric encryption KMS key
222
230
  * ```javascript
223
- * // The following example encrypts data with the specified KMS key.
231
+ * // The following example encrypts data with the specified symmetric encryption KMS key.
224
232
  * const input = {
225
233
  * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
226
234
  * "Plaintext": "<binary data>"
@@ -230,10 +238,31 @@ export interface EncryptCommandOutput extends EncryptResponse, __MetadataBearer
230
238
  * /* response ==
231
239
  * {
232
240
  * "CiphertextBlob": "<binary data>",
241
+ * "EncryptionAlgorithm": "SYMMETRIC_DEFAULT",
233
242
  * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
234
243
  * }
235
244
  * *\/
236
- * // example id: to-encrypt-data-1478906026012
245
+ * // example id: to-encrypt-data-1
246
+ * ```
247
+ *
248
+ * @example To encrypt data with an asymmetric encryption KMS key
249
+ * ```javascript
250
+ * // The following example encrypts data with the specified RSA asymmetric KMS key. When you encrypt with an asymmetric key, you must specify the encryption algorithm.
251
+ * const input = {
252
+ * "EncryptionAlgorithm": "RSAES_OAEP_SHA_256",
253
+ * "KeyId": "0987dcba-09fe-87dc-65ba-ab0987654321",
254
+ * "Plaintext": "<binary data>"
255
+ * };
256
+ * const command = new EncryptCommand(input);
257
+ * const response = await client.send(command);
258
+ * /* response ==
259
+ * {
260
+ * "CiphertextBlob": "<binary data>",
261
+ * "EncryptionAlgorithm": "RSAES_OAEP_SHA_256",
262
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321"
263
+ * }
264
+ * *\/
265
+ * // example id: to-encrypt-data-2
237
266
  * ```
238
267
  *
239
268
  * @example To encrypt data with an asymmetric encryption KMS key