@aws-sdk/client-kms 3.289.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 +35 -0
  2. package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +85 -0
  3. package/dist-types/commands/CreateAliasCommand.d.ts +42 -0
  4. package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +125 -0
  5. package/dist-types/commands/CreateGrantCommand.d.ts +45 -0
  6. package/dist-types/commands/CreateKeyCommand.d.ts +122 -0
  7. package/dist-types/commands/DecryptCommand.d.ts +76 -0
  8. package/dist-types/commands/DeleteAliasCommand.d.ts +31 -0
  9. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +51 -0
  10. package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +39 -0
  11. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +13 -0
  12. package/dist-types/commands/DescribeKeyCommand.d.ts +17 -0
  13. package/dist-types/commands/DisableKeyCommand.d.ts +35 -0
  14. package/dist-types/commands/DisableKeyRotationCommand.d.ts +42 -0
  15. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +45 -0
  16. package/dist-types/commands/EnableKeyCommand.d.ts +39 -0
  17. package/dist-types/commands/EnableKeyRotationCommand.d.ts +42 -0
  18. package/dist-types/commands/EncryptCommand.d.ts +62 -0
  19. package/dist-types/commands/GenerateDataKeyCommand.d.ts +62 -0
  20. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +66 -0
  21. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +66 -0
  22. package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +62 -0
  23. package/dist-types/commands/GenerateMacCommand.d.ts +58 -0
  24. package/dist-types/commands/GenerateRandomCommand.d.ts +53 -0
  25. package/dist-types/commands/GetKeyPolicyCommand.d.ts +35 -0
  26. package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +39 -0
  27. package/dist-types/commands/GetParametersForImportCommand.d.ts +39 -0
  28. package/dist-types/commands/GetPublicKeyCommand.d.ts +70 -0
  29. package/dist-types/commands/ImportKeyMaterialCommand.d.ts +59 -0
  30. package/dist-types/commands/ListAliasesCommand.d.ts +21 -0
  31. package/dist-types/commands/ListGrantsCommand.d.ts +42 -0
  32. package/dist-types/commands/ListKeyPoliciesCommand.d.ts +35 -0
  33. package/dist-types/commands/ListKeysCommand.d.ts +13 -0
  34. package/dist-types/commands/ListResourceTagsCommand.d.ts +17 -0
  35. package/dist-types/commands/ListRetirableGrantsCommand.d.ts +21 -0
  36. package/dist-types/commands/PutKeyPolicyCommand.d.ts +47 -0
  37. package/dist-types/commands/ReEncryptCommand.d.ts +76 -0
  38. package/dist-types/commands/ReplicateKeyCommand.d.ts +53 -0
  39. package/dist-types/commands/RetireGrantCommand.d.ts +41 -0
  40. package/dist-types/commands/RevokeGrantCommand.d.ts +38 -0
  41. package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +35 -0
  42. package/dist-types/commands/SignCommand.d.ts +62 -0
  43. package/dist-types/commands/TagResourceCommand.d.ts +38 -0
  44. package/dist-types/commands/UntagResourceCommand.d.ts +34 -0
  45. package/dist-types/commands/UpdateAliasCommand.d.ts +35 -0
  46. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +157 -0
  47. package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +35 -0
  48. package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +38 -0
  49. package/dist-types/commands/VerifyCommand.d.ts +67 -0
  50. package/dist-types/commands/VerifyMacCommand.d.ts +63 -0
  51. package/package.json +29 -29
@@ -41,6 +41,41 @@ export interface CancelKeyDeletionCommandOutput extends CancelKeyDeletionRespons
41
41
  * @see {@link CancelKeyDeletionCommandOutput} for command's `response` shape.
42
42
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
43
43
  *
44
+ * @throws {@link DependencyTimeoutException} (server fault)
45
+ * <p>The system timed out while trying to fulfill the request. You can retry the
46
+ * request.</p>
47
+ *
48
+ * @throws {@link InvalidArnException} (client fault)
49
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
50
+ * valid.</p>
51
+ *
52
+ * @throws {@link KMSInternalException} (server fault)
53
+ * <p>The request was rejected because an internal exception occurred. The request can be
54
+ * retried.</p>
55
+ *
56
+ * @throws {@link KMSInvalidStateException} (client fault)
57
+ * <p>The request was rejected because the state of the specified resource is not valid for this
58
+ * request.</p>
59
+ * <p>This exceptions means one of the following:</p>
60
+ * <ul>
61
+ * <li>
62
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
63
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
64
+ * information about which key states are compatible with each KMS operation, see
65
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
66
+ * <i>Key Management Service Developer Guide</i>
67
+ * </i>.</p>
68
+ * </li>
69
+ * <li>
70
+ * <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>
71
+ * </li>
72
+ * </ul>
73
+ *
74
+ * @throws {@link NotFoundException} (client fault)
75
+ * <p>The request was rejected because the specified entity or resource could not be
76
+ * found.</p>
77
+ *
78
+ *
44
79
  * @example To cancel deletion of a KMS key
45
80
  * ```javascript
46
81
  * // The following example cancels deletion of the specified KMS key.
@@ -115,6 +115,91 @@ export interface ConnectCustomKeyStoreCommandOutput extends ConnectCustomKeyStor
115
115
  * @see {@link ConnectCustomKeyStoreCommandOutput} for command's `response` shape.
116
116
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
117
117
  *
118
+ * @throws {@link CloudHsmClusterInvalidConfigurationException} (client fault)
119
+ * <p>The request was rejected because the associated CloudHSM cluster did not meet the
120
+ * configuration requirements for an CloudHSM key store.</p>
121
+ * <ul>
122
+ * <li>
123
+ * <p>The CloudHSM cluster must be configured with private subnets in at least two different
124
+ * Availability Zones in the Region.</p>
125
+ * </li>
126
+ * <li>
127
+ * <p>The <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">security group for
128
+ * the cluster</a> (cloudhsm-cluster-<i><cluster-id></i>-sg) must
129
+ * include inbound rules and outbound rules that allow TCP traffic on ports 2223-2225. The
130
+ * <b>Source</b> in the inbound rules and the <b>Destination</b> in the outbound rules must match the security group
131
+ * ID. These rules are set by default when you create the CloudHSM cluster. Do not delete or
132
+ * change them. To get information about a particular security group, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html">DescribeSecurityGroups</a> operation.</p>
133
+ * </li>
134
+ * <li>
135
+ * <p>The CloudHSM cluster must contain at least as many HSMs as the operation requires. To add
136
+ * HSMs, use the CloudHSM <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation.</p>
137
+ * <p>For the <a>CreateCustomKeyStore</a>, <a>UpdateCustomKeyStore</a>, and <a>CreateKey</a> operations, the CloudHSM cluster must have at least two
138
+ * active HSMs, each in a different Availability Zone. For the <a>ConnectCustomKeyStore</a> operation, the CloudHSM must contain at least one active
139
+ * HSM.</p>
140
+ * </li>
141
+ * </ul>
142
+ * <p>For information about the requirements for an CloudHSM cluster that is associated with an
143
+ * CloudHSM key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the Prerequisites</a>
144
+ * in the <i>Key Management Service Developer Guide</i>. For information about creating a private subnet for an CloudHSM cluster,
145
+ * see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html">Create a Private
146
+ * Subnet</a> in the <i>CloudHSM User Guide</i>. For information about cluster security groups, see
147
+ * <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">Configure a Default Security
148
+ * Group</a> in the <i>
149
+ * <i>CloudHSM User Guide</i>
150
+ * </i>. </p>
151
+ *
152
+ * @throws {@link CloudHsmClusterNotActiveException} (client fault)
153
+ * <p>The request was rejected because the CloudHSM cluster associated with the CloudHSM key store is
154
+ * not active. Initialize and activate the cluster and try the command again. For detailed
155
+ * instructions, see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html">Getting
156
+ * Started</a> in the <i>CloudHSM User Guide</i>.</p>
157
+ *
158
+ * @throws {@link CustomKeyStoreInvalidStateException} (client fault)
159
+ * <p>The request was rejected because of the <code>ConnectionState</code> of the custom key
160
+ * store. To get the <code>ConnectionState</code> of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
161
+ * <p>This exception is thrown under the following conditions:</p>
162
+ * <ul>
163
+ * <li>
164
+ * <p>You requested the <a>ConnectCustomKeyStore</a> operation on a custom key
165
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
166
+ * <code>FAILED</code>. This operation is valid for all other <code>ConnectionState</code>
167
+ * values. To reconnect a custom key store in a <code>FAILED</code> state, disconnect it
168
+ * (<a>DisconnectCustomKeyStore</a>), then connect it
169
+ * (<code>ConnectCustomKeyStore</code>).</p>
170
+ * </li>
171
+ * <li>
172
+ * <p>You requested the <a>CreateKey</a> operation in a custom key store that is
173
+ * not connected. This operations is valid only when the custom key store
174
+ * <code>ConnectionState</code> is <code>CONNECTED</code>.</p>
175
+ * </li>
176
+ * <li>
177
+ * <p>You requested the <a>DisconnectCustomKeyStore</a> operation on a custom key
178
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
179
+ * <code>DISCONNECTED</code>. This operation is valid for all other
180
+ * <code>ConnectionState</code> values.</p>
181
+ * </li>
182
+ * <li>
183
+ * <p>You requested the <a>UpdateCustomKeyStore</a> or <a>DeleteCustomKeyStore</a> operation on a custom key store that is not
184
+ * disconnected. This operation is valid only when the custom key store
185
+ * <code>ConnectionState</code> is <code>DISCONNECTED</code>.</p>
186
+ * </li>
187
+ * <li>
188
+ * <p>You requested the <a>GenerateRandom</a> operation in an CloudHSM key store
189
+ * that is not connected. This operation is valid only when the CloudHSM key store
190
+ * <code>ConnectionState</code> is <code>CONNECTED</code>. </p>
191
+ * </li>
192
+ * </ul>
193
+ *
194
+ * @throws {@link CustomKeyStoreNotFoundException} (client fault)
195
+ * <p>The request was rejected because KMS cannot find a custom key store with the specified
196
+ * key store name or ID.</p>
197
+ *
198
+ * @throws {@link KMSInternalException} (server fault)
199
+ * <p>The request was rejected because an internal exception occurred. The request can be
200
+ * retried.</p>
201
+ *
202
+ *
118
203
  * @example To connect a custom key store
119
204
  * ```javascript
120
205
  * // This example connects an AWS KMS custom key store to its backing key store. For an AWS CloudHSM key store, it connects the key store to its AWS CloudHSM cluster. For an external key store, it connects the key store to the external key store proxy that communicates with your external key manager. This operation does not return any data. To verify that the custom key store is connected, use the <code>DescribeCustomKeyStores</code> operation.
@@ -85,6 +85,48 @@ export interface CreateAliasCommandOutput extends __MetadataBearer {
85
85
  * @see {@link CreateAliasCommandOutput} for command's `response` shape.
86
86
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
87
87
  *
88
+ * @throws {@link AlreadyExistsException} (client fault)
89
+ * <p>The request was rejected because it attempted to create a resource that already
90
+ * exists.</p>
91
+ *
92
+ * @throws {@link DependencyTimeoutException} (server fault)
93
+ * <p>The system timed out while trying to fulfill the request. You can retry the
94
+ * request.</p>
95
+ *
96
+ * @throws {@link InvalidAliasNameException} (client fault)
97
+ * <p>The request was rejected because the specified alias name is not valid.</p>
98
+ *
99
+ * @throws {@link KMSInternalException} (server fault)
100
+ * <p>The request was rejected because an internal exception occurred. The request can be
101
+ * retried.</p>
102
+ *
103
+ * @throws {@link KMSInvalidStateException} (client fault)
104
+ * <p>The request was rejected because the state of the specified resource is not valid for this
105
+ * request.</p>
106
+ * <p>This exceptions means one of the following:</p>
107
+ * <ul>
108
+ * <li>
109
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
110
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
111
+ * information about which key states are compatible with each KMS operation, see
112
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
113
+ * <i>Key Management Service Developer Guide</i>
114
+ * </i>.</p>
115
+ * </li>
116
+ * <li>
117
+ * <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>
118
+ * </li>
119
+ * </ul>
120
+ *
121
+ * @throws {@link LimitExceededException} (client fault)
122
+ * <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
123
+ * <i>Key Management Service Developer Guide</i>.</p>
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
+ *
88
130
  * @example To create an alias
89
131
  * ```javascript
90
132
  * // The following example creates an alias for the specified KMS key.
@@ -116,6 +116,131 @@ export interface CreateCustomKeyStoreCommandOutput extends CreateCustomKeyStoreR
116
116
  * @see {@link CreateCustomKeyStoreCommandOutput} for command's `response` shape.
117
117
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
118
118
  *
119
+ * @throws {@link CloudHsmClusterInUseException} (client fault)
120
+ * <p>The request was rejected because the specified CloudHSM cluster is already associated with an
121
+ * CloudHSM key store in the account, or it shares a backup history with an CloudHSM key store in the
122
+ * account. Each CloudHSM key store in the account must be associated with a different CloudHSM
123
+ * cluster.</p>
124
+ * <p>CloudHSM clusters that share a backup history have the same cluster certificate. To view the
125
+ * cluster certificate of an CloudHSM cluster, use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html">DescribeClusters</a> operation.</p>
126
+ *
127
+ * @throws {@link CloudHsmClusterInvalidConfigurationException} (client fault)
128
+ * <p>The request was rejected because the associated CloudHSM cluster did not meet the
129
+ * configuration requirements for an CloudHSM key store.</p>
130
+ * <ul>
131
+ * <li>
132
+ * <p>The CloudHSM cluster must be configured with private subnets in at least two different
133
+ * Availability Zones in the Region.</p>
134
+ * </li>
135
+ * <li>
136
+ * <p>The <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">security group for
137
+ * the cluster</a> (cloudhsm-cluster-<i><cluster-id></i>-sg) must
138
+ * include inbound rules and outbound rules that allow TCP traffic on ports 2223-2225. The
139
+ * <b>Source</b> in the inbound rules and the <b>Destination</b> in the outbound rules must match the security group
140
+ * ID. These rules are set by default when you create the CloudHSM cluster. Do not delete or
141
+ * change them. To get information about a particular security group, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html">DescribeSecurityGroups</a> operation.</p>
142
+ * </li>
143
+ * <li>
144
+ * <p>The CloudHSM cluster must contain at least as many HSMs as the operation requires. To add
145
+ * HSMs, use the CloudHSM <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation.</p>
146
+ * <p>For the <a>CreateCustomKeyStore</a>, <a>UpdateCustomKeyStore</a>, and <a>CreateKey</a> operations, the CloudHSM cluster must have at least two
147
+ * active HSMs, each in a different Availability Zone. For the <a>ConnectCustomKeyStore</a> operation, the CloudHSM must contain at least one active
148
+ * HSM.</p>
149
+ * </li>
150
+ * </ul>
151
+ * <p>For information about the requirements for an CloudHSM cluster that is associated with an
152
+ * CloudHSM key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the Prerequisites</a>
153
+ * in the <i>Key Management Service Developer Guide</i>. For information about creating a private subnet for an CloudHSM cluster,
154
+ * see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html">Create a Private
155
+ * Subnet</a> in the <i>CloudHSM User Guide</i>. For information about cluster security groups, see
156
+ * <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">Configure a Default Security
157
+ * Group</a> in the <i>
158
+ * <i>CloudHSM User Guide</i>
159
+ * </i>. </p>
160
+ *
161
+ * @throws {@link CloudHsmClusterNotActiveException} (client fault)
162
+ * <p>The request was rejected because the CloudHSM cluster associated with the CloudHSM key store is
163
+ * not active. Initialize and activate the cluster and try the command again. For detailed
164
+ * instructions, see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html">Getting
165
+ * Started</a> in the <i>CloudHSM User Guide</i>.</p>
166
+ *
167
+ * @throws {@link CloudHsmClusterNotFoundException} (client fault)
168
+ * <p>The request was rejected because KMS cannot find the CloudHSM cluster with the specified
169
+ * cluster ID. Retry the request with a different cluster ID.</p>
170
+ *
171
+ * @throws {@link CustomKeyStoreNameInUseException} (client fault)
172
+ * <p>The request was rejected because the specified custom key store name is already assigned
173
+ * to another custom key store in the account. Try again with a custom key store name that is
174
+ * unique in the account.</p>
175
+ *
176
+ * @throws {@link IncorrectTrustAnchorException} (client fault)
177
+ * <p>The request was rejected because the trust anchor certificate in the request to create an
178
+ * CloudHSM key store is not the trust anchor certificate for the specified CloudHSM cluster.</p>
179
+ * <p>When you <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr">initialize the CloudHSM cluster</a>, you create the trust anchor certificate and save it
180
+ * in the <code>customerCA.crt</code> file.</p>
181
+ *
182
+ * @throws {@link KMSInternalException} (server fault)
183
+ * <p>The request was rejected because an internal exception occurred. The request can be
184
+ * retried.</p>
185
+ *
186
+ * @throws {@link LimitExceededException} (client fault)
187
+ * <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
188
+ * <i>Key Management Service Developer Guide</i>.</p>
189
+ *
190
+ * @throws {@link XksProxyIncorrectAuthenticationCredentialException} (client fault)
191
+ * <p>The request was rejected because the proxy credentials failed to authenticate to the
192
+ * specified external key store proxy. The specified external key store proxy rejected a status
193
+ * request from KMS due to invalid credentials. This can indicate an error in the credentials
194
+ * or in the identification of the external key store proxy.</p>
195
+ *
196
+ * @throws {@link XksProxyInvalidConfigurationException} (client fault)
197
+ * <p>The request was rejected because the Amazon VPC endpoint service configuration does not fulfill
198
+ * the requirements for an external key store proxy. For details, see the exception
199
+ * message.</p>
200
+ *
201
+ * @throws {@link XksProxyInvalidResponseException} (client fault)
202
+ * <p></p>
203
+ * <p>KMS cannot interpret the response it received from the external key store proxy. The
204
+ * problem might be a poorly constructed response, but it could also be a transient network
205
+ * issue. If you see this error repeatedly, report it to the proxy vendor.</p>
206
+ *
207
+ * @throws {@link XksProxyUriEndpointInUseException} (client fault)
208
+ * <p>The request was rejected because the concatenation of the <code>XksProxyUriEndpoint</code>
209
+ * is already associated with an external key store in the Amazon Web Services account and Region. Each
210
+ * external key store in an account and Region must use a unique external key store proxy
211
+ * address.</p>
212
+ *
213
+ * @throws {@link XksProxyUriInUseException} (client fault)
214
+ * <p>The request was rejected because the concatenation of the <code>XksProxyUriEndpoint</code>
215
+ * and <code>XksProxyUriPath</code> is already associated with an external key store in the
216
+ * Amazon Web Services account and Region. Each external key store in an account and Region must use a unique
217
+ * external key store proxy API address.</p>
218
+ *
219
+ * @throws {@link XksProxyUriUnreachableException} (client fault)
220
+ * <p>KMS was unable to reach the specified <code>XksProxyUriPath</code>. The path must be
221
+ * reachable before you create the external key store or update its settings.</p>
222
+ * <p>This exception is also thrown when the external key store proxy response to a <code>GetHealthStatus</code>
223
+ * request indicates that all external key manager instances are unavailable.</p>
224
+ *
225
+ * @throws {@link XksProxyVpcEndpointServiceInUseException} (client fault)
226
+ * <p>The request was rejected because the specified Amazon VPC endpoint service is already
227
+ * associated with an external key store in the Amazon Web Services account and Region. Each external key store
228
+ * in an Amazon Web Services account and Region must use a different Amazon VPC endpoint service.</p>
229
+ *
230
+ * @throws {@link XksProxyVpcEndpointServiceInvalidConfigurationException} (client fault)
231
+ * <p>The request was rejected because the Amazon VPC endpoint service configuration does not fulfill
232
+ * the requirements for an external key store proxy. For details, see the exception message and
233
+ * <a href="kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements">review the requirements</a> for Amazon VPC endpoint service connectivity for an external key
234
+ * store.</p>
235
+ *
236
+ * @throws {@link XksProxyVpcEndpointServiceNotFoundException} (client fault)
237
+ * <p>The request was rejected because KMS could not find the specified VPC endpoint service.
238
+ * Use <a>DescribeCustomKeyStores</a> to verify the VPC endpoint service name for the
239
+ * external key store. Also, confirm that the <code>Allow principals</code> list for the VPC
240
+ * endpoint service includes the KMS service principal for the Region, such as
241
+ * <code>cks.kms.us-east-1.amazonaws.com</code>.</p>
242
+ *
243
+ *
119
244
  * @example To create an AWS CloudHSM key store
120
245
  * ```javascript
121
246
  * // This example creates a custom key store that is associated with an AWS CloudHSM cluster.
@@ -90,6 +90,51 @@ export interface CreateGrantCommandOutput extends CreateGrantResponse, __Metadat
90
90
  * @see {@link CreateGrantCommandOutput} for command's `response` shape.
91
91
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
92
92
  *
93
+ * @throws {@link DependencyTimeoutException} (server fault)
94
+ * <p>The system timed out while trying to fulfill the request. You can retry the
95
+ * request.</p>
96
+ *
97
+ * @throws {@link DisabledException} (client fault)
98
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
99
+ *
100
+ * @throws {@link InvalidArnException} (client fault)
101
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
102
+ * valid.</p>
103
+ *
104
+ * @throws {@link InvalidGrantTokenException} (client fault)
105
+ * <p>The request was rejected because the specified grant token is not valid.</p>
106
+ *
107
+ * @throws {@link KMSInternalException} (server fault)
108
+ * <p>The request was rejected because an internal exception occurred. The request can be
109
+ * retried.</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 LimitExceededException} (client fault)
130
+ * <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
131
+ * <i>Key Management Service Developer Guide</i>.</p>
132
+ *
133
+ * @throws {@link NotFoundException} (client fault)
134
+ * <p>The request was rejected because the specified entity or resource could not be
135
+ * found.</p>
136
+ *
137
+ *
93
138
  * @example To create a grant
94
139
  * ```javascript
95
140
  * // The following example creates a grant that allows the specified IAM role to encrypt data with the specified KMS key.
@@ -195,6 +195,128 @@ export interface CreateKeyCommandOutput extends CreateKeyResponse, __MetadataBea
195
195
  * @see {@link CreateKeyCommandOutput} for command's `response` shape.
196
196
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
197
197
  *
198
+ * @throws {@link CloudHsmClusterInvalidConfigurationException} (client fault)
199
+ * <p>The request was rejected because the associated CloudHSM cluster did not meet the
200
+ * configuration requirements for an CloudHSM key store.</p>
201
+ * <ul>
202
+ * <li>
203
+ * <p>The CloudHSM cluster must be configured with private subnets in at least two different
204
+ * Availability Zones in the Region.</p>
205
+ * </li>
206
+ * <li>
207
+ * <p>The <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">security group for
208
+ * the cluster</a> (cloudhsm-cluster-<i><cluster-id></i>-sg) must
209
+ * include inbound rules and outbound rules that allow TCP traffic on ports 2223-2225. The
210
+ * <b>Source</b> in the inbound rules and the <b>Destination</b> in the outbound rules must match the security group
211
+ * ID. These rules are set by default when you create the CloudHSM cluster. Do not delete or
212
+ * change them. To get information about a particular security group, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html">DescribeSecurityGroups</a> operation.</p>
213
+ * </li>
214
+ * <li>
215
+ * <p>The CloudHSM cluster must contain at least as many HSMs as the operation requires. To add
216
+ * HSMs, use the CloudHSM <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation.</p>
217
+ * <p>For the <a>CreateCustomKeyStore</a>, <a>UpdateCustomKeyStore</a>, and <a>CreateKey</a> operations, the CloudHSM cluster must have at least two
218
+ * active HSMs, each in a different Availability Zone. For the <a>ConnectCustomKeyStore</a> operation, the CloudHSM must contain at least one active
219
+ * HSM.</p>
220
+ * </li>
221
+ * </ul>
222
+ * <p>For information about the requirements for an CloudHSM cluster that is associated with an
223
+ * CloudHSM key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the Prerequisites</a>
224
+ * in the <i>Key Management Service Developer Guide</i>. For information about creating a private subnet for an CloudHSM cluster,
225
+ * see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html">Create a Private
226
+ * Subnet</a> in the <i>CloudHSM User Guide</i>. For information about cluster security groups, see
227
+ * <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">Configure a Default Security
228
+ * Group</a> in the <i>
229
+ * <i>CloudHSM User Guide</i>
230
+ * </i>. </p>
231
+ *
232
+ * @throws {@link CustomKeyStoreInvalidStateException} (client fault)
233
+ * <p>The request was rejected because of the <code>ConnectionState</code> of the custom key
234
+ * store. To get the <code>ConnectionState</code> of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
235
+ * <p>This exception is thrown under the following conditions:</p>
236
+ * <ul>
237
+ * <li>
238
+ * <p>You requested the <a>ConnectCustomKeyStore</a> operation on a custom key
239
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
240
+ * <code>FAILED</code>. This operation is valid for all other <code>ConnectionState</code>
241
+ * values. To reconnect a custom key store in a <code>FAILED</code> state, disconnect it
242
+ * (<a>DisconnectCustomKeyStore</a>), then connect it
243
+ * (<code>ConnectCustomKeyStore</code>).</p>
244
+ * </li>
245
+ * <li>
246
+ * <p>You requested the <a>CreateKey</a> operation in a custom key store that is
247
+ * not connected. This operations is valid only when the custom key store
248
+ * <code>ConnectionState</code> is <code>CONNECTED</code>.</p>
249
+ * </li>
250
+ * <li>
251
+ * <p>You requested the <a>DisconnectCustomKeyStore</a> operation on a custom key
252
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
253
+ * <code>DISCONNECTED</code>. This operation is valid for all other
254
+ * <code>ConnectionState</code> values.</p>
255
+ * </li>
256
+ * <li>
257
+ * <p>You requested the <a>UpdateCustomKeyStore</a> or <a>DeleteCustomKeyStore</a> operation on a custom key store that is not
258
+ * disconnected. This operation is valid only when the custom key store
259
+ * <code>ConnectionState</code> is <code>DISCONNECTED</code>.</p>
260
+ * </li>
261
+ * <li>
262
+ * <p>You requested the <a>GenerateRandom</a> operation in an CloudHSM key store
263
+ * that is not connected. This operation is valid only when the CloudHSM key store
264
+ * <code>ConnectionState</code> is <code>CONNECTED</code>. </p>
265
+ * </li>
266
+ * </ul>
267
+ *
268
+ * @throws {@link CustomKeyStoreNotFoundException} (client fault)
269
+ * <p>The request was rejected because KMS cannot find a custom key store with the specified
270
+ * key store name or ID.</p>
271
+ *
272
+ * @throws {@link DependencyTimeoutException} (server fault)
273
+ * <p>The system timed out while trying to fulfill the request. You can retry the
274
+ * request.</p>
275
+ *
276
+ * @throws {@link InvalidArnException} (client fault)
277
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
278
+ * valid.</p>
279
+ *
280
+ * @throws {@link KMSInternalException} (server fault)
281
+ * <p>The request was rejected because an internal exception occurred. The request can be
282
+ * retried.</p>
283
+ *
284
+ * @throws {@link LimitExceededException} (client fault)
285
+ * <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
286
+ * <i>Key Management Service Developer Guide</i>.</p>
287
+ *
288
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
289
+ * <p>The request was rejected because the specified policy is not syntactically or semantically
290
+ * correct.</p>
291
+ *
292
+ * @throws {@link TagException} (client fault)
293
+ * <p>The request was rejected because one or more tags are not valid.</p>
294
+ *
295
+ * @throws {@link UnsupportedOperationException} (client fault)
296
+ * <p>The request was rejected because a specified parameter is not supported or a specified
297
+ * resource is not valid for this operation.</p>
298
+ *
299
+ * @throws {@link XksKeyAlreadyInUseException} (client fault)
300
+ * <p>The request was rejected because the (<code>XksKeyId</code>) is already associated with a
301
+ * KMS key in this external key store. Each KMS key in an external key store must be associated
302
+ * with a different external key.</p>
303
+ *
304
+ * @throws {@link XksKeyInvalidConfigurationException} (client fault)
305
+ * <p>The request was rejected because the external key specified by the <code>XksKeyId</code>
306
+ * parameter did not meet the configuration requirements for an external key store.</p>
307
+ * <p>The external key must be an AES-256 symmetric key that is enabled and performs encryption
308
+ * and decryption.</p>
309
+ *
310
+ * @throws {@link XksKeyNotFoundException} (client fault)
311
+ * <p>The request was rejected because the external key store proxy could not find the external key. This
312
+ * exception is thrown when the value of the <code>XksKeyId</code> parameter doesn't identify a
313
+ * key in the external key manager associated with the external key proxy.</p>
314
+ * <p>Verify that the <code>XksKeyId</code> represents an existing key in the external key
315
+ * manager. Use the key identifier that the external key store proxy uses to identify the key.
316
+ * For details, see the documentation provided with your external key store proxy or key
317
+ * manager.</p>
318
+ *
319
+ *
198
320
  * @example To create a KMS key
199
321
  * ```javascript
200
322
  * // The following example creates a symmetric KMS key for encryption and decryption. No parameters are required for this operation.
@@ -116,6 +116,82 @@ export interface DecryptCommandOutput extends DecryptResponse, __MetadataBearer
116
116
  * @see {@link DecryptCommandOutput} for command's `response` shape.
117
117
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
118
118
  *
119
+ * @throws {@link DependencyTimeoutException} (server fault)
120
+ * <p>The system timed out while trying to fulfill the request. You can retry the
121
+ * request.</p>
122
+ *
123
+ * @throws {@link DisabledException} (client fault)
124
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
125
+ *
126
+ * @throws {@link IncorrectKeyException} (client fault)
127
+ * <p>The request was rejected because the specified KMS key cannot decrypt the data. The
128
+ * <code>KeyId</code> in a <a>Decrypt</a> request and the <code>SourceKeyId</code>
129
+ * in a <a>ReEncrypt</a> request must identify the same KMS key that was used to
130
+ * encrypt the ciphertext.</p>
131
+ *
132
+ * @throws {@link InvalidCiphertextException} (client fault)
133
+ * <p>From the <a>Decrypt</a> or <a>ReEncrypt</a> operation, the request
134
+ * was rejected because the specified ciphertext, or additional authenticated data incorporated
135
+ * into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise
136
+ * invalid.</p>
137
+ * <p>From the <a>ImportKeyMaterial</a> operation, the request was rejected because
138
+ * KMS could not decrypt the encrypted (wrapped) key material. </p>
139
+ *
140
+ * @throws {@link InvalidGrantTokenException} (client fault)
141
+ * <p>The request was rejected because the specified grant token is not valid.</p>
142
+ *
143
+ * @throws {@link InvalidKeyUsageException} (client fault)
144
+ * <p>The request was rejected for one of the following reasons: </p>
145
+ * <ul>
146
+ * <li>
147
+ * <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
148
+ * operation.</p>
149
+ * </li>
150
+ * <li>
151
+ * <p>The encryption algorithm or signing algorithm specified for the operation is
152
+ * incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
153
+ * </li>
154
+ * </ul>
155
+ * <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
156
+ * <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
157
+ * messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
158
+ * verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
159
+ * <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
160
+ * <a>DescribeKey</a> operation.</p>
161
+ * <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
162
+ * <a>DescribeKey</a> operation.</p>
163
+ *
164
+ * @throws {@link KeyUnavailableException} (server fault)
165
+ * <p>The request was rejected because the specified KMS key was not available. You can retry
166
+ * the request.</p>
167
+ *
168
+ * @throws {@link KMSInternalException} (server fault)
169
+ * <p>The request was rejected because an internal exception occurred. The request can be
170
+ * retried.</p>
171
+ *
172
+ * @throws {@link KMSInvalidStateException} (client fault)
173
+ * <p>The request was rejected because the state of the specified resource is not valid for this
174
+ * request.</p>
175
+ * <p>This exceptions means one of the following:</p>
176
+ * <ul>
177
+ * <li>
178
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
179
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
180
+ * information about which key states are compatible with each KMS operation, see
181
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
182
+ * <i>Key Management Service Developer Guide</i>
183
+ * </i>.</p>
184
+ * </li>
185
+ * <li>
186
+ * <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>
187
+ * </li>
188
+ * </ul>
189
+ *
190
+ * @throws {@link NotFoundException} (client fault)
191
+ * <p>The request was rejected because the specified entity or resource could not be
192
+ * found.</p>
193
+ *
194
+ *
119
195
  * @example To decrypt data
120
196
  * ```javascript
121
197
  * // The following example decrypts data that was encrypted with a KMS key.
@@ -76,6 +76,37 @@ export interface DeleteAliasCommandOutput extends __MetadataBearer {
76
76
  * @see {@link DeleteAliasCommandOutput} for command's `response` shape.
77
77
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
78
78
  *
79
+ * @throws {@link DependencyTimeoutException} (server fault)
80
+ * <p>The system timed out while trying to fulfill the request. You can retry the
81
+ * 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 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
+ *
79
110
  * @example To delete an alias
80
111
  * ```javascript
81
112
  * // The following example deletes the specified alias.