@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.
- package/dist-types/commands/CancelKeyDeletionCommand.d.ts +51 -0
- package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +96 -0
- package/dist-types/commands/CreateAliasCommand.d.ts +54 -0
- package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +193 -0
- package/dist-types/commands/CreateGrantCommand.d.ts +67 -0
- package/dist-types/commands/CreateKeyCommand.d.ts +405 -0
- package/dist-types/commands/DecryptCommand.d.ts +94 -0
- package/dist-types/commands/DeleteAliasCommand.d.ts +42 -0
- package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +62 -0
- package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +50 -0
- package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +114 -0
- package/dist-types/commands/DescribeKeyCommand.d.ts +245 -0
- package/dist-types/commands/DisableKeyCommand.d.ts +46 -0
- package/dist-types/commands/DisableKeyRotationCommand.d.ts +53 -0
- package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +56 -0
- package/dist-types/commands/EnableKeyCommand.d.ts +50 -0
- package/dist-types/commands/EnableKeyRotationCommand.d.ts +53 -0
- package/dist-types/commands/EncryptCommand.d.ts +80 -0
- package/dist-types/commands/GenerateDataKeyCommand.d.ts +81 -0
- package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +87 -0
- package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +86 -0
- package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +80 -0
- package/dist-types/commands/GenerateMacCommand.d.ts +78 -0
- package/dist-types/commands/GenerateRandomCommand.d.ts +69 -0
- package/dist-types/commands/GetKeyPolicyCommand.d.ts +52 -0
- package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +55 -0
- package/dist-types/commands/GetParametersForImportCommand.d.ts +60 -0
- package/dist-types/commands/GetPublicKeyCommand.d.ts +93 -0
- package/dist-types/commands/ImportKeyMaterialCommand.d.ts +73 -0
- package/dist-types/commands/ListAliasesCommand.d.ts +77 -0
- package/dist-types/commands/ListGrantsCommand.d.ts +111 -0
- package/dist-types/commands/ListKeyPoliciesCommand.d.ts +54 -0
- package/dist-types/commands/ListKeysCommand.d.ts +57 -0
- package/dist-types/commands/ListResourceTagsCommand.d.ts +47 -0
- package/dist-types/commands/ListRetirableGrantsCommand.d.ts +51 -0
- package/dist-types/commands/PutKeyPolicyCommand.d.ts +60 -0
- package/dist-types/commands/ReEncryptCommand.d.ts +95 -0
- package/dist-types/commands/ReplicateKeyCommand.d.ts +101 -0
- package/dist-types/commands/RetireGrantCommand.d.ts +53 -0
- package/dist-types/commands/RevokeGrantCommand.d.ts +50 -0
- package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +53 -0
- package/dist-types/commands/SignCommand.d.ts +104 -0
- package/dist-types/commands/TagResourceCommand.d.ts +55 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +49 -0
- package/dist-types/commands/UpdateAliasCommand.d.ts +47 -0
- package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +234 -0
- package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +47 -0
- package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +54 -0
- package/dist-types/commands/VerifyCommand.d.ts +111 -0
- package/dist-types/commands/VerifyMacCommand.d.ts +84 -0
- package/package.json +29 -29
|
@@ -69,6 +69,59 @@ export interface EnableKeyRotationCommandOutput extends __MetadataBearer {
|
|
|
69
69
|
* @see {@link EnableKeyRotationCommandOutput} for command's `response` shape.
|
|
70
70
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
71
71
|
*
|
|
72
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
73
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
74
|
+
* request.</p>
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link DisabledException} (client fault)
|
|
77
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
80
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
81
|
+
* valid.</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 KMSInvalidStateException} (client fault)
|
|
88
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
89
|
+
* request.</p>
|
|
90
|
+
* <p>This exceptions means one of the following:</p>
|
|
91
|
+
* <ul>
|
|
92
|
+
* <li>
|
|
93
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
94
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
95
|
+
* information about which key states are compatible with each KMS operation, see
|
|
96
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
97
|
+
* <i>Key Management Service Developer Guide</i>
|
|
98
|
+
* </i>.</p>
|
|
99
|
+
* </li>
|
|
100
|
+
* <li>
|
|
101
|
+
* <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>
|
|
102
|
+
* </li>
|
|
103
|
+
* </ul>
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link NotFoundException} (client fault)
|
|
106
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
107
|
+
* found.</p>
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link UnsupportedOperationException} (client fault)
|
|
110
|
+
* <p>The request was rejected because a specified parameter is not supported or a specified
|
|
111
|
+
* resource is not valid for this operation.</p>
|
|
112
|
+
*
|
|
113
|
+
*
|
|
114
|
+
* @example To enable automatic rotation of key material
|
|
115
|
+
* ```javascript
|
|
116
|
+
* // The following example enables automatic annual rotation of the key material for the specified KMS key.
|
|
117
|
+
* const input = {
|
|
118
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
119
|
+
* };
|
|
120
|
+
* const command = new EnableKeyRotationCommand(input);
|
|
121
|
+
* await client.send(command);
|
|
122
|
+
* // example id: to-enable-automatic-rotation-of-key-material-1478629109677
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
72
125
|
*/
|
|
73
126
|
export declare class EnableKeyRotationCommand extends $Command<EnableKeyRotationCommandInput, EnableKeyRotationCommandOutput, KMSClientResolvedConfig> {
|
|
74
127
|
readonly input: EnableKeyRotationCommandInput;
|
|
@@ -138,6 +138,86 @@ export interface EncryptCommandOutput extends EncryptResponse, __MetadataBearer
|
|
|
138
138
|
* @see {@link EncryptCommandOutput} for command's `response` shape.
|
|
139
139
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
140
140
|
*
|
|
141
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
142
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
143
|
+
* request.</p>
|
|
144
|
+
*
|
|
145
|
+
* @throws {@link DisabledException} (client fault)
|
|
146
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
147
|
+
*
|
|
148
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
149
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
150
|
+
*
|
|
151
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
152
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
153
|
+
* <ul>
|
|
154
|
+
* <li>
|
|
155
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
156
|
+
* operation.</p>
|
|
157
|
+
* </li>
|
|
158
|
+
* <li>
|
|
159
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
160
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
161
|
+
* </li>
|
|
162
|
+
* </ul>
|
|
163
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
164
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
165
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
166
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
167
|
+
* <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
168
|
+
* <a>DescribeKey</a> operation.</p>
|
|
169
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
170
|
+
* <a>DescribeKey</a> operation.</p>
|
|
171
|
+
*
|
|
172
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
173
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
174
|
+
* the request.</p>
|
|
175
|
+
*
|
|
176
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
177
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
178
|
+
* retried.</p>
|
|
179
|
+
*
|
|
180
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
181
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
182
|
+
* request.</p>
|
|
183
|
+
* <p>This exceptions means one of the following:</p>
|
|
184
|
+
* <ul>
|
|
185
|
+
* <li>
|
|
186
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
187
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
188
|
+
* information about which key states are compatible with each KMS operation, see
|
|
189
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
190
|
+
* <i>Key Management Service Developer Guide</i>
|
|
191
|
+
* </i>.</p>
|
|
192
|
+
* </li>
|
|
193
|
+
* <li>
|
|
194
|
+
* <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>
|
|
195
|
+
* </li>
|
|
196
|
+
* </ul>
|
|
197
|
+
*
|
|
198
|
+
* @throws {@link NotFoundException} (client fault)
|
|
199
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
200
|
+
* found.</p>
|
|
201
|
+
*
|
|
202
|
+
*
|
|
203
|
+
* @example To encrypt data
|
|
204
|
+
* ```javascript
|
|
205
|
+
* // The following example encrypts data with the specified KMS key.
|
|
206
|
+
* const input = {
|
|
207
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
208
|
+
* "Plaintext": "<binary data>"
|
|
209
|
+
* };
|
|
210
|
+
* const command = new EncryptCommand(input);
|
|
211
|
+
* const response = await client.send(command);
|
|
212
|
+
* /* response ==
|
|
213
|
+
* {
|
|
214
|
+
* "CiphertextBlob": "<binary data>",
|
|
215
|
+
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
216
|
+
* }
|
|
217
|
+
* *\/
|
|
218
|
+
* // example id: to-encrypt-data-1478906026012
|
|
219
|
+
* ```
|
|
220
|
+
*
|
|
141
221
|
*/
|
|
142
222
|
export declare class EncryptCommand extends $Command<EncryptCommandInput, EncryptCommandOutput, KMSClientResolvedConfig> {
|
|
143
223
|
readonly input: EncryptCommandInput;
|
|
@@ -122,6 +122,87 @@ export interface GenerateDataKeyCommandOutput extends GenerateDataKeyResponse, _
|
|
|
122
122
|
* @see {@link GenerateDataKeyCommandOutput} for command's `response` shape.
|
|
123
123
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
124
124
|
*
|
|
125
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
126
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
127
|
+
* request.</p>
|
|
128
|
+
*
|
|
129
|
+
* @throws {@link DisabledException} (client fault)
|
|
130
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
131
|
+
*
|
|
132
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
133
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
134
|
+
*
|
|
135
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
136
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
137
|
+
* <ul>
|
|
138
|
+
* <li>
|
|
139
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
140
|
+
* operation.</p>
|
|
141
|
+
* </li>
|
|
142
|
+
* <li>
|
|
143
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
144
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
145
|
+
* </li>
|
|
146
|
+
* </ul>
|
|
147
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
148
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
149
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
150
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
151
|
+
* <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
152
|
+
* <a>DescribeKey</a> operation.</p>
|
|
153
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
154
|
+
* <a>DescribeKey</a> operation.</p>
|
|
155
|
+
*
|
|
156
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
157
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
158
|
+
* the request.</p>
|
|
159
|
+
*
|
|
160
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
161
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
162
|
+
* retried.</p>
|
|
163
|
+
*
|
|
164
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
165
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
166
|
+
* request.</p>
|
|
167
|
+
* <p>This exceptions means one of the following:</p>
|
|
168
|
+
* <ul>
|
|
169
|
+
* <li>
|
|
170
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
171
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
172
|
+
* information about which key states are compatible with each KMS operation, see
|
|
173
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
174
|
+
* <i>Key Management Service Developer Guide</i>
|
|
175
|
+
* </i>.</p>
|
|
176
|
+
* </li>
|
|
177
|
+
* <li>
|
|
178
|
+
* <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>
|
|
179
|
+
* </li>
|
|
180
|
+
* </ul>
|
|
181
|
+
*
|
|
182
|
+
* @throws {@link NotFoundException} (client fault)
|
|
183
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
184
|
+
* found.</p>
|
|
185
|
+
*
|
|
186
|
+
*
|
|
187
|
+
* @example To generate a data key
|
|
188
|
+
* ```javascript
|
|
189
|
+
* // The following example generates a 256-bit symmetric data encryption key (data key) in two formats. One is the unencrypted (plainext) data key, and the other is the data key encrypted with the specified KMS key.
|
|
190
|
+
* const input = {
|
|
191
|
+
* "KeyId": "alias/ExampleAlias",
|
|
192
|
+
* "KeySpec": "AES_256"
|
|
193
|
+
* };
|
|
194
|
+
* const command = new GenerateDataKeyCommand(input);
|
|
195
|
+
* const response = await client.send(command);
|
|
196
|
+
* /* response ==
|
|
197
|
+
* {
|
|
198
|
+
* "CiphertextBlob": "<binary data>",
|
|
199
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
200
|
+
* "Plaintext": "<binary data>"
|
|
201
|
+
* }
|
|
202
|
+
* *\/
|
|
203
|
+
* // example id: to-generate-a-data-key-1478912956062
|
|
204
|
+
* ```
|
|
205
|
+
*
|
|
125
206
|
*/
|
|
126
207
|
export declare class GenerateDataKeyCommand extends $Command<GenerateDataKeyCommandInput, GenerateDataKeyCommandOutput, KMSClientResolvedConfig> {
|
|
127
208
|
readonly input: GenerateDataKeyCommandInput;
|
|
@@ -99,6 +99,93 @@ export interface GenerateDataKeyPairCommandOutput extends GenerateDataKeyPairRes
|
|
|
99
99
|
* @see {@link GenerateDataKeyPairCommandOutput} for command's `response` shape.
|
|
100
100
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
101
101
|
*
|
|
102
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
103
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
104
|
+
* request.</p>
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link DisabledException} (client fault)
|
|
107
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
110
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
111
|
+
*
|
|
112
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
113
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
114
|
+
* <ul>
|
|
115
|
+
* <li>
|
|
116
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
117
|
+
* operation.</p>
|
|
118
|
+
* </li>
|
|
119
|
+
* <li>
|
|
120
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
121
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
122
|
+
* </li>
|
|
123
|
+
* </ul>
|
|
124
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
125
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
126
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
127
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
128
|
+
* <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
129
|
+
* <a>DescribeKey</a> operation.</p>
|
|
130
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
131
|
+
* <a>DescribeKey</a> operation.</p>
|
|
132
|
+
*
|
|
133
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
134
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
135
|
+
* the request.</p>
|
|
136
|
+
*
|
|
137
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
138
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
139
|
+
* retried.</p>
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
142
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
143
|
+
* request.</p>
|
|
144
|
+
* <p>This exceptions means one of the following:</p>
|
|
145
|
+
* <ul>
|
|
146
|
+
* <li>
|
|
147
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
148
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
149
|
+
* information about which key states are compatible with each KMS operation, see
|
|
150
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
151
|
+
* <i>Key Management Service Developer Guide</i>
|
|
152
|
+
* </i>.</p>
|
|
153
|
+
* </li>
|
|
154
|
+
* <li>
|
|
155
|
+
* <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>
|
|
156
|
+
* </li>
|
|
157
|
+
* </ul>
|
|
158
|
+
*
|
|
159
|
+
* @throws {@link NotFoundException} (client fault)
|
|
160
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
161
|
+
* found.</p>
|
|
162
|
+
*
|
|
163
|
+
* @throws {@link UnsupportedOperationException} (client fault)
|
|
164
|
+
* <p>The request was rejected because a specified parameter is not supported or a specified
|
|
165
|
+
* resource is not valid for this operation.</p>
|
|
166
|
+
*
|
|
167
|
+
*
|
|
168
|
+
* @example To generate an RSA key pair for encryption and decryption
|
|
169
|
+
* ```javascript
|
|
170
|
+
* // This example generates an RSA data key pair for encryption and decryption. The operation returns a plaintext public key and private key, and a copy of the private key that is encrypted under a symmetric encryption KMS key that you specify.
|
|
171
|
+
* const input = {
|
|
172
|
+
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
173
|
+
* "KeyPairSpec": "RSA_3072"
|
|
174
|
+
* };
|
|
175
|
+
* const command = new GenerateDataKeyPairCommand(input);
|
|
176
|
+
* const response = await client.send(command);
|
|
177
|
+
* /* response ==
|
|
178
|
+
* {
|
|
179
|
+
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
180
|
+
* "KeyPairSpec": "RSA_3072",
|
|
181
|
+
* "PrivateKeyCiphertextBlob": "<binary data>",
|
|
182
|
+
* "PrivateKeyPlaintext": "<binary data>",
|
|
183
|
+
* "PublicKey": "<binary data>"
|
|
184
|
+
* }
|
|
185
|
+
* *\/
|
|
186
|
+
* // example id: to-generate-an-rsa-key-pair-for-encryption-and-decryption-1628619376878
|
|
187
|
+
* ```
|
|
188
|
+
*
|
|
102
189
|
*/
|
|
103
190
|
export declare class GenerateDataKeyPairCommand extends $Command<GenerateDataKeyPairCommandInput, GenerateDataKeyPairCommandOutput, KMSClientResolvedConfig> {
|
|
104
191
|
readonly input: GenerateDataKeyPairCommandInput;
|
|
@@ -91,6 +91,92 @@ export interface GenerateDataKeyPairWithoutPlaintextCommandOutput extends Genera
|
|
|
91
91
|
* @see {@link GenerateDataKeyPairWithoutPlaintextCommandOutput} for command's `response` shape.
|
|
92
92
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
93
93
|
*
|
|
94
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
95
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
96
|
+
* request.</p>
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link DisabledException} (client fault)
|
|
99
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
100
|
+
*
|
|
101
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
102
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
103
|
+
*
|
|
104
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
105
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
106
|
+
* <ul>
|
|
107
|
+
* <li>
|
|
108
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
109
|
+
* operation.</p>
|
|
110
|
+
* </li>
|
|
111
|
+
* <li>
|
|
112
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
113
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
114
|
+
* </li>
|
|
115
|
+
* </ul>
|
|
116
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
117
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
118
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
119
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
120
|
+
* <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
121
|
+
* <a>DescribeKey</a> operation.</p>
|
|
122
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
123
|
+
* <a>DescribeKey</a> operation.</p>
|
|
124
|
+
*
|
|
125
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
126
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
127
|
+
* the request.</p>
|
|
128
|
+
*
|
|
129
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
130
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
131
|
+
* retried.</p>
|
|
132
|
+
*
|
|
133
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
134
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
135
|
+
* request.</p>
|
|
136
|
+
* <p>This exceptions means one of the following:</p>
|
|
137
|
+
* <ul>
|
|
138
|
+
* <li>
|
|
139
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
140
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
141
|
+
* information about which key states are compatible with each KMS operation, see
|
|
142
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
143
|
+
* <i>Key Management Service Developer Guide</i>
|
|
144
|
+
* </i>.</p>
|
|
145
|
+
* </li>
|
|
146
|
+
* <li>
|
|
147
|
+
* <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>
|
|
148
|
+
* </li>
|
|
149
|
+
* </ul>
|
|
150
|
+
*
|
|
151
|
+
* @throws {@link NotFoundException} (client fault)
|
|
152
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
153
|
+
* found.</p>
|
|
154
|
+
*
|
|
155
|
+
* @throws {@link UnsupportedOperationException} (client fault)
|
|
156
|
+
* <p>The request was rejected because a specified parameter is not supported or a specified
|
|
157
|
+
* resource is not valid for this operation.</p>
|
|
158
|
+
*
|
|
159
|
+
*
|
|
160
|
+
* @example To generate an asymmetric data key pair without a plaintext key
|
|
161
|
+
* ```javascript
|
|
162
|
+
* // This example returns an asymmetric elliptic curve (ECC) data key pair. The private key is encrypted under the symmetric encryption KMS key that you specify. This operation doesn't return a plaintext (unencrypted) private key.
|
|
163
|
+
* const input = {
|
|
164
|
+
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
165
|
+
* "KeyPairSpec": "ECC_NIST_P521"
|
|
166
|
+
* };
|
|
167
|
+
* const command = new GenerateDataKeyPairWithoutPlaintextCommand(input);
|
|
168
|
+
* const response = await client.send(command);
|
|
169
|
+
* /* response ==
|
|
170
|
+
* {
|
|
171
|
+
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
172
|
+
* "KeyPairSpec": "ECC_NIST_P521",
|
|
173
|
+
* "PrivateKeyCiphertextBlob": "<binary data>",
|
|
174
|
+
* "PublicKey": "<binary data>"
|
|
175
|
+
* }
|
|
176
|
+
* *\/
|
|
177
|
+
* // example id: to-generate-an-asymmetric-data-key-pair-without-a-plaintext-key-1628620971564
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
94
180
|
*/
|
|
95
181
|
export declare class GenerateDataKeyPairWithoutPlaintextCommand extends $Command<GenerateDataKeyPairWithoutPlaintextCommandInput, GenerateDataKeyPairWithoutPlaintextCommandOutput, KMSClientResolvedConfig> {
|
|
96
182
|
readonly input: GenerateDataKeyPairWithoutPlaintextCommandInput;
|
|
@@ -100,6 +100,86 @@ export interface GenerateDataKeyWithoutPlaintextCommandOutput extends GenerateDa
|
|
|
100
100
|
* @see {@link GenerateDataKeyWithoutPlaintextCommandOutput} for command's `response` shape.
|
|
101
101
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
102
102
|
*
|
|
103
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
104
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
105
|
+
* request.</p>
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link DisabledException} (client fault)
|
|
108
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
109
|
+
*
|
|
110
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
111
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
112
|
+
*
|
|
113
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
114
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
115
|
+
* <ul>
|
|
116
|
+
* <li>
|
|
117
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
118
|
+
* operation.</p>
|
|
119
|
+
* </li>
|
|
120
|
+
* <li>
|
|
121
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
122
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
123
|
+
* </li>
|
|
124
|
+
* </ul>
|
|
125
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
126
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
127
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
128
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
129
|
+
* <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
130
|
+
* <a>DescribeKey</a> operation.</p>
|
|
131
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
132
|
+
* <a>DescribeKey</a> operation.</p>
|
|
133
|
+
*
|
|
134
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
135
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
136
|
+
* the request.</p>
|
|
137
|
+
*
|
|
138
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
139
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
140
|
+
* retried.</p>
|
|
141
|
+
*
|
|
142
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
143
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
144
|
+
* request.</p>
|
|
145
|
+
* <p>This exceptions means one of the following:</p>
|
|
146
|
+
* <ul>
|
|
147
|
+
* <li>
|
|
148
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
149
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
150
|
+
* information about which key states are compatible with each KMS operation, see
|
|
151
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
152
|
+
* <i>Key Management Service Developer Guide</i>
|
|
153
|
+
* </i>.</p>
|
|
154
|
+
* </li>
|
|
155
|
+
* <li>
|
|
156
|
+
* <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>
|
|
157
|
+
* </li>
|
|
158
|
+
* </ul>
|
|
159
|
+
*
|
|
160
|
+
* @throws {@link NotFoundException} (client fault)
|
|
161
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
162
|
+
* found.</p>
|
|
163
|
+
*
|
|
164
|
+
*
|
|
165
|
+
* @example To generate an encrypted data key
|
|
166
|
+
* ```javascript
|
|
167
|
+
* // The following example generates an encrypted copy of a 256-bit symmetric data encryption key (data key). The data key is encrypted with the specified KMS key.
|
|
168
|
+
* const input = {
|
|
169
|
+
* "KeyId": "alias/ExampleAlias",
|
|
170
|
+
* "KeySpec": "AES_256"
|
|
171
|
+
* };
|
|
172
|
+
* const command = new GenerateDataKeyWithoutPlaintextCommand(input);
|
|
173
|
+
* const response = await client.send(command);
|
|
174
|
+
* /* response ==
|
|
175
|
+
* {
|
|
176
|
+
* "CiphertextBlob": "<binary data>",
|
|
177
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
178
|
+
* }
|
|
179
|
+
* *\/
|
|
180
|
+
* // example id: to-generate-an-encrypted-data-key-1478914121134
|
|
181
|
+
* ```
|
|
182
|
+
*
|
|
103
183
|
*/
|
|
104
184
|
export declare class GenerateDataKeyWithoutPlaintextCommand extends $Command<GenerateDataKeyWithoutPlaintextCommandInput, GenerateDataKeyWithoutPlaintextCommandOutput, KMSClientResolvedConfig> {
|
|
105
185
|
readonly input: GenerateDataKeyWithoutPlaintextCommandInput;
|
|
@@ -56,6 +56,84 @@ export interface GenerateMacCommandOutput extends GenerateMacResponse, __Metadat
|
|
|
56
56
|
* @see {@link GenerateMacCommandOutput} for command's `response` shape.
|
|
57
57
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
58
58
|
*
|
|
59
|
+
* @throws {@link DisabledException} (client fault)
|
|
60
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
63
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
66
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
67
|
+
* <ul>
|
|
68
|
+
* <li>
|
|
69
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
70
|
+
* operation.</p>
|
|
71
|
+
* </li>
|
|
72
|
+
* <li>
|
|
73
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
74
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
75
|
+
* </li>
|
|
76
|
+
* </ul>
|
|
77
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
78
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
79
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
80
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
81
|
+
* <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
82
|
+
* <a>DescribeKey</a> operation.</p>
|
|
83
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
84
|
+
* <a>DescribeKey</a> operation.</p>
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
87
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
88
|
+
* the request.</p>
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
91
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
92
|
+
* retried.</p>
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
95
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
96
|
+
* request.</p>
|
|
97
|
+
* <p>This exceptions means one of the following:</p>
|
|
98
|
+
* <ul>
|
|
99
|
+
* <li>
|
|
100
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
101
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
102
|
+
* information about which key states are compatible with each KMS operation, see
|
|
103
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
104
|
+
* <i>Key Management Service Developer Guide</i>
|
|
105
|
+
* </i>.</p>
|
|
106
|
+
* </li>
|
|
107
|
+
* <li>
|
|
108
|
+
* <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>
|
|
109
|
+
* </li>
|
|
110
|
+
* </ul>
|
|
111
|
+
*
|
|
112
|
+
* @throws {@link NotFoundException} (client fault)
|
|
113
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
114
|
+
* found.</p>
|
|
115
|
+
*
|
|
116
|
+
*
|
|
117
|
+
* @example To generate an HMAC for a message
|
|
118
|
+
* ```javascript
|
|
119
|
+
* // This example generates an HMAC for a message, an HMAC KMS key, and a MAC algorithm. The algorithm must be supported by the specified HMAC KMS key.
|
|
120
|
+
* const input = {
|
|
121
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
122
|
+
* "MacAlgorithm": "HMAC_SHA_384",
|
|
123
|
+
* "Message": "Hello World"
|
|
124
|
+
* };
|
|
125
|
+
* const command = new GenerateMacCommand(input);
|
|
126
|
+
* const response = await client.send(command);
|
|
127
|
+
* /* response ==
|
|
128
|
+
* {
|
|
129
|
+
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
130
|
+
* "Mac": "<HMAC_TAG>",
|
|
131
|
+
* "MacAlgorithm": "HMAC_SHA_384"
|
|
132
|
+
* }
|
|
133
|
+
* *\/
|
|
134
|
+
* // example id: to-generate-an-hmac-for-a-message-1631570135665
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
59
137
|
*/
|
|
60
138
|
export declare class GenerateMacCommand extends $Command<GenerateMacCommandInput, GenerateMacCommandOutput, KMSClientResolvedConfig> {
|
|
61
139
|
readonly input: GenerateMacCommandInput;
|