@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
@@ -91,6 +91,72 @@ 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
+ *
94
160
  * @example To generate an asymmetric data key pair without a plaintext key
95
161
  * ```javascript
96
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.
@@ -100,6 +100,68 @@ 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
+ *
103
165
  * @example To generate an encrypted data key
104
166
  * ```javascript
105
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.
@@ -56,6 +56,64 @@ 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
+ *
59
117
  * @example To generate an HMAC for a message
60
118
  * ```javascript
61
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.
@@ -43,6 +43,59 @@ export interface GenerateRandomCommandOutput extends GenerateRandomResponse, __M
43
43
  * @see {@link GenerateRandomCommandOutput} for command's `response` shape.
44
44
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
45
45
  *
46
+ * @throws {@link CustomKeyStoreInvalidStateException} (client fault)
47
+ * <p>The request was rejected because of the <code>ConnectionState</code> of the custom key
48
+ * store. To get the <code>ConnectionState</code> of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
49
+ * <p>This exception is thrown under the following conditions:</p>
50
+ * <ul>
51
+ * <li>
52
+ * <p>You requested the <a>ConnectCustomKeyStore</a> operation on a custom key
53
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
54
+ * <code>FAILED</code>. This operation is valid for all other <code>ConnectionState</code>
55
+ * values. To reconnect a custom key store in a <code>FAILED</code> state, disconnect it
56
+ * (<a>DisconnectCustomKeyStore</a>), then connect it
57
+ * (<code>ConnectCustomKeyStore</code>).</p>
58
+ * </li>
59
+ * <li>
60
+ * <p>You requested the <a>CreateKey</a> operation in a custom key store that is
61
+ * not connected. This operations is valid only when the custom key store
62
+ * <code>ConnectionState</code> is <code>CONNECTED</code>.</p>
63
+ * </li>
64
+ * <li>
65
+ * <p>You requested the <a>DisconnectCustomKeyStore</a> operation on a custom key
66
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
67
+ * <code>DISCONNECTED</code>. This operation is valid for all other
68
+ * <code>ConnectionState</code> values.</p>
69
+ * </li>
70
+ * <li>
71
+ * <p>You requested the <a>UpdateCustomKeyStore</a> or <a>DeleteCustomKeyStore</a> operation on a custom key store that is not
72
+ * disconnected. This operation is valid only when the custom key store
73
+ * <code>ConnectionState</code> is <code>DISCONNECTED</code>.</p>
74
+ * </li>
75
+ * <li>
76
+ * <p>You requested the <a>GenerateRandom</a> operation in an CloudHSM key store
77
+ * that is not connected. This operation is valid only when the CloudHSM key store
78
+ * <code>ConnectionState</code> is <code>CONNECTED</code>. </p>
79
+ * </li>
80
+ * </ul>
81
+ *
82
+ * @throws {@link CustomKeyStoreNotFoundException} (client fault)
83
+ * <p>The request was rejected because KMS cannot find a custom key store with the specified
84
+ * key store name or ID.</p>
85
+ *
86
+ * @throws {@link DependencyTimeoutException} (server fault)
87
+ * <p>The system timed out while trying to fulfill the request. You can retry the
88
+ * 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 UnsupportedOperationException} (client fault)
95
+ * <p>The request was rejected because a specified parameter is not supported or a specified
96
+ * resource is not valid for this operation.</p>
97
+ *
98
+ *
46
99
  * @example To generate random data
47
100
  * ```javascript
48
101
  * // The following example generates 32 bytes of random data.
@@ -36,6 +36,41 @@ export interface GetKeyPolicyCommandOutput extends GetKeyPolicyResponse, __Metad
36
36
  * @see {@link GetKeyPolicyCommandOutput} for command's `response` shape.
37
37
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
38
38
  *
39
+ * @throws {@link DependencyTimeoutException} (server fault)
40
+ * <p>The system timed out while trying to fulfill the request. You can retry the
41
+ * request.</p>
42
+ *
43
+ * @throws {@link InvalidArnException} (client fault)
44
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
45
+ * valid.</p>
46
+ *
47
+ * @throws {@link KMSInternalException} (server fault)
48
+ * <p>The request was rejected because an internal exception occurred. The request can be
49
+ * retried.</p>
50
+ *
51
+ * @throws {@link KMSInvalidStateException} (client fault)
52
+ * <p>The request was rejected because the state of the specified resource is not valid for this
53
+ * request.</p>
54
+ * <p>This exceptions means one of the following:</p>
55
+ * <ul>
56
+ * <li>
57
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
58
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
59
+ * information about which key states are compatible with each KMS operation, see
60
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
61
+ * <i>Key Management Service Developer Guide</i>
62
+ * </i>.</p>
63
+ * </li>
64
+ * <li>
65
+ * <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>
66
+ * </li>
67
+ * </ul>
68
+ *
69
+ * @throws {@link NotFoundException} (client fault)
70
+ * <p>The request was rejected because the specified entity or resource could not be
71
+ * found.</p>
72
+ *
73
+ *
39
74
  * @example To retrieve a key policy
40
75
  * ```javascript
41
76
  * // The following example retrieves the key policy for the specified KMS key.
@@ -81,6 +81,45 @@ export interface GetKeyRotationStatusCommandOutput extends GetKeyRotationStatusR
81
81
  * @see {@link GetKeyRotationStatusCommandOutput} for command's `response` shape.
82
82
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
83
83
  *
84
+ * @throws {@link DependencyTimeoutException} (server fault)
85
+ * <p>The system timed out while trying to fulfill the request. You can retry the
86
+ * request.</p>
87
+ *
88
+ * @throws {@link InvalidArnException} (client fault)
89
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
90
+ * valid.</p>
91
+ *
92
+ * @throws {@link KMSInternalException} (server fault)
93
+ * <p>The request was rejected because an internal exception occurred. The request can be
94
+ * retried.</p>
95
+ *
96
+ * @throws {@link KMSInvalidStateException} (client fault)
97
+ * <p>The request was rejected because the state of the specified resource is not valid for this
98
+ * request.</p>
99
+ * <p>This exceptions means one of the following:</p>
100
+ * <ul>
101
+ * <li>
102
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
103
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
104
+ * information about which key states are compatible with each KMS operation, see
105
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
106
+ * <i>Key Management Service Developer Guide</i>
107
+ * </i>.</p>
108
+ * </li>
109
+ * <li>
110
+ * <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>
111
+ * </li>
112
+ * </ul>
113
+ *
114
+ * @throws {@link NotFoundException} (client fault)
115
+ * <p>The request was rejected because the specified entity or resource could not be
116
+ * found.</p>
117
+ *
118
+ * @throws {@link UnsupportedOperationException} (client fault)
119
+ * <p>The request was rejected because a specified parameter is not supported or a specified
120
+ * resource is not valid for this operation.</p>
121
+ *
122
+ *
84
123
  * @example To retrieve the rotation status for a KMS key
85
124
  * ```javascript
86
125
  * // The following example retrieves the status of automatic annual rotation of the key material for the specified KMS key.
@@ -62,6 +62,45 @@ export interface GetParametersForImportCommandOutput extends GetParametersForImp
62
62
  * @see {@link GetParametersForImportCommandOutput} for command's `response` shape.
63
63
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
64
64
  *
65
+ * @throws {@link DependencyTimeoutException} (server fault)
66
+ * <p>The system timed out while trying to fulfill the request. You can retry the
67
+ * request.</p>
68
+ *
69
+ * @throws {@link InvalidArnException} (client fault)
70
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
71
+ * valid.</p>
72
+ *
73
+ * @throws {@link KMSInternalException} (server fault)
74
+ * <p>The request was rejected because an internal exception occurred. The request can be
75
+ * retried.</p>
76
+ *
77
+ * @throws {@link KMSInvalidStateException} (client fault)
78
+ * <p>The request was rejected because the state of the specified resource is not valid for this
79
+ * request.</p>
80
+ * <p>This exceptions means one of the following:</p>
81
+ * <ul>
82
+ * <li>
83
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
84
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
85
+ * information about which key states are compatible with each KMS operation, see
86
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
87
+ * <i>Key Management Service Developer Guide</i>
88
+ * </i>.</p>
89
+ * </li>
90
+ * <li>
91
+ * <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>
92
+ * </li>
93
+ * </ul>
94
+ *
95
+ * @throws {@link NotFoundException} (client fault)
96
+ * <p>The request was rejected because the specified entity or resource could not be
97
+ * found.</p>
98
+ *
99
+ * @throws {@link UnsupportedOperationException} (client fault)
100
+ * <p>The request was rejected because a specified parameter is not supported or a specified
101
+ * resource is not valid for this operation.</p>
102
+ *
103
+ *
65
104
  * @example To retrieve the public key and import token for a KMS key
66
105
  * ```javascript
67
106
  * // The following example retrieves the public key and import token for the specified KMS key.
@@ -77,6 +77,76 @@ export interface GetPublicKeyCommandOutput extends GetPublicKeyResponse, __Metad
77
77
  * @see {@link GetPublicKeyCommandOutput} for command's `response` shape.
78
78
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
79
79
  *
80
+ * @throws {@link DependencyTimeoutException} (server fault)
81
+ * <p>The system timed out while trying to fulfill the request. You can retry the
82
+ * request.</p>
83
+ *
84
+ * @throws {@link DisabledException} (client fault)
85
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
86
+ *
87
+ * @throws {@link InvalidArnException} (client fault)
88
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
89
+ * valid.</p>
90
+ *
91
+ * @throws {@link InvalidGrantTokenException} (client fault)
92
+ * <p>The request was rejected because the specified grant token is not valid.</p>
93
+ *
94
+ * @throws {@link InvalidKeyUsageException} (client fault)
95
+ * <p>The request was rejected for one of the following reasons: </p>
96
+ * <ul>
97
+ * <li>
98
+ * <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
99
+ * operation.</p>
100
+ * </li>
101
+ * <li>
102
+ * <p>The encryption algorithm or signing algorithm specified for the operation is
103
+ * incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
104
+ * </li>
105
+ * </ul>
106
+ * <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
107
+ * <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
108
+ * messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
109
+ * verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
110
+ * <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
111
+ * <a>DescribeKey</a> operation.</p>
112
+ * <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
113
+ * <a>DescribeKey</a> operation.</p>
114
+ *
115
+ * @throws {@link KeyUnavailableException} (server fault)
116
+ * <p>The request was rejected because the specified KMS key was not available. You can retry
117
+ * the request.</p>
118
+ *
119
+ * @throws {@link KMSInternalException} (server fault)
120
+ * <p>The request was rejected because an internal exception occurred. The request can be
121
+ * retried.</p>
122
+ *
123
+ * @throws {@link KMSInvalidStateException} (client fault)
124
+ * <p>The request was rejected because the state of the specified resource is not valid for this
125
+ * request.</p>
126
+ * <p>This exceptions means one of the following:</p>
127
+ * <ul>
128
+ * <li>
129
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
130
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
131
+ * information about which key states are compatible with each KMS operation, see
132
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
133
+ * <i>Key Management Service Developer Guide</i>
134
+ * </i>.</p>
135
+ * </li>
136
+ * <li>
137
+ * <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>
138
+ * </li>
139
+ * </ul>
140
+ *
141
+ * @throws {@link NotFoundException} (client fault)
142
+ * <p>The request was rejected because the specified entity or resource could not be
143
+ * found.</p>
144
+ *
145
+ * @throws {@link UnsupportedOperationException} (client fault)
146
+ * <p>The request was rejected because a specified parameter is not supported or a specified
147
+ * resource is not valid for this operation.</p>
148
+ *
149
+ *
80
150
  * @example To download the public key of an asymmetric KMS key
81
151
  * ```javascript
82
152
  * // This example gets the public key of an asymmetric RSA KMS key used for encryption and decryption. The operation returns the key spec, key usage, and encryption or signing algorithms to help you use the public key correctly outside of AWS KMS.
@@ -92,6 +92,65 @@ export interface ImportKeyMaterialCommandOutput extends ImportKeyMaterialRespons
92
92
  * @see {@link ImportKeyMaterialCommandOutput} for command's `response` shape.
93
93
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
94
94
  *
95
+ * @throws {@link DependencyTimeoutException} (server fault)
96
+ * <p>The system timed out while trying to fulfill the request. You can retry the
97
+ * request.</p>
98
+ *
99
+ * @throws {@link ExpiredImportTokenException} (client fault)
100
+ * <p>The request was rejected because the specified import token is expired. Use <a>GetParametersForImport</a> to get a new import token and public key, use the new
101
+ * public key to encrypt the key material, and then try the request again.</p>
102
+ *
103
+ * @throws {@link IncorrectKeyMaterialException} (client fault)
104
+ * <p>The request was rejected because the key material in the request is, expired, invalid, or
105
+ * is not the same key material that was previously imported into this KMS key.</p>
106
+ *
107
+ * @throws {@link InvalidArnException} (client fault)
108
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
109
+ * valid.</p>
110
+ *
111
+ * @throws {@link InvalidCiphertextException} (client fault)
112
+ * <p>From the <a>Decrypt</a> or <a>ReEncrypt</a> operation, the request
113
+ * was rejected because the specified ciphertext, or additional authenticated data incorporated
114
+ * into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise
115
+ * invalid.</p>
116
+ * <p>From the <a>ImportKeyMaterial</a> operation, the request was rejected because
117
+ * KMS could not decrypt the encrypted (wrapped) key material. </p>
118
+ *
119
+ * @throws {@link InvalidImportTokenException} (client fault)
120
+ * <p>The request was rejected because the provided import token is invalid or is associated
121
+ * with a different KMS key.</p>
122
+ *
123
+ * @throws {@link KMSInternalException} (server fault)
124
+ * <p>The request was rejected because an internal exception occurred. The request can be
125
+ * retried.</p>
126
+ *
127
+ * @throws {@link KMSInvalidStateException} (client fault)
128
+ * <p>The request was rejected because the state of the specified resource is not valid for this
129
+ * request.</p>
130
+ * <p>This exceptions means one of the following:</p>
131
+ * <ul>
132
+ * <li>
133
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
134
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
135
+ * information about which key states are compatible with each KMS operation, see
136
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
137
+ * <i>Key Management Service Developer Guide</i>
138
+ * </i>.</p>
139
+ * </li>
140
+ * <li>
141
+ * <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>
142
+ * </li>
143
+ * </ul>
144
+ *
145
+ * @throws {@link NotFoundException} (client fault)
146
+ * <p>The request was rejected because the specified entity or resource could not be
147
+ * found.</p>
148
+ *
149
+ * @throws {@link UnsupportedOperationException} (client fault)
150
+ * <p>The request was rejected because a specified parameter is not supported or a specified
151
+ * resource is not valid for this operation.</p>
152
+ *
153
+ *
95
154
  * @example To import key material into a KMS key
96
155
  * ```javascript
97
156
  * // The following example imports key material into the specified KMS key.
@@ -69,6 +69,27 @@ export interface ListAliasesCommandOutput extends ListAliasesResponse, __Metadat
69
69
  * @see {@link ListAliasesCommandOutput} 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 InvalidArnException} (client fault)
77
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
78
+ * valid.</p>
79
+ *
80
+ * @throws {@link InvalidMarkerException} (client fault)
81
+ * <p>The request was rejected because the marker that specifies where pagination should next
82
+ * begin is not valid.</p>
83
+ *
84
+ * @throws {@link KMSInternalException} (server fault)
85
+ * <p>The request was rejected because an internal exception occurred. The request can be
86
+ * retried.</p>
87
+ *
88
+ * @throws {@link NotFoundException} (client fault)
89
+ * <p>The request was rejected because the specified entity or resource could not be
90
+ * found.</p>
91
+ *
92
+ *
72
93
  * @example To list aliases
73
94
  * ```javascript
74
95
  * // The following example lists aliases.
@@ -73,6 +73,48 @@ export interface ListGrantsCommandOutput extends ListGrantsResponse, __MetadataB
73
73
  * @see {@link ListGrantsCommandOutput} for command's `response` shape.
74
74
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
75
75
  *
76
+ * @throws {@link DependencyTimeoutException} (server fault)
77
+ * <p>The system timed out while trying to fulfill the request. You can retry the
78
+ * request.</p>
79
+ *
80
+ * @throws {@link InvalidArnException} (client fault)
81
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
82
+ * valid.</p>
83
+ *
84
+ * @throws {@link InvalidGrantIdException} (client fault)
85
+ * <p>The request was rejected because the specified <code>GrantId</code> is not valid.</p>
86
+ *
87
+ * @throws {@link InvalidMarkerException} (client fault)
88
+ * <p>The request was rejected because the marker that specifies where pagination should next
89
+ * begin is not valid.</p>
90
+ *
91
+ * @throws {@link KMSInternalException} (server fault)
92
+ * <p>The request was rejected because an internal exception occurred. The request can be
93
+ * retried.</p>
94
+ *
95
+ * @throws {@link KMSInvalidStateException} (client fault)
96
+ * <p>The request was rejected because the state of the specified resource is not valid for this
97
+ * request.</p>
98
+ * <p>This exceptions means one of the following:</p>
99
+ * <ul>
100
+ * <li>
101
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
102
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
103
+ * information about which key states are compatible with each KMS operation, see
104
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
105
+ * <i>Key Management Service Developer Guide</i>
106
+ * </i>.</p>
107
+ * </li>
108
+ * <li>
109
+ * <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>
110
+ * </li>
111
+ * </ul>
112
+ *
113
+ * @throws {@link NotFoundException} (client fault)
114
+ * <p>The request was rejected because the specified entity or resource could not be
115
+ * found.</p>
116
+ *
117
+ *
76
118
  * @example To list grants for a KMS key
77
119
  * ```javascript
78
120
  * // The following example lists grants for the specified KMS key.