@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
@@ -93,6 +93,60 @@ export interface UpdatePrimaryRegionCommandOutput extends __MetadataBearer {
93
93
  * @see {@link UpdatePrimaryRegionCommandOutput} for command's `response` shape.
94
94
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
95
95
  *
96
+ * @throws {@link DisabledException} (client fault)
97
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
98
+ *
99
+ * @throws {@link InvalidArnException} (client fault)
100
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
101
+ * valid.</p>
102
+ *
103
+ * @throws {@link KMSInternalException} (server fault)
104
+ * <p>The request was rejected because an internal exception occurred. The request can be
105
+ * retried.</p>
106
+ *
107
+ * @throws {@link KMSInvalidStateException} (client fault)
108
+ * <p>The request was rejected because the state of the specified resource is not valid for this
109
+ * request.</p>
110
+ * <p>This exceptions means one of the following:</p>
111
+ * <ul>
112
+ * <li>
113
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
114
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
115
+ * information about which key states are compatible with each KMS operation, see
116
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
117
+ * <i>Key Management Service Developer Guide</i>
118
+ * </i>.</p>
119
+ * </li>
120
+ * <li>
121
+ * <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>
122
+ * </li>
123
+ * </ul>
124
+ *
125
+ * @throws {@link NotFoundException} (client fault)
126
+ * <p>The request was rejected because the specified entity or resource could not be
127
+ * found.</p>
128
+ *
129
+ * @throws {@link UnsupportedOperationException} (client fault)
130
+ * <p>The request was rejected because a specified parameter is not supported or a specified
131
+ * resource is not valid for this operation.</p>
132
+ *
133
+ *
134
+ * @example To update the primary Region of a multi-Region KMS key
135
+ * ```javascript
136
+ * // The following UpdatePrimaryRegion example changes the multi-Region replica key in the eu-central-1 Region to the primary key. The current primary key in the us-west-1 Region becomes a replica key.
137
+ * //
138
+ * // The KeyId parameter identifies the current primary key in the us-west-1 Region. The PrimaryRegion parameter indicates the Region of the replica key that will become the new primary key.
139
+ * //
140
+ * // This operation does not return any output. To verify that primary key is changed, use the DescribeKey operation.
141
+ * const input = {
142
+ * "KeyId": "arn:aws:kms:us-west-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
143
+ * "PrimaryRegion": "eu-central-1"
144
+ * };
145
+ * const command = new UpdatePrimaryRegionCommand(input);
146
+ * await client.send(command);
147
+ * // example id: to-update-the-primary-region-of-a-multi-region-kms-key-1660249555577
148
+ * ```
149
+ *
96
150
  */
97
151
  export declare class UpdatePrimaryRegionCommand extends $Command<UpdatePrimaryRegionCommandInput, UpdatePrimaryRegionCommandOutput, KMSClientResolvedConfig> {
98
152
  readonly input: UpdatePrimaryRegionCommandInput;
@@ -64,6 +64,117 @@ export interface VerifyCommandOutput extends VerifyResponse, __MetadataBearer {
64
64
  * @see {@link VerifyCommandOutput} for command's `response` shape.
65
65
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
66
66
  *
67
+ * @throws {@link DependencyTimeoutException} (server fault)
68
+ * <p>The system timed out while trying to fulfill the request. You can retry the
69
+ * request.</p>
70
+ *
71
+ * @throws {@link DisabledException} (client fault)
72
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
73
+ *
74
+ * @throws {@link InvalidGrantTokenException} (client fault)
75
+ * <p>The request was rejected because the specified grant token is not valid.</p>
76
+ *
77
+ * @throws {@link InvalidKeyUsageException} (client fault)
78
+ * <p>The request was rejected for one of the following reasons: </p>
79
+ * <ul>
80
+ * <li>
81
+ * <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
82
+ * operation.</p>
83
+ * </li>
84
+ * <li>
85
+ * <p>The encryption algorithm or signing algorithm specified for the operation is
86
+ * incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
87
+ * </li>
88
+ * </ul>
89
+ * <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
90
+ * <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
91
+ * messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
92
+ * verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
93
+ * <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
94
+ * <a>DescribeKey</a> operation.</p>
95
+ * <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
96
+ * <a>DescribeKey</a> operation.</p>
97
+ *
98
+ * @throws {@link KeyUnavailableException} (server fault)
99
+ * <p>The request was rejected because the specified KMS key was not available. You can retry
100
+ * the request.</p>
101
+ *
102
+ * @throws {@link KMSInternalException} (server fault)
103
+ * <p>The request was rejected because an internal exception occurred. The request can be
104
+ * retried.</p>
105
+ *
106
+ * @throws {@link KMSInvalidSignatureException} (client fault)
107
+ * <p>The request was rejected because the signature verification failed. Signature verification
108
+ * fails when it cannot confirm that signature was produced by signing the specified message with
109
+ * the specified KMS key and signing algorithm.</p>
110
+ *
111
+ * @throws {@link KMSInvalidStateException} (client fault)
112
+ * <p>The request was rejected because the state of the specified resource is not valid for this
113
+ * request.</p>
114
+ * <p>This exceptions means one of the following:</p>
115
+ * <ul>
116
+ * <li>
117
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
118
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
119
+ * information about which key states are compatible with each KMS operation, see
120
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
121
+ * <i>Key Management Service Developer Guide</i>
122
+ * </i>.</p>
123
+ * </li>
124
+ * <li>
125
+ * <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>
126
+ * </li>
127
+ * </ul>
128
+ *
129
+ * @throws {@link NotFoundException} (client fault)
130
+ * <p>The request was rejected because the specified entity or resource could not be
131
+ * found.</p>
132
+ *
133
+ *
134
+ * @example To use an asymmetric KMS key to verify a digital signature
135
+ * ```javascript
136
+ * // This operation uses the public key in an elliptic curve (ECC) asymmetric key to verify a digital signature within AWS KMS.
137
+ * const input = {
138
+ * "KeyId": "alias/ECC_signing_key",
139
+ * "Message": "<message to be verified>",
140
+ * "MessageType": "RAW",
141
+ * "Signature": "<binary data>",
142
+ * "SigningAlgorithm": "ECDSA_SHA_384"
143
+ * };
144
+ * const command = new VerifyCommand(input);
145
+ * const response = await client.send(command);
146
+ * /* response ==
147
+ * {
148
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
149
+ * "SignatureValid": true,
150
+ * "SigningAlgorithm": "ECDSA_SHA_384"
151
+ * }
152
+ * *\/
153
+ * // example id: to-use-an-asymmetric-kms-key-to-verify-a-digital-signature-1
154
+ * ```
155
+ *
156
+ * @example To use an asymmetric KMS key to verify a digital signature on a message digest
157
+ * ```javascript
158
+ * // This operation uses the public key in an RSA asymmetric signing key pair to verify the digital signature of a message digest. Hashing a message into a digest before sending it to KMS lets you verify messages that exceed the 4096-byte message size limit. To indicate that the value of Message is a digest, use the MessageType parameter
159
+ * const input = {
160
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
161
+ * "Message": "<message digest to be verified>",
162
+ * "MessageType": "DIGEST",
163
+ * "Signature": "<binary data>",
164
+ * "SigningAlgorithm": "RSASSA_PSS_SHA_512"
165
+ * };
166
+ * const command = new VerifyCommand(input);
167
+ * const response = await client.send(command);
168
+ * /* response ==
169
+ * {
170
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
171
+ * "SignatureValid": true,
172
+ * "SigningAlgorithm": "RSASSA_PSS_SHA_512"
173
+ * }
174
+ * *\/
175
+ * // example id: to-use-an-asymmetric-kms-key-to-verify-a-digital-signature-on-a-message-digest-2
176
+ * ```
177
+ *
67
178
  */
68
179
  export declare class VerifyCommand extends $Command<VerifyCommandInput, VerifyCommandOutput, KMSClientResolvedConfig> {
69
180
  readonly input: VerifyCommandInput;
@@ -49,6 +49,90 @@ export interface VerifyMacCommandOutput extends VerifyMacResponse, __MetadataBea
49
49
  * @see {@link VerifyMacCommandOutput} for command's `response` shape.
50
50
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
51
51
  *
52
+ * @throws {@link DisabledException} (client fault)
53
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
54
+ *
55
+ * @throws {@link InvalidGrantTokenException} (client fault)
56
+ * <p>The request was rejected because the specified grant token is not valid.</p>
57
+ *
58
+ * @throws {@link InvalidKeyUsageException} (client fault)
59
+ * <p>The request was rejected for one of the following reasons: </p>
60
+ * <ul>
61
+ * <li>
62
+ * <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
63
+ * operation.</p>
64
+ * </li>
65
+ * <li>
66
+ * <p>The encryption algorithm or signing algorithm specified for the operation is
67
+ * incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
68
+ * </li>
69
+ * </ul>
70
+ * <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
71
+ * <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
72
+ * messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
73
+ * verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
74
+ * <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
75
+ * <a>DescribeKey</a> operation.</p>
76
+ * <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
77
+ * <a>DescribeKey</a> operation.</p>
78
+ *
79
+ * @throws {@link KeyUnavailableException} (server fault)
80
+ * <p>The request was rejected because the specified KMS key was not available. You can retry
81
+ * the request.</p>
82
+ *
83
+ * @throws {@link KMSInternalException} (server fault)
84
+ * <p>The request was rejected because an internal exception occurred. The request can be
85
+ * retried.</p>
86
+ *
87
+ * @throws {@link KMSInvalidMacException} (client fault)
88
+ * <p>The request was rejected because the HMAC verification failed. HMAC verification fails
89
+ * when the HMAC computed by using the specified message, HMAC KMS key, and MAC algorithm does
90
+ * not match the HMAC specified in the request.</p>
91
+ *
92
+ * @throws {@link KMSInvalidStateException} (client fault)
93
+ * <p>The request was rejected because the state of the specified resource is not valid for this
94
+ * request.</p>
95
+ * <p>This exceptions means one of the following:</p>
96
+ * <ul>
97
+ * <li>
98
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
99
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
100
+ * information about which key states are compatible with each KMS operation, see
101
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
102
+ * <i>Key Management Service Developer Guide</i>
103
+ * </i>.</p>
104
+ * </li>
105
+ * <li>
106
+ * <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>
107
+ * </li>
108
+ * </ul>
109
+ *
110
+ * @throws {@link NotFoundException} (client fault)
111
+ * <p>The request was rejected because the specified entity or resource could not be
112
+ * found.</p>
113
+ *
114
+ *
115
+ * @example To verify an HMAC
116
+ * ```javascript
117
+ * // This example verifies an HMAC for a particular message, HMAC KMS keys, and MAC algorithm. A value of 'true' in the MacValid value in the response indicates that the HMAC is valid.
118
+ * const input = {
119
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
120
+ * "Mac": "<HMAC_TAG>",
121
+ * "MacAlgorithm": "HMAC_SHA_384",
122
+ * "Message": "Hello World"
123
+ * };
124
+ * const command = new VerifyMacCommand(input);
125
+ * const response = await client.send(command);
126
+ * /* response ==
127
+ * {
128
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
129
+ * "MacAlgorithm": "HMAC_SHA_384",
130
+ * "MacValid": true
131
+ * }
132
+ * *\/
133
+ * // example id: to-verify-an-hmac-1631570863401
134
+ * ```
135
+ *
52
136
  */
53
137
  export declare class VerifyMacCommand extends $Command<VerifyMacCommandInput, VerifyMacCommandOutput, KMSClientResolvedConfig> {
54
138
  readonly input: VerifyMacCommandInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-kms",
3
3
  "description": "AWS SDK for JavaScript Kms Client for Node.js, Browser and React Native",
4
- "version": "3.288.0",
4
+ "version": "3.290.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,37 +20,37 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.288.0",
24
- "@aws-sdk/config-resolver": "3.287.0",
25
- "@aws-sdk/credential-provider-node": "3.288.0",
26
- "@aws-sdk/fetch-http-handler": "3.282.0",
27
- "@aws-sdk/hash-node": "3.272.0",
28
- "@aws-sdk/invalid-dependency": "3.272.0",
29
- "@aws-sdk/middleware-content-length": "3.282.0",
30
- "@aws-sdk/middleware-endpoint": "3.282.0",
31
- "@aws-sdk/middleware-host-header": "3.282.0",
32
- "@aws-sdk/middleware-logger": "3.288.0",
33
- "@aws-sdk/middleware-recursion-detection": "3.282.0",
34
- "@aws-sdk/middleware-retry": "3.287.0",
35
- "@aws-sdk/middleware-serde": "3.272.0",
36
- "@aws-sdk/middleware-signing": "3.282.0",
37
- "@aws-sdk/middleware-stack": "3.272.0",
38
- "@aws-sdk/middleware-user-agent": "3.282.0",
39
- "@aws-sdk/node-config-provider": "3.287.0",
40
- "@aws-sdk/node-http-handler": "3.282.0",
41
- "@aws-sdk/protocol-http": "3.282.0",
42
- "@aws-sdk/smithy-client": "3.279.0",
43
- "@aws-sdk/types": "3.272.0",
44
- "@aws-sdk/url-parser": "3.272.0",
23
+ "@aws-sdk/client-sts": "3.290.0",
24
+ "@aws-sdk/config-resolver": "3.290.0",
25
+ "@aws-sdk/credential-provider-node": "3.290.0",
26
+ "@aws-sdk/fetch-http-handler": "3.290.0",
27
+ "@aws-sdk/hash-node": "3.290.0",
28
+ "@aws-sdk/invalid-dependency": "3.290.0",
29
+ "@aws-sdk/middleware-content-length": "3.290.0",
30
+ "@aws-sdk/middleware-endpoint": "3.290.0",
31
+ "@aws-sdk/middleware-host-header": "3.290.0",
32
+ "@aws-sdk/middleware-logger": "3.290.0",
33
+ "@aws-sdk/middleware-recursion-detection": "3.290.0",
34
+ "@aws-sdk/middleware-retry": "3.290.0",
35
+ "@aws-sdk/middleware-serde": "3.290.0",
36
+ "@aws-sdk/middleware-signing": "3.290.0",
37
+ "@aws-sdk/middleware-stack": "3.290.0",
38
+ "@aws-sdk/middleware-user-agent": "3.290.0",
39
+ "@aws-sdk/node-config-provider": "3.290.0",
40
+ "@aws-sdk/node-http-handler": "3.290.0",
41
+ "@aws-sdk/protocol-http": "3.290.0",
42
+ "@aws-sdk/smithy-client": "3.290.0",
43
+ "@aws-sdk/types": "3.290.0",
44
+ "@aws-sdk/url-parser": "3.290.0",
45
45
  "@aws-sdk/util-base64": "3.208.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
47
  "@aws-sdk/util-body-length-node": "3.208.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.279.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.287.0",
50
- "@aws-sdk/util-endpoints": "3.272.0",
51
- "@aws-sdk/util-retry": "3.272.0",
52
- "@aws-sdk/util-user-agent-browser": "3.282.0",
53
- "@aws-sdk/util-user-agent-node": "3.287.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.290.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.290.0",
50
+ "@aws-sdk/util-endpoints": "3.290.0",
51
+ "@aws-sdk/util-retry": "3.290.0",
52
+ "@aws-sdk/util-user-agent-browser": "3.290.0",
53
+ "@aws-sdk/util-user-agent-node": "3.290.0",
54
54
  "@aws-sdk/util-utf8": "3.254.0",
55
55
  "tslib": "^2.3.1"
56
56
  },