@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
@@ -84,6 +84,59 @@ export interface ScheduleKeyDeletionCommandOutput extends ScheduleKeyDeletionRes
84
84
  * @see {@link ScheduleKeyDeletionCommandOutput} for command's `response` shape.
85
85
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
86
86
  *
87
+ * @throws {@link DependencyTimeoutException} (server fault)
88
+ * <p>The system timed out while trying to fulfill the request. You can retry the
89
+ * request.</p>
90
+ *
91
+ * @throws {@link InvalidArnException} (client fault)
92
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
93
+ * valid.</p>
94
+ *
95
+ * @throws {@link KMSInternalException} (server fault)
96
+ * <p>The request was rejected because an internal exception occurred. The request can be
97
+ * retried.</p>
98
+ *
99
+ * @throws {@link KMSInvalidStateException} (client fault)
100
+ * <p>The request was rejected because the state of the specified resource is not valid for this
101
+ * request.</p>
102
+ * <p>This exceptions means one of the following:</p>
103
+ * <ul>
104
+ * <li>
105
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
106
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
107
+ * information about which key states are compatible with each KMS operation, see
108
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
109
+ * <i>Key Management Service Developer Guide</i>
110
+ * </i>.</p>
111
+ * </li>
112
+ * <li>
113
+ * <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>
114
+ * </li>
115
+ * </ul>
116
+ *
117
+ * @throws {@link NotFoundException} (client fault)
118
+ * <p>The request was rejected because the specified entity or resource could not be
119
+ * found.</p>
120
+ *
121
+ *
122
+ * @example To schedule a KMS key for deletion
123
+ * ```javascript
124
+ * // The following example schedules the specified KMS key for deletion.
125
+ * const input = {
126
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
127
+ * "PendingWindowInDays": 7
128
+ * };
129
+ * const command = new ScheduleKeyDeletionCommand(input);
130
+ * const response = await client.send(command);
131
+ * /* response ==
132
+ * {
133
+ * "DeletionDate": "2016-12-17T16:00:00-08:00",
134
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
135
+ * }
136
+ * *\/
137
+ * // example id: to-schedule-a-cmk-for-deletion-1481331111094
138
+ * ```
139
+ *
87
140
  */
88
141
  export declare class ScheduleKeyDeletionCommand extends $Command<ScheduleKeyDeletionCommandInput, ScheduleKeyDeletionCommandOutput, KMSClientResolvedConfig> {
89
142
  readonly input: ScheduleKeyDeletionCommandInput;
@@ -80,6 +80,110 @@ export interface SignCommandOutput extends SignResponse, __MetadataBearer {
80
80
  * @see {@link SignCommandOutput} for command's `response` shape.
81
81
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
82
82
  *
83
+ * @throws {@link DependencyTimeoutException} (server fault)
84
+ * <p>The system timed out while trying to fulfill the request. You can retry the
85
+ * request.</p>
86
+ *
87
+ * @throws {@link DisabledException} (client fault)
88
+ * <p>The request was rejected because the specified KMS key is not enabled.</p>
89
+ *
90
+ * @throws {@link InvalidGrantTokenException} (client fault)
91
+ * <p>The request was rejected because the specified grant token is not valid.</p>
92
+ *
93
+ * @throws {@link InvalidKeyUsageException} (client fault)
94
+ * <p>The request was rejected for one of the following reasons: </p>
95
+ * <ul>
96
+ * <li>
97
+ * <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
98
+ * operation.</p>
99
+ * </li>
100
+ * <li>
101
+ * <p>The encryption algorithm or signing algorithm specified for the operation is
102
+ * incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
103
+ * </li>
104
+ * </ul>
105
+ * <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
106
+ * <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
107
+ * messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
108
+ * verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
109
+ * <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
110
+ * <a>DescribeKey</a> operation.</p>
111
+ * <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
112
+ * <a>DescribeKey</a> operation.</p>
113
+ *
114
+ * @throws {@link KeyUnavailableException} (server fault)
115
+ * <p>The request was rejected because the specified KMS key was not available. You can retry
116
+ * the request.</p>
117
+ *
118
+ * @throws {@link KMSInternalException} (server fault)
119
+ * <p>The request was rejected because an internal exception occurred. The request can be
120
+ * retried.</p>
121
+ *
122
+ * @throws {@link KMSInvalidStateException} (client fault)
123
+ * <p>The request was rejected because the state of the specified resource is not valid for this
124
+ * request.</p>
125
+ * <p>This exceptions means one of the following:</p>
126
+ * <ul>
127
+ * <li>
128
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
129
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
130
+ * information about which key states are compatible with each KMS operation, see
131
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
132
+ * <i>Key Management Service Developer Guide</i>
133
+ * </i>.</p>
134
+ * </li>
135
+ * <li>
136
+ * <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>
137
+ * </li>
138
+ * </ul>
139
+ *
140
+ * @throws {@link NotFoundException} (client fault)
141
+ * <p>The request was rejected because the specified entity or resource could not be
142
+ * found.</p>
143
+ *
144
+ *
145
+ * @example To digitally sign a message with an asymmetric KMS key.
146
+ * ```javascript
147
+ * // This operation uses the private key in an asymmetric elliptic curve (ECC) KMS key to generate a digital signature for a given message.
148
+ * const input = {
149
+ * "KeyId": "alias/ECC_signing_key",
150
+ * "Message": "<message to be signed>",
151
+ * "MessageType": "RAW",
152
+ * "SigningAlgorithm": "ECDSA_SHA_384"
153
+ * };
154
+ * const command = new SignCommand(input);
155
+ * const response = await client.send(command);
156
+ * /* response ==
157
+ * {
158
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
159
+ * "Signature": "<binary data>",
160
+ * "SigningAlgorithm": "ECDSA_SHA_384"
161
+ * }
162
+ * *\/
163
+ * // example id: to-digitally-sign-a-message-with-an-asymmetric-kms-key-1
164
+ * ```
165
+ *
166
+ * @example To digitally sign a message digest with an asymmetric KMS key.
167
+ * ```javascript
168
+ * // This operation uses the private key in an asymmetric RSA signing KMS key to generate a digital signature for a message digest. In this example, a large message was hashed and the resulting digest is provided in the Message parameter. To tell KMS not to hash the message again, the MessageType field is set to DIGEST
169
+ * const input = {
170
+ * "KeyId": "alias/RSA_signing_key",
171
+ * "Message": "<message digest to be signed>",
172
+ * "MessageType": "DIGEST",
173
+ * "SigningAlgorithm": "RSASSA_PKCS1_V1_5_SHA_256"
174
+ * };
175
+ * const command = new SignCommand(input);
176
+ * const response = await client.send(command);
177
+ * /* response ==
178
+ * {
179
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
180
+ * "Signature": "<binary data>",
181
+ * "SigningAlgorithm": "RSASSA_PKCS1_V1_5_SHA_256"
182
+ * }
183
+ * *\/
184
+ * // example id: to-digitally-sign-a-message-digest-with-an-asymmetric-kms-key-2
185
+ * ```
186
+ *
83
187
  */
84
188
  export declare class SignCommand extends $Command<SignCommandInput, SignCommandOutput, KMSClientResolvedConfig> {
85
189
  readonly input: SignCommandInput;
@@ -75,6 +75,61 @@ export interface TagResourceCommandOutput extends __MetadataBearer {
75
75
  * @see {@link TagResourceCommandOutput} for command's `response` shape.
76
76
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
77
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 KMSInternalException} (server fault)
83
+ * <p>The request was rejected because an internal exception occurred. The request can be
84
+ * retried.</p>
85
+ *
86
+ * @throws {@link KMSInvalidStateException} (client fault)
87
+ * <p>The request was rejected because the state of the specified resource is not valid for this
88
+ * request.</p>
89
+ * <p>This exceptions means one of the following:</p>
90
+ * <ul>
91
+ * <li>
92
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
93
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
94
+ * information about which key states are compatible with each KMS operation, see
95
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
96
+ * <i>Key Management Service Developer Guide</i>
97
+ * </i>.</p>
98
+ * </li>
99
+ * <li>
100
+ * <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>
101
+ * </li>
102
+ * </ul>
103
+ *
104
+ * @throws {@link LimitExceededException} (client fault)
105
+ * <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
106
+ * <i>Key Management Service Developer Guide</i>.</p>
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
+ * @throws {@link TagException} (client fault)
113
+ * <p>The request was rejected because one or more tags are not valid.</p>
114
+ *
115
+ *
116
+ * @example To tag a KMS key
117
+ * ```javascript
118
+ * // The following example tags a KMS key.
119
+ * const input = {
120
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
121
+ * "Tags": [
122
+ * {
123
+ * "TagKey": "Purpose",
124
+ * "TagValue": "Test"
125
+ * }
126
+ * ]
127
+ * };
128
+ * const command = new TagResourceCommand(input);
129
+ * await client.send(command);
130
+ * // example id: to-tag-a-cmk-1483997246518
131
+ * ```
132
+ *
78
133
  */
79
134
  export declare class TagResourceCommand extends $Command<TagResourceCommandInput, TagResourceCommandOutput, KMSClientResolvedConfig> {
80
135
  readonly input: TagResourceCommandInput;
@@ -70,6 +70,55 @@ export interface UntagResourceCommandOutput extends __MetadataBearer {
70
70
  * @see {@link UntagResourceCommandOutput} for command's `response` shape.
71
71
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
72
72
  *
73
+ * @throws {@link InvalidArnException} (client fault)
74
+ * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
75
+ * valid.</p>
76
+ *
77
+ * @throws {@link KMSInternalException} (server fault)
78
+ * <p>The request was rejected because an internal exception occurred. The request can be
79
+ * retried.</p>
80
+ *
81
+ * @throws {@link KMSInvalidStateException} (client fault)
82
+ * <p>The request was rejected because the state of the specified resource is not valid for this
83
+ * request.</p>
84
+ * <p>This exceptions means one of the following:</p>
85
+ * <ul>
86
+ * <li>
87
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
88
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
89
+ * information about which key states are compatible with each KMS operation, see
90
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
91
+ * <i>Key Management Service Developer Guide</i>
92
+ * </i>.</p>
93
+ * </li>
94
+ * <li>
95
+ * <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>
96
+ * </li>
97
+ * </ul>
98
+ *
99
+ * @throws {@link NotFoundException} (client fault)
100
+ * <p>The request was rejected because the specified entity or resource could not be
101
+ * found.</p>
102
+ *
103
+ * @throws {@link TagException} (client fault)
104
+ * <p>The request was rejected because one or more tags are not valid.</p>
105
+ *
106
+ *
107
+ * @example To remove tags from a KMS key
108
+ * ```javascript
109
+ * // The following example removes tags from a KMS key.
110
+ * const input = {
111
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
112
+ * "TagKeys": [
113
+ * "Purpose",
114
+ * "CostCenter"
115
+ * ]
116
+ * };
117
+ * const command = new UntagResourceCommand(input);
118
+ * await client.send(command);
119
+ * // example id: to-remove-tags-from-a-cmk-1483997590962
120
+ * ```
121
+ *
73
122
  */
74
123
  export declare class UntagResourceCommand extends $Command<UntagResourceCommandInput, UntagResourceCommandOutput, KMSClientResolvedConfig> {
75
124
  readonly input: UntagResourceCommandInput;
@@ -91,6 +91,53 @@ export interface UpdateAliasCommandOutput extends __MetadataBearer {
91
91
  * @see {@link UpdateAliasCommandOutput} 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 KMSInternalException} (server fault)
99
+ * <p>The request was rejected because an internal exception occurred. The request can be
100
+ * retried.</p>
101
+ *
102
+ * @throws {@link KMSInvalidStateException} (client fault)
103
+ * <p>The request was rejected because the state of the specified resource is not valid for this
104
+ * request.</p>
105
+ * <p>This exceptions means one of the following:</p>
106
+ * <ul>
107
+ * <li>
108
+ * <p>The key state of the KMS key is not compatible with the operation. </p>
109
+ * <p>To find the key state, use the <a>DescribeKey</a> operation. For more
110
+ * information about which key states are compatible with each KMS operation, see
111
+ * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
112
+ * <i>Key Management Service Developer Guide</i>
113
+ * </i>.</p>
114
+ * </li>
115
+ * <li>
116
+ * <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>
117
+ * </li>
118
+ * </ul>
119
+ *
120
+ * @throws {@link LimitExceededException} (client fault)
121
+ * <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
122
+ * <i>Key Management Service Developer Guide</i>.</p>
123
+ *
124
+ * @throws {@link NotFoundException} (client fault)
125
+ * <p>The request was rejected because the specified entity or resource could not be
126
+ * found.</p>
127
+ *
128
+ *
129
+ * @example To update an alias
130
+ * ```javascript
131
+ * // The following example updates the specified alias to refer to the specified KMS key.
132
+ * const input = {
133
+ * "AliasName": "alias/ExampleAlias",
134
+ * "TargetKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
135
+ * };
136
+ * const command = new UpdateAliasCommand(input);
137
+ * await client.send(command);
138
+ * // example id: to-update-an-alias-1481572726920
139
+ * ```
140
+ *
94
141
  */
95
142
  export declare class UpdateAliasCommand extends $Command<UpdateAliasCommandInput, UpdateAliasCommandOutput, KMSClientResolvedConfig> {
96
143
  readonly input: UpdateAliasCommandInput;
@@ -121,6 +121,240 @@ export interface UpdateCustomKeyStoreCommandOutput extends UpdateCustomKeyStoreR
121
121
  * @see {@link UpdateCustomKeyStoreCommandOutput} for command's `response` shape.
122
122
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
123
123
  *
124
+ * @throws {@link CloudHsmClusterInvalidConfigurationException} (client fault)
125
+ * <p>The request was rejected because the associated CloudHSM cluster did not meet the
126
+ * configuration requirements for an CloudHSM key store.</p>
127
+ * <ul>
128
+ * <li>
129
+ * <p>The CloudHSM cluster must be configured with private subnets in at least two different
130
+ * Availability Zones in the Region.</p>
131
+ * </li>
132
+ * <li>
133
+ * <p>The <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">security group for
134
+ * the cluster</a> (cloudhsm-cluster-<i><cluster-id></i>-sg) must
135
+ * include inbound rules and outbound rules that allow TCP traffic on ports 2223-2225. The
136
+ * <b>Source</b> in the inbound rules and the <b>Destination</b> in the outbound rules must match the security group
137
+ * ID. These rules are set by default when you create the CloudHSM cluster. Do not delete or
138
+ * 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>
139
+ * </li>
140
+ * <li>
141
+ * <p>The CloudHSM cluster must contain at least as many HSMs as the operation requires. To add
142
+ * HSMs, use the CloudHSM <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation.</p>
143
+ * <p>For the <a>CreateCustomKeyStore</a>, <a>UpdateCustomKeyStore</a>, and <a>CreateKey</a> operations, the CloudHSM cluster must have at least two
144
+ * active HSMs, each in a different Availability Zone. For the <a>ConnectCustomKeyStore</a> operation, the CloudHSM must contain at least one active
145
+ * HSM.</p>
146
+ * </li>
147
+ * </ul>
148
+ * <p>For information about the requirements for an CloudHSM cluster that is associated with an
149
+ * CloudHSM key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the Prerequisites</a>
150
+ * in the <i>Key Management Service Developer Guide</i>. For information about creating a private subnet for an CloudHSM cluster,
151
+ * see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html">Create a Private
152
+ * Subnet</a> in the <i>CloudHSM User Guide</i>. For information about cluster security groups, see
153
+ * <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">Configure a Default Security
154
+ * Group</a> in the <i>
155
+ * <i>CloudHSM User Guide</i>
156
+ * </i>. </p>
157
+ *
158
+ * @throws {@link CloudHsmClusterNotActiveException} (client fault)
159
+ * <p>The request was rejected because the CloudHSM cluster associated with the CloudHSM key store is
160
+ * not active. Initialize and activate the cluster and try the command again. For detailed
161
+ * instructions, see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html">Getting
162
+ * Started</a> in the <i>CloudHSM User Guide</i>.</p>
163
+ *
164
+ * @throws {@link CloudHsmClusterNotFoundException} (client fault)
165
+ * <p>The request was rejected because KMS cannot find the CloudHSM cluster with the specified
166
+ * cluster ID. Retry the request with a different cluster ID.</p>
167
+ *
168
+ * @throws {@link CloudHsmClusterNotRelatedException} (client fault)
169
+ * <p>The request was rejected because the specified CloudHSM cluster has a different cluster
170
+ * certificate than the original cluster. You cannot use the operation to specify an unrelated
171
+ * cluster for an CloudHSM key store.</p>
172
+ * <p>Specify an CloudHSM cluster that shares a backup history with the original cluster. This
173
+ * includes clusters that were created from a backup of the current cluster, and clusters that
174
+ * were created from the same backup that produced the current cluster.</p>
175
+ * <p>CloudHSM clusters that share a backup history have the same cluster certificate. To view the
176
+ * 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>
177
+ *
178
+ * @throws {@link CustomKeyStoreInvalidStateException} (client fault)
179
+ * <p>The request was rejected because of the <code>ConnectionState</code> of the custom key
180
+ * store. To get the <code>ConnectionState</code> of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
181
+ * <p>This exception is thrown under the following conditions:</p>
182
+ * <ul>
183
+ * <li>
184
+ * <p>You requested the <a>ConnectCustomKeyStore</a> operation on a custom key
185
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
186
+ * <code>FAILED</code>. This operation is valid for all other <code>ConnectionState</code>
187
+ * values. To reconnect a custom key store in a <code>FAILED</code> state, disconnect it
188
+ * (<a>DisconnectCustomKeyStore</a>), then connect it
189
+ * (<code>ConnectCustomKeyStore</code>).</p>
190
+ * </li>
191
+ * <li>
192
+ * <p>You requested the <a>CreateKey</a> operation in a custom key store that is
193
+ * not connected. This operations is valid only when the custom key store
194
+ * <code>ConnectionState</code> is <code>CONNECTED</code>.</p>
195
+ * </li>
196
+ * <li>
197
+ * <p>You requested the <a>DisconnectCustomKeyStore</a> operation on a custom key
198
+ * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
199
+ * <code>DISCONNECTED</code>. This operation is valid for all other
200
+ * <code>ConnectionState</code> values.</p>
201
+ * </li>
202
+ * <li>
203
+ * <p>You requested the <a>UpdateCustomKeyStore</a> or <a>DeleteCustomKeyStore</a> operation on a custom key store that is not
204
+ * disconnected. This operation is valid only when the custom key store
205
+ * <code>ConnectionState</code> is <code>DISCONNECTED</code>.</p>
206
+ * </li>
207
+ * <li>
208
+ * <p>You requested the <a>GenerateRandom</a> operation in an CloudHSM key store
209
+ * that is not connected. This operation is valid only when the CloudHSM key store
210
+ * <code>ConnectionState</code> is <code>CONNECTED</code>. </p>
211
+ * </li>
212
+ * </ul>
213
+ *
214
+ * @throws {@link CustomKeyStoreNameInUseException} (client fault)
215
+ * <p>The request was rejected because the specified custom key store name is already assigned
216
+ * to another custom key store in the account. Try again with a custom key store name that is
217
+ * unique in the account.</p>
218
+ *
219
+ * @throws {@link CustomKeyStoreNotFoundException} (client fault)
220
+ * <p>The request was rejected because KMS cannot find a custom key store with the specified
221
+ * key store name or ID.</p>
222
+ *
223
+ * @throws {@link KMSInternalException} (server fault)
224
+ * <p>The request was rejected because an internal exception occurred. The request can be
225
+ * retried.</p>
226
+ *
227
+ * @throws {@link XksProxyIncorrectAuthenticationCredentialException} (client fault)
228
+ * <p>The request was rejected because the proxy credentials failed to authenticate to the
229
+ * specified external key store proxy. The specified external key store proxy rejected a status
230
+ * request from KMS due to invalid credentials. This can indicate an error in the credentials
231
+ * or in the identification of the external key store proxy.</p>
232
+ *
233
+ * @throws {@link XksProxyInvalidConfigurationException} (client fault)
234
+ * <p>The request was rejected because the Amazon VPC endpoint service configuration does not fulfill
235
+ * the requirements for an external key store proxy. For details, see the exception
236
+ * message.</p>
237
+ *
238
+ * @throws {@link XksProxyInvalidResponseException} (client fault)
239
+ * <p></p>
240
+ * <p>KMS cannot interpret the response it received from the external key store proxy. The
241
+ * problem might be a poorly constructed response, but it could also be a transient network
242
+ * issue. If you see this error repeatedly, report it to the proxy vendor.</p>
243
+ *
244
+ * @throws {@link XksProxyUriEndpointInUseException} (client fault)
245
+ * <p>The request was rejected because the concatenation of the <code>XksProxyUriEndpoint</code>
246
+ * is already associated with an external key store in the Amazon Web Services account and Region. Each
247
+ * external key store in an account and Region must use a unique external key store proxy
248
+ * address.</p>
249
+ *
250
+ * @throws {@link XksProxyUriInUseException} (client fault)
251
+ * <p>The request was rejected because the concatenation of the <code>XksProxyUriEndpoint</code>
252
+ * and <code>XksProxyUriPath</code> is already associated with an external key store in the
253
+ * Amazon Web Services account and Region. Each external key store in an account and Region must use a unique
254
+ * external key store proxy API address.</p>
255
+ *
256
+ * @throws {@link XksProxyUriUnreachableException} (client fault)
257
+ * <p>KMS was unable to reach the specified <code>XksProxyUriPath</code>. The path must be
258
+ * reachable before you create the external key store or update its settings.</p>
259
+ * <p>This exception is also thrown when the external key store proxy response to a <code>GetHealthStatus</code>
260
+ * request indicates that all external key manager instances are unavailable.</p>
261
+ *
262
+ * @throws {@link XksProxyVpcEndpointServiceInUseException} (client fault)
263
+ * <p>The request was rejected because the specified Amazon VPC endpoint service is already
264
+ * associated with an external key store in the Amazon Web Services account and Region. Each external key store
265
+ * in an Amazon Web Services account and Region must use a different Amazon VPC endpoint service.</p>
266
+ *
267
+ * @throws {@link XksProxyVpcEndpointServiceInvalidConfigurationException} (client fault)
268
+ * <p>The request was rejected because the Amazon VPC endpoint service configuration does not fulfill
269
+ * the requirements for an external key store proxy. For details, see the exception message and
270
+ * <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
271
+ * store.</p>
272
+ *
273
+ * @throws {@link XksProxyVpcEndpointServiceNotFoundException} (client fault)
274
+ * <p>The request was rejected because KMS could not find the specified VPC endpoint service.
275
+ * Use <a>DescribeCustomKeyStores</a> to verify the VPC endpoint service name for the
276
+ * external key store. Also, confirm that the <code>Allow principals</code> list for the VPC
277
+ * endpoint service includes the KMS service principal for the Region, such as
278
+ * <code>cks.kms.us-east-1.amazonaws.com</code>.</p>
279
+ *
280
+ *
281
+ * @example To edit the friendly name of a custom key store
282
+ * ```javascript
283
+ * // This example changes the friendly name of the AWS KMS custom key store to the name that you specify. This operation does not return any data. To verify that the operation worked, use the DescribeCustomKeyStores operation.
284
+ * const input = {
285
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
286
+ * "NewCustomKeyStoreName": "DevelopmentKeys"
287
+ * };
288
+ * const command = new UpdateCustomKeyStoreCommand(input);
289
+ * await client.send(command);
290
+ * // example id: to-edit-the-friendly-name-of-a-custom-key-store-1
291
+ * ```
292
+ *
293
+ * @example To edit the password of an AWS CloudHSM key store
294
+ * ```javascript
295
+ * // This example tells AWS KMS the password for the kmsuser crypto user in the AWS CloudHSM cluster that is associated with the AWS KMS custom key store. (It does not change the password in the CloudHSM cluster.) This operation does not return any data.
296
+ * const input = {
297
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
298
+ * "KeyStorePassword": "ExamplePassword"
299
+ * };
300
+ * const command = new UpdateCustomKeyStoreCommand(input);
301
+ * await client.send(command);
302
+ * // example id: to-edit-the-properties-of-an-aws-cloudhsm-key-store-2
303
+ * ```
304
+ *
305
+ * @example To associate the custom key store with a different, but related, AWS CloudHSM cluster.
306
+ * ```javascript
307
+ * // This example changes the AWS CloudHSM cluster that is associated with an AWS CloudHSM key store to a related cluster, such as a different backup of the same cluster. This operation does not return any data. To verify that the operation worked, use the DescribeCustomKeyStores operation.
308
+ * const input = {
309
+ * "CloudHsmClusterId": "cluster-1a23b4cdefg",
310
+ * "CustomKeyStoreId": "cks-1234567890abcdef0"
311
+ * };
312
+ * const command = new UpdateCustomKeyStoreCommand(input);
313
+ * await client.send(command);
314
+ * // example id: to-associate-the-custom-key-store-with-a-different-but-related-aws-cloudhsm-cluster-3
315
+ * ```
316
+ *
317
+ * @example To update the proxy authentication credential of an external key store
318
+ * ```javascript
319
+ * // To update the proxy authentication credential for your external key store, specify both the <code>RawSecretAccessKey</code> and the <code>AccessKeyId</code>, even if you are changing only one of the values. You can use this feature to fix an invalid credential or to change the credential when the external key store proxy rotates it.
320
+ * const input = {
321
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
322
+ * "XksProxyAuthenticationCredential": {
323
+ * "AccessKeyId": "ABCDE12345670EXAMPLE",
324
+ * "RawSecretAccessKey": "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo="
325
+ * }
326
+ * };
327
+ * const command = new UpdateCustomKeyStoreCommand(input);
328
+ * await client.send(command);
329
+ * // example id: to-update-the-proxy-authentication-credential-of-an-external-key-store-4
330
+ * ```
331
+ *
332
+ * @example To edit the proxy URI path of an external key store.
333
+ * ```javascript
334
+ * // This example updates the proxy URI path for an external key store
335
+ * const input = {
336
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
337
+ * "XksProxyUriPath": "/new-path/kms/xks/v1"
338
+ * };
339
+ * const command = new UpdateCustomKeyStoreCommand(input);
340
+ * await client.send(command);
341
+ * // example id: to-update-the-xks-proxy-api-path-of-an-external-key-store-5
342
+ * ```
343
+ *
344
+ * @example To update the proxy connectivity of an external key store to VPC_ENDPOINT_SERVICE
345
+ * ```javascript
346
+ * // To change the external key store proxy connectivity option from public endpoint connectivity to VPC endpoint service connectivity, in addition to changing the <code>XksProxyConnectivity</code> value, you must change the <code>XksProxyUriEndpoint</code> value to reflect the private DNS name associated with the VPC endpoint service. You must also add an <code>XksProxyVpcEndpointServiceName</code> value.
347
+ * const input = {
348
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
349
+ * "XksProxyConnectivity": "VPC_ENDPOINT_SERVICE",
350
+ * "XksProxyUriEndpoint": "https://myproxy-private.xks.example.com",
351
+ * "XksProxyVpcEndpointServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-example"
352
+ * };
353
+ * const command = new UpdateCustomKeyStoreCommand(input);
354
+ * await client.send(command);
355
+ * // example id: to-update-the-proxy-connectivity-of-an-external-key-store-to-vpc_endpoint_service-6
356
+ * ```
357
+ *
124
358
  */
125
359
  export declare class UpdateCustomKeyStoreCommand extends $Command<UpdateCustomKeyStoreCommandInput, UpdateCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
126
360
  readonly input: UpdateCustomKeyStoreCommandInput;
@@ -50,6 +50,53 @@ export interface UpdateKeyDescriptionCommandOutput extends __MetadataBearer {
50
50
  * @see {@link UpdateKeyDescriptionCommandOutput} 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 update the description of a KMS key
89
+ * ```javascript
90
+ * // The following example updates the description of the specified KMS key.
91
+ * const input = {
92
+ * "Description": "Example description that indicates the intended use of this KMS key.",
93
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
94
+ * };
95
+ * const command = new UpdateKeyDescriptionCommand(input);
96
+ * await client.send(command);
97
+ * // example id: to-update-the-description-of-a-cmk-1481574808619
98
+ * ```
99
+ *
53
100
  */
54
101
  export declare class UpdateKeyDescriptionCommand extends $Command<UpdateKeyDescriptionCommandInput, UpdateKeyDescriptionCommandOutput, KMSClientResolvedConfig> {
55
102
  readonly input: UpdateKeyDescriptionCommandInput;