@aws-sdk/client-kms 3.288.0 → 3.290.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist-types/commands/CancelKeyDeletionCommand.d.ts +51 -0
  2. package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +96 -0
  3. package/dist-types/commands/CreateAliasCommand.d.ts +54 -0
  4. package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +193 -0
  5. package/dist-types/commands/CreateGrantCommand.d.ts +67 -0
  6. package/dist-types/commands/CreateKeyCommand.d.ts +405 -0
  7. package/dist-types/commands/DecryptCommand.d.ts +94 -0
  8. package/dist-types/commands/DeleteAliasCommand.d.ts +42 -0
  9. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +62 -0
  10. package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +50 -0
  11. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +114 -0
  12. package/dist-types/commands/DescribeKeyCommand.d.ts +245 -0
  13. package/dist-types/commands/DisableKeyCommand.d.ts +46 -0
  14. package/dist-types/commands/DisableKeyRotationCommand.d.ts +53 -0
  15. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +56 -0
  16. package/dist-types/commands/EnableKeyCommand.d.ts +50 -0
  17. package/dist-types/commands/EnableKeyRotationCommand.d.ts +53 -0
  18. package/dist-types/commands/EncryptCommand.d.ts +80 -0
  19. package/dist-types/commands/GenerateDataKeyCommand.d.ts +81 -0
  20. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +87 -0
  21. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +86 -0
  22. package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +80 -0
  23. package/dist-types/commands/GenerateMacCommand.d.ts +78 -0
  24. package/dist-types/commands/GenerateRandomCommand.d.ts +69 -0
  25. package/dist-types/commands/GetKeyPolicyCommand.d.ts +52 -0
  26. package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +55 -0
  27. package/dist-types/commands/GetParametersForImportCommand.d.ts +60 -0
  28. package/dist-types/commands/GetPublicKeyCommand.d.ts +93 -0
  29. package/dist-types/commands/ImportKeyMaterialCommand.d.ts +73 -0
  30. package/dist-types/commands/ListAliasesCommand.d.ts +77 -0
  31. package/dist-types/commands/ListGrantsCommand.d.ts +111 -0
  32. package/dist-types/commands/ListKeyPoliciesCommand.d.ts +54 -0
  33. package/dist-types/commands/ListKeysCommand.d.ts +57 -0
  34. package/dist-types/commands/ListResourceTagsCommand.d.ts +47 -0
  35. package/dist-types/commands/ListRetirableGrantsCommand.d.ts +51 -0
  36. package/dist-types/commands/PutKeyPolicyCommand.d.ts +60 -0
  37. package/dist-types/commands/ReEncryptCommand.d.ts +95 -0
  38. package/dist-types/commands/ReplicateKeyCommand.d.ts +101 -0
  39. package/dist-types/commands/RetireGrantCommand.d.ts +53 -0
  40. package/dist-types/commands/RevokeGrantCommand.d.ts +50 -0
  41. package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +53 -0
  42. package/dist-types/commands/SignCommand.d.ts +104 -0
  43. package/dist-types/commands/TagResourceCommand.d.ts +55 -0
  44. package/dist-types/commands/UntagResourceCommand.d.ts +49 -0
  45. package/dist-types/commands/UpdateAliasCommand.d.ts +47 -0
  46. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +234 -0
  47. package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +47 -0
  48. package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +54 -0
  49. package/dist-types/commands/VerifyCommand.d.ts +111 -0
  50. package/dist-types/commands/VerifyMacCommand.d.ts +84 -0
  51. package/package.json +29 -29
@@ -50,6 +50,60 @@ export interface ListKeyPoliciesCommandOutput extends ListKeyPoliciesResponse, _
50
50
  * @see {@link ListKeyPoliciesCommandOutput} for command's `response` shape.
51
51
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
52
52
  *
53
+ * @throws {@link DependencyTimeoutException} (server fault)
54
+ * <p>The system timed out while trying to fulfill the request. You can retry the
55
+ * request.</p>
56
+ *
57
+ * @throws {@link InvalidArnException} (client fault)
58
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
59
+ * valid.</p>
60
+ *
61
+ * @throws {@link KMSInternalException} (server fault)
62
+ * <p>The request was rejected because an internal exception occurred. The request can be
63
+ * retried.</p>
64
+ *
65
+ * @throws {@link KMSInvalidStateException} (client fault)
66
+ * <p>The request was rejected because the state of the specified resource is not valid for this
67
+ * request.</p>
68
+ * <p>This exceptions means one of the following:</p>
69
+ * <ul>
70
+ * <li>
71
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
72
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
73
+ * information about which key states are compatible with each KMS operation, see
74
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
75
+ * <i>Key Management Service Developer Guide</i>
76
+ * </i>.</p>
77
+ * </li>
78
+ * <li>
79
+ * <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>
80
+ * </li>
81
+ * </ul>
82
+ *
83
+ * @throws {@link NotFoundException} (client fault)
84
+ * <p>The request was rejected because the specified entity or resource could not be
85
+ * found.</p>
86
+ *
87
+ *
88
+ * @example To list key policies for a KMS key
89
+ * ```javascript
90
+ * // The following example lists key policies for the specified KMS key.
91
+ * const input = {
92
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
93
+ * };
94
+ * const command = new ListKeyPoliciesCommand(input);
95
+ * const response = await client.send(command);
96
+ * /* response ==
97
+ * {
98
+ * "PolicyNames": [
99
+ * "default"
100
+ * ],
101
+ * "Truncated": false
102
+ * }
103
+ * *\/
104
+ * // example id: to-list-key-policies-for-a-cmk-1481069780998
105
+ * ```
106
+ *
53
107
  */
54
108
  export declare class ListKeyPoliciesCommand extends $Command<ListKeyPoliciesCommandInput, ListKeyPoliciesCommandOutput, KMSClientResolvedConfig> {
55
109
  readonly input: ListKeyPoliciesCommandInput;
@@ -58,6 +58,63 @@ export interface ListKeysCommandOutput extends ListKeysResponse, __MetadataBeare
58
58
  * @see {@link ListKeysCommandOutput} for command's `response` shape.
59
59
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
60
60
  *
61
+ * @throws {@link DependencyTimeoutException} (server fault)
62
+ * <p>The system timed out while trying to fulfill the request. You can retry the
63
+ * request.</p>
64
+ *
65
+ * @throws {@link InvalidMarkerException} (client fault)
66
+ * <p>The request was rejected because the marker that specifies where pagination should next
67
+ * begin is not valid.</p>
68
+ *
69
+ * @throws {@link KMSInternalException} (server fault)
70
+ * <p>The request was rejected because an internal exception occurred. The request can be
71
+ * retried.</p>
72
+ *
73
+ *
74
+ * @example To list KMS keys
75
+ * ```javascript
76
+ * // The following example lists KMS keys.
77
+ * const input = undefined;
78
+ * const command = new ListKeysCommand(input);
79
+ * const response = await client.send(command);
80
+ * /* response ==
81
+ * {
82
+ * "Keys": [
83
+ * {
84
+ * "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/0d990263-018e-4e65-a703-eff731de951e",
85
+ * "KeyId": "0d990263-018e-4e65-a703-eff731de951e"
86
+ * },
87
+ * {
88
+ * "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/144be297-0ae1-44ac-9c8f-93cd8c82f841",
89
+ * "KeyId": "144be297-0ae1-44ac-9c8f-93cd8c82f841"
90
+ * },
91
+ * {
92
+ * "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/21184251-b765-428e-b852-2c7353e72571",
93
+ * "KeyId": "21184251-b765-428e-b852-2c7353e72571"
94
+ * },
95
+ * {
96
+ * "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/214fe92f-5b03-4ae1-b350-db2a45dbe10c",
97
+ * "KeyId": "214fe92f-5b03-4ae1-b350-db2a45dbe10c"
98
+ * },
99
+ * {
100
+ * "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/339963f2-e523-49d3-af24-a0fe752aa458",
101
+ * "KeyId": "339963f2-e523-49d3-af24-a0fe752aa458"
102
+ * },
103
+ * {
104
+ * "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/b776a44b-df37-4438-9be4-a27494e4271a",
105
+ * "KeyId": "b776a44b-df37-4438-9be4-a27494e4271a"
106
+ * },
107
+ * {
108
+ * "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/deaf6c9e-cf2c-46a6-bf6d-0b6d487cffbb",
109
+ * "KeyId": "deaf6c9e-cf2c-46a6-bf6d-0b6d487cffbb"
110
+ * }
111
+ * ],
112
+ * "Truncated": false
113
+ * }
114
+ * *\/
115
+ * // example id: to-list-cmks-1481071643069
116
+ * ```
117
+ *
61
118
  */
62
119
  export declare class ListKeysCommand extends $Command<ListKeysCommandInput, ListKeysCommandOutput, KMSClientResolvedConfig> {
63
120
  readonly input: ListKeysCommandInput;
@@ -62,6 +62,53 @@ export interface ListResourceTagsCommandOutput extends ListResourceTagsResponse,
62
62
  * @see {@link ListResourceTagsCommandOutput} for command's `response` shape.
63
63
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
64
64
  *
65
+ * @throws {@link InvalidArnException} (client fault)
66
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
67
+ * valid.</p>
68
+ *
69
+ * @throws {@link InvalidMarkerException} (client fault)
70
+ * <p>The request was rejected because the marker that specifies where pagination should next
71
+ * begin is not 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 NotFoundException} (client fault)
78
+ * <p>The request was rejected because the specified entity or resource could not be
79
+ * found.</p>
80
+ *
81
+ *
82
+ * @example To list tags for a KMS key
83
+ * ```javascript
84
+ * // The following example lists tags for a KMS key.
85
+ * const input = {
86
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
87
+ * };
88
+ * const command = new ListResourceTagsCommand(input);
89
+ * const response = await client.send(command);
90
+ * /* response ==
91
+ * {
92
+ * "Tags": [
93
+ * {
94
+ * "TagKey": "CostCenter",
95
+ * "TagValue": "87654"
96
+ * },
97
+ * {
98
+ * "TagKey": "CreatedBy",
99
+ * "TagValue": "ExampleUser"
100
+ * },
101
+ * {
102
+ * "TagKey": "Purpose",
103
+ * "TagValue": "Test"
104
+ * }
105
+ * ],
106
+ * "Truncated": false
107
+ * }
108
+ * *\/
109
+ * // example id: to-list-tags-for-a-cmk-1483996855796
110
+ * ```
111
+ *
65
112
  */
66
113
  export declare class ListResourceTagsCommand extends $Command<ListResourceTagsCommandInput, ListResourceTagsCommandOutput, KMSClientResolvedConfig> {
67
114
  readonly input: ListResourceTagsCommandInput;
@@ -71,6 +71,57 @@ export interface ListRetirableGrantsCommandOutput extends ListGrantsResponse, __
71
71
  * @see {@link ListRetirableGrantsCommandOutput} for command's `response` shape.
72
72
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
73
73
  *
74
+ * @throws {@link DependencyTimeoutException} (server fault)
75
+ * <p>The system timed out while trying to fulfill the request. You can retry the
76
+ * request.</p>
77
+ *
78
+ * @throws {@link InvalidArnException} (client fault)
79
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
80
+ * valid.</p>
81
+ *
82
+ * @throws {@link InvalidMarkerException} (client fault)
83
+ * <p>The request was rejected because the marker that specifies where pagination should next
84
+ * begin is not valid.</p>
85
+ *
86
+ * @throws {@link KMSInternalException} (server fault)
87
+ * <p>The request was rejected because an internal exception occurred. The request can be
88
+ * retried.</p>
89
+ *
90
+ * @throws {@link NotFoundException} (client fault)
91
+ * <p>The request was rejected because the specified entity or resource could not be
92
+ * found.</p>
93
+ *
94
+ *
95
+ * @example To list grants that the specified principal can retire
96
+ * ```javascript
97
+ * // The following example lists the grants that the specified principal (identity) can retire.
98
+ * const input = {
99
+ * "RetiringPrincipal": "arn:aws:iam::111122223333:role/ExampleRole"
100
+ * };
101
+ * const command = new ListRetirableGrantsCommand(input);
102
+ * const response = await client.send(command);
103
+ * /* response ==
104
+ * {
105
+ * "Grants": [
106
+ * {
107
+ * "CreationDate": "2016-12-07T11:09:35-08:00",
108
+ * "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60",
109
+ * "GranteePrincipal": "arn:aws:iam::111122223333:role/ExampleRole",
110
+ * "IssuingAccount": "arn:aws:iam::444455556666:root",
111
+ * "KeyId": "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab",
112
+ * "Operations": [
113
+ * "Decrypt",
114
+ * "Encrypt"
115
+ * ],
116
+ * "RetiringPrincipal": "arn:aws:iam::111122223333:role/ExampleRole"
117
+ * }
118
+ * ],
119
+ * "Truncated": false
120
+ * }
121
+ * *\/
122
+ * // example id: to-list-grants-that-the-specified-principal-can-retire-1481140499620
123
+ * ```
124
+ *
74
125
  */
75
126
  export declare class ListRetirableGrantsCommand extends $Command<ListRetirableGrantsCommandInput, ListRetirableGrantsCommandOutput, KMSClientResolvedConfig> {
76
127
  readonly input: ListRetirableGrantsCommandInput;
@@ -41,6 +41,66 @@ export interface PutKeyPolicyCommandOutput extends __MetadataBearer {
41
41
  * @see {@link PutKeyPolicyCommandOutput} 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 LimitExceededException} (client fault)
75
+ * <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
76
+ * <i>Key Management Service Developer Guide</i>.</p>
77
+ *
78
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
79
+ * <p>The request was rejected because the specified policy is not syntactically or semantically
80
+ * correct.</p>
81
+ *
82
+ * @throws {@link NotFoundException} (client fault)
83
+ * <p>The request was rejected because the specified entity or resource could not be
84
+ * found.</p>
85
+ *
86
+ * @throws {@link UnsupportedOperationException} (client fault)
87
+ * <p>The request was rejected because a specified parameter is not supported or a specified
88
+ * resource is not valid for this operation.</p>
89
+ *
90
+ *
91
+ * @example To attach a key policy to a KMS key
92
+ * ```javascript
93
+ * // The following example attaches a key policy to the specified KMS key.
94
+ * const input = {
95
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
96
+ * "Policy": "{\n \"Version\": \"2012-10-17\",\n \"Id\": \"custom-policy-2016-12-07\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:root\"\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow access for Key Administrators\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": [\n \"arn:aws:iam::111122223333:user/ExampleAdminUser\",\n \"arn:aws:iam::111122223333:role/ExampleAdminRole\"\n ]\n },\n \"Action\": [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\"\n ],\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:role/ExamplePowerUserRole\"\n },\n \"Action\": [\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey*\",\n \"kms:DescribeKey\"\n ],\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow attachment of persistent resources\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:role/ExamplePowerUserRole\"\n },\n \"Action\": [\n \"kms:CreateGrant\",\n \"kms:ListGrants\",\n \"kms:RevokeGrant\"\n ],\n \"Resource\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"kms:GrantIsForAWSResource\": \"true\"\n }\n }\n }\n ]\n}\n",
97
+ * "PolicyName": "default"
98
+ * };
99
+ * const command = new PutKeyPolicyCommand(input);
100
+ * await client.send(command);
101
+ * // example id: to-attach-a-key-policy-to-a-cmk-1481147345018
102
+ * ```
103
+ *
44
104
  */
45
105
  export declare class PutKeyPolicyCommand extends $Command<PutKeyPolicyCommandInput, PutKeyPolicyCommandOutput, KMSClientResolvedConfig> {
46
106
  readonly input: PutKeyPolicyCommandInput;
@@ -123,6 +123,101 @@ export interface ReEncryptCommandOutput extends ReEncryptResponse, __MetadataBea
123
123
  * @see {@link ReEncryptCommandOutput} for command's `response` shape.
124
124
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
125
125
  *
126
+ * @throws {@link DependencyTimeoutException} (server fault)
127
+ * <p>The system timed out while trying to fulfill the request. You can retry the
128
+ * request.</p>
129
+ *
130
+ * @throws {@link DisabledException} (client fault)
131
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
132
+ *
133
+ * @throws {@link IncorrectKeyException} (client fault)
134
+ * <p>The request was rejected because the specified KMS key cannot decrypt the data. The
135
+ * <code>KeyId</code> in a <a>Decrypt</a> request and the <code>SourceKeyId</code>
136
+ * in a <a>ReEncrypt</a> request must identify the same KMS key that was used to
137
+ * encrypt the ciphertext.</p>
138
+ *
139
+ * @throws {@link InvalidCiphertextException} (client fault)
140
+ * <p>From the <a>Decrypt</a> or <a>ReEncrypt</a> operation, the request
141
+ * was rejected because the specified ciphertext, or additional authenticated data incorporated
142
+ * into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise
143
+ * invalid.</p>
144
+ * <p>From the <a>ImportKeyMaterial</a> operation, the request was rejected because
145
+ * KMS could not decrypt the encrypted (wrapped) key material. </p>
146
+ *
147
+ * @throws {@link InvalidGrantTokenException} (client fault)
148
+ * <p>The request was rejected because the specified grant token is not valid.</p>
149
+ *
150
+ * @throws {@link InvalidKeyUsageException} (client fault)
151
+ * <p>The request was rejected for one of the following reasons: </p>
152
+ * <ul>
153
+ * <li>
154
+ * <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
155
+ * operation.</p>
156
+ * </li>
157
+ * <li>
158
+ * <p>The encryption algorithm or signing algorithm specified for the operation is
159
+ * incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
160
+ * </li>
161
+ * </ul>
162
+ * <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
163
+ * <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
164
+ * messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
165
+ * verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
166
+ * <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
167
+ * <a>DescribeKey</a> operation.</p>
168
+ * <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
169
+ * <a>DescribeKey</a> operation.</p>
170
+ *
171
+ * @throws {@link KeyUnavailableException} (server fault)
172
+ * <p>The request was rejected because the specified KMS key was not available. You can retry
173
+ * the request.</p>
174
+ *
175
+ * @throws {@link KMSInternalException} (server fault)
176
+ * <p>The request was rejected because an internal exception occurred. The request can be
177
+ * retried.</p>
178
+ *
179
+ * @throws {@link KMSInvalidStateException} (client fault)
180
+ * <p>The request was rejected because the state of the specified resource is not valid for this
181
+ * request.</p>
182
+ * <p>This exceptions means one of the following:</p>
183
+ * <ul>
184
+ * <li>
185
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
186
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
187
+ * information about which key states are compatible with each KMS operation, see
188
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
189
+ * <i>Key Management Service Developer Guide</i>
190
+ * </i>.</p>
191
+ * </li>
192
+ * <li>
193
+ * <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>
194
+ * </li>
195
+ * </ul>
196
+ *
197
+ * @throws {@link NotFoundException} (client fault)
198
+ * <p>The request was rejected because the specified entity or resource could not be
199
+ * found.</p>
200
+ *
201
+ *
202
+ * @example To reencrypt data
203
+ * ```javascript
204
+ * // The following example reencrypts data with the specified KMS key.
205
+ * const input = {
206
+ * "CiphertextBlob": "<binary data>",
207
+ * "DestinationKeyId": "0987dcba-09fe-87dc-65ba-ab0987654321"
208
+ * };
209
+ * const command = new ReEncryptCommand(input);
210
+ * const response = await client.send(command);
211
+ * /* response ==
212
+ * {
213
+ * "CiphertextBlob": "<binary data>",
214
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
215
+ * "SourceKeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
216
+ * }
217
+ * *\/
218
+ * // example id: to-reencrypt-data-1481230358001
219
+ * ```
220
+ *
126
221
  */
127
222
  export declare class ReEncryptCommand extends $Command<ReEncryptCommandInput, ReEncryptCommandOutput, KMSClientResolvedConfig> {
128
223
  readonly input: ReEncryptCommandInput;
@@ -111,6 +111,107 @@ export interface ReplicateKeyCommandOutput extends ReplicateKeyResponse, __Metad
111
111
  * @see {@link ReplicateKeyCommandOutput} for command's `response` shape.
112
112
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
113
113
  *
114
+ * @throws {@link AlreadyExistsException} (client fault)
115
+ * <p>The request was rejected because it attempted to create a resource that already
116
+ * exists.</p>
117
+ *
118
+ * @throws {@link DisabledException} (client fault)
119
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
120
+ *
121
+ * @throws {@link InvalidArnException} (client fault)
122
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
123
+ * valid.</p>
124
+ *
125
+ * @throws {@link KMSInternalException} (server fault)
126
+ * <p>The request was rejected because an internal exception occurred. The request can be
127
+ * retried.</p>
128
+ *
129
+ * @throws {@link KMSInvalidStateException} (client fault)
130
+ * <p>The request was rejected because the state of the specified resource is not valid for this
131
+ * request.</p>
132
+ * <p>This exceptions means one of the following:</p>
133
+ * <ul>
134
+ * <li>
135
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
136
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
137
+ * information about which key states are compatible with each KMS operation, see
138
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
139
+ * <i>Key Management Service Developer Guide</i>
140
+ * </i>.</p>
141
+ * </li>
142
+ * <li>
143
+ * <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>
144
+ * </li>
145
+ * </ul>
146
+ *
147
+ * @throws {@link LimitExceededException} (client fault)
148
+ * <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
149
+ * <i>Key Management Service Developer Guide</i>.</p>
150
+ *
151
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
152
+ * <p>The request was rejected because the specified policy is not syntactically or semantically
153
+ * correct.</p>
154
+ *
155
+ * @throws {@link NotFoundException} (client fault)
156
+ * <p>The request was rejected because the specified entity or resource could not be
157
+ * found.</p>
158
+ *
159
+ * @throws {@link TagException} (client fault)
160
+ * <p>The request was rejected because one or more tags are not valid.</p>
161
+ *
162
+ * @throws {@link UnsupportedOperationException} (client fault)
163
+ * <p>The request was rejected because a specified parameter is not supported or a specified
164
+ * resource is not valid for this operation.</p>
165
+ *
166
+ *
167
+ * @example To replicate a multi-Region key in a different AWS Region
168
+ * ```javascript
169
+ * // This example creates a multi-Region replica key in us-west-2 of a multi-Region primary key in us-east-1.
170
+ * const input = {
171
+ * "KeyId": "arn:aws:kms:us-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
172
+ * "ReplicaRegion": "us-west-2"
173
+ * };
174
+ * const command = new ReplicateKeyCommand(input);
175
+ * const response = await client.send(command);
176
+ * /* response ==
177
+ * {
178
+ * "ReplicaKeyMetadata": {
179
+ * "AWSAccountId": "111122223333",
180
+ * "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
181
+ * "CreationDate": 1607472987.918,
182
+ * "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
183
+ * "Description": "",
184
+ * "Enabled": true,
185
+ * "EncryptionAlgorithms": [
186
+ * "SYMMETRIC_DEFAULT"
187
+ * ],
188
+ * "KeyId": "mrk-1234abcd12ab34cd56ef1234567890ab",
189
+ * "KeyManager": "CUSTOMER",
190
+ * "KeyState": "Enabled",
191
+ * "KeyUsage": "ENCRYPT_DECRYPT",
192
+ * "MultiRegion": true,
193
+ * "MultiRegionConfiguration": {
194
+ * "MultiRegionKeyType": "REPLICA",
195
+ * "PrimaryKey": {
196
+ * "Arn": "arn:aws:kms:us-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
197
+ * "Region": "us-east-1"
198
+ * },
199
+ * "ReplicaKeys": [
200
+ * {
201
+ * "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
202
+ * "Region": "us-west-2"
203
+ * }
204
+ * ]
205
+ * },
206
+ * "Origin": "AWS_KMS"
207
+ * },
208
+ * "ReplicaPolicy": "{\n \"Version\" : \"2012-10-17\",\n \"Id\" : \"key-default-1\",...}",
209
+ * "ReplicaTags": []
210
+ * }
211
+ * *\/
212
+ * // example id: to-replicate-a-multi-region-key-in-a-different-aws-region-1628622402887
213
+ * ```
214
+ *
114
215
  */
115
216
  export declare class ReplicateKeyCommand extends $Command<ReplicateKeyCommandInput, ReplicateKeyCommandOutput, KMSClientResolvedConfig> {
116
217
  readonly input: ReplicateKeyCommandInput;
@@ -74,6 +74,59 @@ export interface RetireGrantCommandOutput extends __MetadataBearer {
74
74
  * @see {@link RetireGrantCommandOutput} for command's `response` shape.
75
75
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
76
76
  *
77
+ * @throws {@link DependencyTimeoutException} (server fault)
78
+ * <p>The system timed out while trying to fulfill the request. You can retry the
79
+ * request.</p>
80
+ *
81
+ * @throws {@link InvalidArnException} (client fault)
82
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
83
+ * valid.</p>
84
+ *
85
+ * @throws {@link InvalidGrantIdException} (client fault)
86
+ * <p>The request was rejected because the specified <code>GrantId</code> is not valid.</p>
87
+ *
88
+ * @throws {@link InvalidGrantTokenException} (client fault)
89
+ * <p>The request was rejected because the specified grant token 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
+ *
118
+ * @example To retire a grant
119
+ * ```javascript
120
+ * // The following example retires a grant.
121
+ * const input = {
122
+ * "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60",
123
+ * "KeyId": "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab"
124
+ * };
125
+ * const command = new RetireGrantCommand(input);
126
+ * await client.send(command);
127
+ * // example id: to-retire-a-grant-1481327028297
128
+ * ```
129
+ *
77
130
  */
78
131
  export declare class RetireGrantCommand extends $Command<RetireGrantCommandInput, RetireGrantCommandOutput, KMSClientResolvedConfig> {
79
132
  readonly input: RetireGrantCommandInput;
@@ -72,6 +72,56 @@ export interface RevokeGrantCommandOutput extends __MetadataBearer {
72
72
  * @see {@link RevokeGrantCommandOutput} for command's `response` shape.
73
73
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
74
74
  *
75
+ * @throws {@link DependencyTimeoutException} (server fault)
76
+ * <p>The system timed out while trying to fulfill the request. You can retry the
77
+ * request.</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 InvalidGrantIdException} (client fault)
84
+ * <p>The request was rejected because the specified <code>GrantId</code> is not valid.</p>
85
+ *
86
+ * @throws {@link KMSInternalException} (server fault)
87
+ * <p>The request was rejected because an internal exception occurred. The request can be
88
+ * retried.</p>
89
+ *
90
+ * @throws {@link KMSInvalidStateException} (client fault)
91
+ * <p>The request was rejected because the state of the specified resource is not valid for this
92
+ * request.</p>
93
+ * <p>This exceptions means one of the following:</p>
94
+ * <ul>
95
+ * <li>
96
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
97
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
98
+ * information about which key states are compatible with each KMS operation, see
99
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
100
+ * <i>Key Management Service Developer Guide</i>
101
+ * </i>.</p>
102
+ * </li>
103
+ * <li>
104
+ * <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>
105
+ * </li>
106
+ * </ul>
107
+ *
108
+ * @throws {@link NotFoundException} (client fault)
109
+ * <p>The request was rejected because the specified entity or resource could not be
110
+ * found.</p>
111
+ *
112
+ *
113
+ * @example To revoke a grant
114
+ * ```javascript
115
+ * // The following example revokes a grant.
116
+ * const input = {
117
+ * "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60",
118
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
119
+ * };
120
+ * const command = new RevokeGrantCommand(input);
121
+ * await client.send(command);
122
+ * // example id: to-revoke-a-grant-1481329549302
123
+ * ```
124
+ *
75
125
  */
76
126
  export declare class RevokeGrantCommand extends $Command<RevokeGrantCommandInput, RevokeGrantCommandOutput, KMSClientResolvedConfig> {
77
127
  readonly input: RevokeGrantCommandInput;