@aws-sdk/client-kms 3.288.0 → 3.290.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-types/commands/CancelKeyDeletionCommand.d.ts +51 -0
- package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +96 -0
- package/dist-types/commands/CreateAliasCommand.d.ts +54 -0
- package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +193 -0
- package/dist-types/commands/CreateGrantCommand.d.ts +67 -0
- package/dist-types/commands/CreateKeyCommand.d.ts +405 -0
- package/dist-types/commands/DecryptCommand.d.ts +94 -0
- package/dist-types/commands/DeleteAliasCommand.d.ts +42 -0
- package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +62 -0
- package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +50 -0
- package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +114 -0
- package/dist-types/commands/DescribeKeyCommand.d.ts +245 -0
- package/dist-types/commands/DisableKeyCommand.d.ts +46 -0
- package/dist-types/commands/DisableKeyRotationCommand.d.ts +53 -0
- package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +56 -0
- package/dist-types/commands/EnableKeyCommand.d.ts +50 -0
- package/dist-types/commands/EnableKeyRotationCommand.d.ts +53 -0
- package/dist-types/commands/EncryptCommand.d.ts +80 -0
- package/dist-types/commands/GenerateDataKeyCommand.d.ts +81 -0
- package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +87 -0
- package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +86 -0
- package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +80 -0
- package/dist-types/commands/GenerateMacCommand.d.ts +78 -0
- package/dist-types/commands/GenerateRandomCommand.d.ts +69 -0
- package/dist-types/commands/GetKeyPolicyCommand.d.ts +52 -0
- package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +55 -0
- package/dist-types/commands/GetParametersForImportCommand.d.ts +60 -0
- package/dist-types/commands/GetPublicKeyCommand.d.ts +93 -0
- package/dist-types/commands/ImportKeyMaterialCommand.d.ts +73 -0
- package/dist-types/commands/ListAliasesCommand.d.ts +77 -0
- package/dist-types/commands/ListGrantsCommand.d.ts +111 -0
- package/dist-types/commands/ListKeyPoliciesCommand.d.ts +54 -0
- package/dist-types/commands/ListKeysCommand.d.ts +57 -0
- package/dist-types/commands/ListResourceTagsCommand.d.ts +47 -0
- package/dist-types/commands/ListRetirableGrantsCommand.d.ts +51 -0
- package/dist-types/commands/PutKeyPolicyCommand.d.ts +60 -0
- package/dist-types/commands/ReEncryptCommand.d.ts +95 -0
- package/dist-types/commands/ReplicateKeyCommand.d.ts +101 -0
- package/dist-types/commands/RetireGrantCommand.d.ts +53 -0
- package/dist-types/commands/RevokeGrantCommand.d.ts +50 -0
- package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +53 -0
- package/dist-types/commands/SignCommand.d.ts +104 -0
- package/dist-types/commands/TagResourceCommand.d.ts +55 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +49 -0
- package/dist-types/commands/UpdateAliasCommand.d.ts +47 -0
- package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +234 -0
- package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +47 -0
- package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +54 -0
- package/dist-types/commands/VerifyCommand.d.ts +111 -0
- package/dist-types/commands/VerifyMacCommand.d.ts +84 -0
- package/package.json +29 -29
|
@@ -41,6 +41,57 @@ export interface CancelKeyDeletionCommandOutput extends CancelKeyDeletionRespons
|
|
|
41
41
|
* @see {@link CancelKeyDeletionCommandOutput} for command's `response` shape.
|
|
42
42
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
43
43
|
*
|
|
44
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
45
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
46
|
+
* request.</p>
|
|
47
|
+
*
|
|
48
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
49
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
50
|
+
* valid.</p>
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
53
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
54
|
+
* retried.</p>
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
57
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
58
|
+
* request.</p>
|
|
59
|
+
* <p>This exceptions means one of the following:</p>
|
|
60
|
+
* <ul>
|
|
61
|
+
* <li>
|
|
62
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
63
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
64
|
+
* information about which key states are compatible with each KMS operation, see
|
|
65
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
66
|
+
* <i>Key Management Service Developer Guide</i>
|
|
67
|
+
* </i>.</p>
|
|
68
|
+
* </li>
|
|
69
|
+
* <li>
|
|
70
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
71
|
+
* </li>
|
|
72
|
+
* </ul>
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link NotFoundException} (client fault)
|
|
75
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
76
|
+
* found.</p>
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* @example To cancel deletion of a KMS key
|
|
80
|
+
* ```javascript
|
|
81
|
+
* // The following example cancels deletion of the specified KMS key.
|
|
82
|
+
* const input = {
|
|
83
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
84
|
+
* };
|
|
85
|
+
* const command = new CancelKeyDeletionCommand(input);
|
|
86
|
+
* const response = await client.send(command);
|
|
87
|
+
* /* response ==
|
|
88
|
+
* {
|
|
89
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
90
|
+
* }
|
|
91
|
+
* *\/
|
|
92
|
+
* // example id: to-cancel-deletion-of-a-cmk-1477428535102
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
44
95
|
*/
|
|
45
96
|
export declare class CancelKeyDeletionCommand extends $Command<CancelKeyDeletionCommandInput, CancelKeyDeletionCommandOutput, KMSClientResolvedConfig> {
|
|
46
97
|
readonly input: CancelKeyDeletionCommandInput;
|
|
@@ -115,6 +115,102 @@ export interface ConnectCustomKeyStoreCommandOutput extends ConnectCustomKeyStor
|
|
|
115
115
|
* @see {@link ConnectCustomKeyStoreCommandOutput} for command's `response` shape.
|
|
116
116
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
117
117
|
*
|
|
118
|
+
* @throws {@link CloudHsmClusterInvalidConfigurationException} (client fault)
|
|
119
|
+
* <p>The request was rejected because the associated CloudHSM cluster did not meet the
|
|
120
|
+
* configuration requirements for an CloudHSM key store.</p>
|
|
121
|
+
* <ul>
|
|
122
|
+
* <li>
|
|
123
|
+
* <p>The CloudHSM cluster must be configured with private subnets in at least two different
|
|
124
|
+
* Availability Zones in the Region.</p>
|
|
125
|
+
* </li>
|
|
126
|
+
* <li>
|
|
127
|
+
* <p>The <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">security group for
|
|
128
|
+
* the cluster</a> (cloudhsm-cluster-<i><cluster-id></i>-sg) must
|
|
129
|
+
* include inbound rules and outbound rules that allow TCP traffic on ports 2223-2225. The
|
|
130
|
+
* <b>Source</b> in the inbound rules and the <b>Destination</b> in the outbound rules must match the security group
|
|
131
|
+
* ID. These rules are set by default when you create the CloudHSM cluster. Do not delete or
|
|
132
|
+
* change them. To get information about a particular security group, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html">DescribeSecurityGroups</a> operation.</p>
|
|
133
|
+
* </li>
|
|
134
|
+
* <li>
|
|
135
|
+
* <p>The CloudHSM cluster must contain at least as many HSMs as the operation requires. To add
|
|
136
|
+
* HSMs, use the CloudHSM <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation.</p>
|
|
137
|
+
* <p>For the <a>CreateCustomKeyStore</a>, <a>UpdateCustomKeyStore</a>, and <a>CreateKey</a> operations, the CloudHSM cluster must have at least two
|
|
138
|
+
* active HSMs, each in a different Availability Zone. For the <a>ConnectCustomKeyStore</a> operation, the CloudHSM must contain at least one active
|
|
139
|
+
* HSM.</p>
|
|
140
|
+
* </li>
|
|
141
|
+
* </ul>
|
|
142
|
+
* <p>For information about the requirements for an CloudHSM cluster that is associated with an
|
|
143
|
+
* CloudHSM key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the Prerequisites</a>
|
|
144
|
+
* in the <i>Key Management Service Developer Guide</i>. For information about creating a private subnet for an CloudHSM cluster,
|
|
145
|
+
* see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html">Create a Private
|
|
146
|
+
* Subnet</a> in the <i>CloudHSM User Guide</i>. For information about cluster security groups, see
|
|
147
|
+
* <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">Configure a Default Security
|
|
148
|
+
* Group</a> in the <i>
|
|
149
|
+
* <i>CloudHSM User Guide</i>
|
|
150
|
+
* </i>. </p>
|
|
151
|
+
*
|
|
152
|
+
* @throws {@link CloudHsmClusterNotActiveException} (client fault)
|
|
153
|
+
* <p>The request was rejected because the CloudHSM cluster associated with the CloudHSM key store is
|
|
154
|
+
* not active. Initialize and activate the cluster and try the command again. For detailed
|
|
155
|
+
* instructions, see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html">Getting
|
|
156
|
+
* Started</a> in the <i>CloudHSM User Guide</i>.</p>
|
|
157
|
+
*
|
|
158
|
+
* @throws {@link CustomKeyStoreInvalidStateException} (client fault)
|
|
159
|
+
* <p>The request was rejected because of the <code>ConnectionState</code> of the custom key
|
|
160
|
+
* store. To get the <code>ConnectionState</code> of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
|
|
161
|
+
* <p>This exception is thrown under the following conditions:</p>
|
|
162
|
+
* <ul>
|
|
163
|
+
* <li>
|
|
164
|
+
* <p>You requested the <a>ConnectCustomKeyStore</a> operation on a custom key
|
|
165
|
+
* store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
|
|
166
|
+
* <code>FAILED</code>. This operation is valid for all other <code>ConnectionState</code>
|
|
167
|
+
* values. To reconnect a custom key store in a <code>FAILED</code> state, disconnect it
|
|
168
|
+
* (<a>DisconnectCustomKeyStore</a>), then connect it
|
|
169
|
+
* (<code>ConnectCustomKeyStore</code>).</p>
|
|
170
|
+
* </li>
|
|
171
|
+
* <li>
|
|
172
|
+
* <p>You requested the <a>CreateKey</a> operation in a custom key store that is
|
|
173
|
+
* not connected. This operations is valid only when the custom key store
|
|
174
|
+
* <code>ConnectionState</code> is <code>CONNECTED</code>.</p>
|
|
175
|
+
* </li>
|
|
176
|
+
* <li>
|
|
177
|
+
* <p>You requested the <a>DisconnectCustomKeyStore</a> operation on a custom key
|
|
178
|
+
* store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
|
|
179
|
+
* <code>DISCONNECTED</code>. This operation is valid for all other
|
|
180
|
+
* <code>ConnectionState</code> values.</p>
|
|
181
|
+
* </li>
|
|
182
|
+
* <li>
|
|
183
|
+
* <p>You requested the <a>UpdateCustomKeyStore</a> or <a>DeleteCustomKeyStore</a> operation on a custom key store that is not
|
|
184
|
+
* disconnected. This operation is valid only when the custom key store
|
|
185
|
+
* <code>ConnectionState</code> is <code>DISCONNECTED</code>.</p>
|
|
186
|
+
* </li>
|
|
187
|
+
* <li>
|
|
188
|
+
* <p>You requested the <a>GenerateRandom</a> operation in an CloudHSM key store
|
|
189
|
+
* that is not connected. This operation is valid only when the CloudHSM key store
|
|
190
|
+
* <code>ConnectionState</code> is <code>CONNECTED</code>. </p>
|
|
191
|
+
* </li>
|
|
192
|
+
* </ul>
|
|
193
|
+
*
|
|
194
|
+
* @throws {@link CustomKeyStoreNotFoundException} (client fault)
|
|
195
|
+
* <p>The request was rejected because KMS cannot find a custom key store with the specified
|
|
196
|
+
* key store name or ID.</p>
|
|
197
|
+
*
|
|
198
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
199
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
200
|
+
* retried.</p>
|
|
201
|
+
*
|
|
202
|
+
*
|
|
203
|
+
* @example To connect a custom key store
|
|
204
|
+
* ```javascript
|
|
205
|
+
* // This example connects an AWS KMS custom key store to its backing key store. For an AWS CloudHSM key store, it connects the key store to its AWS CloudHSM cluster. For an external key store, it connects the key store to the external key store proxy that communicates with your external key manager. This operation does not return any data. To verify that the custom key store is connected, use the <code>DescribeCustomKeyStores</code> operation.
|
|
206
|
+
* const input = {
|
|
207
|
+
* "CustomKeyStoreId": "cks-1234567890abcdef0"
|
|
208
|
+
* };
|
|
209
|
+
* const command = new ConnectCustomKeyStoreCommand(input);
|
|
210
|
+
* await client.send(command);
|
|
211
|
+
* // example id: to-connect-a-custom-key-store-1628626947750
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
118
214
|
*/
|
|
119
215
|
export declare class ConnectCustomKeyStoreCommand extends $Command<ConnectCustomKeyStoreCommandInput, ConnectCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
|
|
120
216
|
readonly input: ConnectCustomKeyStoreCommandInput;
|
|
@@ -85,6 +85,60 @@ export interface CreateAliasCommandOutput extends __MetadataBearer {
|
|
|
85
85
|
* @see {@link CreateAliasCommandOutput} for command's `response` shape.
|
|
86
86
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
87
87
|
*
|
|
88
|
+
* @throws {@link AlreadyExistsException} (client fault)
|
|
89
|
+
* <p>The request was rejected because it attempted to create a resource that already
|
|
90
|
+
* exists.</p>
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
93
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
94
|
+
* request.</p>
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link InvalidAliasNameException} (client fault)
|
|
97
|
+
* <p>The request was rejected because the specified alias name is not valid.</p>
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
100
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
101
|
+
* retried.</p>
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
104
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
105
|
+
* request.</p>
|
|
106
|
+
* <p>This exceptions means one of the following:</p>
|
|
107
|
+
* <ul>
|
|
108
|
+
* <li>
|
|
109
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
110
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
111
|
+
* information about which key states are compatible with each KMS operation, see
|
|
112
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
113
|
+
* <i>Key Management Service Developer Guide</i>
|
|
114
|
+
* </i>.</p>
|
|
115
|
+
* </li>
|
|
116
|
+
* <li>
|
|
117
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
118
|
+
* </li>
|
|
119
|
+
* </ul>
|
|
120
|
+
*
|
|
121
|
+
* @throws {@link LimitExceededException} (client fault)
|
|
122
|
+
* <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
|
|
123
|
+
* <i>Key Management Service Developer Guide</i>.</p>
|
|
124
|
+
*
|
|
125
|
+
* @throws {@link NotFoundException} (client fault)
|
|
126
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
127
|
+
* found.</p>
|
|
128
|
+
*
|
|
129
|
+
*
|
|
130
|
+
* @example To create an alias
|
|
131
|
+
* ```javascript
|
|
132
|
+
* // The following example creates an alias for the specified KMS key.
|
|
133
|
+
* const input = {
|
|
134
|
+
* "AliasName": "alias/ExampleAlias",
|
|
135
|
+
* "TargetKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
136
|
+
* };
|
|
137
|
+
* const command = new CreateAliasCommand(input);
|
|
138
|
+
* await client.send(command);
|
|
139
|
+
* // example id: to-create-an-alias-1477505685119
|
|
140
|
+
* ```
|
|
141
|
+
*
|
|
88
142
|
*/
|
|
89
143
|
export declare class CreateAliasCommand extends $Command<CreateAliasCommandInput, CreateAliasCommandOutput, KMSClientResolvedConfig> {
|
|
90
144
|
readonly input: CreateAliasCommandInput;
|
|
@@ -116,6 +116,199 @@ export interface CreateCustomKeyStoreCommandOutput extends CreateCustomKeyStoreR
|
|
|
116
116
|
* @see {@link CreateCustomKeyStoreCommandOutput} for command's `response` shape.
|
|
117
117
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
118
118
|
*
|
|
119
|
+
* @throws {@link CloudHsmClusterInUseException} (client fault)
|
|
120
|
+
* <p>The request was rejected because the specified CloudHSM cluster is already associated with an
|
|
121
|
+
* CloudHSM key store in the account, or it shares a backup history with an CloudHSM key store in the
|
|
122
|
+
* account. Each CloudHSM key store in the account must be associated with a different CloudHSM
|
|
123
|
+
* cluster.</p>
|
|
124
|
+
* <p>CloudHSM clusters that share a backup history have the same cluster certificate. To view the
|
|
125
|
+
* cluster certificate of an CloudHSM cluster, use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html">DescribeClusters</a> operation.</p>
|
|
126
|
+
*
|
|
127
|
+
* @throws {@link CloudHsmClusterInvalidConfigurationException} (client fault)
|
|
128
|
+
* <p>The request was rejected because the associated CloudHSM cluster did not meet the
|
|
129
|
+
* configuration requirements for an CloudHSM key store.</p>
|
|
130
|
+
* <ul>
|
|
131
|
+
* <li>
|
|
132
|
+
* <p>The CloudHSM cluster must be configured with private subnets in at least two different
|
|
133
|
+
* Availability Zones in the Region.</p>
|
|
134
|
+
* </li>
|
|
135
|
+
* <li>
|
|
136
|
+
* <p>The <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">security group for
|
|
137
|
+
* the cluster</a> (cloudhsm-cluster-<i><cluster-id></i>-sg) must
|
|
138
|
+
* include inbound rules and outbound rules that allow TCP traffic on ports 2223-2225. The
|
|
139
|
+
* <b>Source</b> in the inbound rules and the <b>Destination</b> in the outbound rules must match the security group
|
|
140
|
+
* ID. These rules are set by default when you create the CloudHSM cluster. Do not delete or
|
|
141
|
+
* change them. To get information about a particular security group, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html">DescribeSecurityGroups</a> operation.</p>
|
|
142
|
+
* </li>
|
|
143
|
+
* <li>
|
|
144
|
+
* <p>The CloudHSM cluster must contain at least as many HSMs as the operation requires. To add
|
|
145
|
+
* HSMs, use the CloudHSM <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation.</p>
|
|
146
|
+
* <p>For the <a>CreateCustomKeyStore</a>, <a>UpdateCustomKeyStore</a>, and <a>CreateKey</a> operations, the CloudHSM cluster must have at least two
|
|
147
|
+
* active HSMs, each in a different Availability Zone. For the <a>ConnectCustomKeyStore</a> operation, the CloudHSM must contain at least one active
|
|
148
|
+
* HSM.</p>
|
|
149
|
+
* </li>
|
|
150
|
+
* </ul>
|
|
151
|
+
* <p>For information about the requirements for an CloudHSM cluster that is associated with an
|
|
152
|
+
* CloudHSM key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the Prerequisites</a>
|
|
153
|
+
* in the <i>Key Management Service Developer Guide</i>. For information about creating a private subnet for an CloudHSM cluster,
|
|
154
|
+
* see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html">Create a Private
|
|
155
|
+
* Subnet</a> in the <i>CloudHSM User Guide</i>. For information about cluster security groups, see
|
|
156
|
+
* <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">Configure a Default Security
|
|
157
|
+
* Group</a> in the <i>
|
|
158
|
+
* <i>CloudHSM User Guide</i>
|
|
159
|
+
* </i>. </p>
|
|
160
|
+
*
|
|
161
|
+
* @throws {@link CloudHsmClusterNotActiveException} (client fault)
|
|
162
|
+
* <p>The request was rejected because the CloudHSM cluster associated with the CloudHSM key store is
|
|
163
|
+
* not active. Initialize and activate the cluster and try the command again. For detailed
|
|
164
|
+
* instructions, see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html">Getting
|
|
165
|
+
* Started</a> in the <i>CloudHSM User Guide</i>.</p>
|
|
166
|
+
*
|
|
167
|
+
* @throws {@link CloudHsmClusterNotFoundException} (client fault)
|
|
168
|
+
* <p>The request was rejected because KMS cannot find the CloudHSM cluster with the specified
|
|
169
|
+
* cluster ID. Retry the request with a different cluster ID.</p>
|
|
170
|
+
*
|
|
171
|
+
* @throws {@link CustomKeyStoreNameInUseException} (client fault)
|
|
172
|
+
* <p>The request was rejected because the specified custom key store name is already assigned
|
|
173
|
+
* to another custom key store in the account. Try again with a custom key store name that is
|
|
174
|
+
* unique in the account.</p>
|
|
175
|
+
*
|
|
176
|
+
* @throws {@link IncorrectTrustAnchorException} (client fault)
|
|
177
|
+
* <p>The request was rejected because the trust anchor certificate in the request to create an
|
|
178
|
+
* CloudHSM key store is not the trust anchor certificate for the specified CloudHSM cluster.</p>
|
|
179
|
+
* <p>When you <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr">initialize the CloudHSM cluster</a>, you create the trust anchor certificate and save it
|
|
180
|
+
* in the <code>customerCA.crt</code> file.</p>
|
|
181
|
+
*
|
|
182
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
183
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
184
|
+
* retried.</p>
|
|
185
|
+
*
|
|
186
|
+
* @throws {@link LimitExceededException} (client fault)
|
|
187
|
+
* <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
|
|
188
|
+
* <i>Key Management Service Developer Guide</i>.</p>
|
|
189
|
+
*
|
|
190
|
+
* @throws {@link XksProxyIncorrectAuthenticationCredentialException} (client fault)
|
|
191
|
+
* <p>The request was rejected because the proxy credentials failed to authenticate to the
|
|
192
|
+
* specified external key store proxy. The specified external key store proxy rejected a status
|
|
193
|
+
* request from KMS due to invalid credentials. This can indicate an error in the credentials
|
|
194
|
+
* or in the identification of the external key store proxy.</p>
|
|
195
|
+
*
|
|
196
|
+
* @throws {@link XksProxyInvalidConfigurationException} (client fault)
|
|
197
|
+
* <p>The request was rejected because the Amazon VPC endpoint service configuration does not fulfill
|
|
198
|
+
* the requirements for an external key store proxy. For details, see the exception
|
|
199
|
+
* message.</p>
|
|
200
|
+
*
|
|
201
|
+
* @throws {@link XksProxyInvalidResponseException} (client fault)
|
|
202
|
+
* <p></p>
|
|
203
|
+
* <p>KMS cannot interpret the response it received from the external key store proxy. The
|
|
204
|
+
* problem might be a poorly constructed response, but it could also be a transient network
|
|
205
|
+
* issue. If you see this error repeatedly, report it to the proxy vendor.</p>
|
|
206
|
+
*
|
|
207
|
+
* @throws {@link XksProxyUriEndpointInUseException} (client fault)
|
|
208
|
+
* <p>The request was rejected because the concatenation of the <code>XksProxyUriEndpoint</code>
|
|
209
|
+
* is already associated with an external key store in the Amazon Web Services account and Region. Each
|
|
210
|
+
* external key store in an account and Region must use a unique external key store proxy
|
|
211
|
+
* address.</p>
|
|
212
|
+
*
|
|
213
|
+
* @throws {@link XksProxyUriInUseException} (client fault)
|
|
214
|
+
* <p>The request was rejected because the concatenation of the <code>XksProxyUriEndpoint</code>
|
|
215
|
+
* and <code>XksProxyUriPath</code> is already associated with an external key store in the
|
|
216
|
+
* Amazon Web Services account and Region. Each external key store in an account and Region must use a unique
|
|
217
|
+
* external key store proxy API address.</p>
|
|
218
|
+
*
|
|
219
|
+
* @throws {@link XksProxyUriUnreachableException} (client fault)
|
|
220
|
+
* <p>KMS was unable to reach the specified <code>XksProxyUriPath</code>. The path must be
|
|
221
|
+
* reachable before you create the external key store or update its settings.</p>
|
|
222
|
+
* <p>This exception is also thrown when the external key store proxy response to a <code>GetHealthStatus</code>
|
|
223
|
+
* request indicates that all external key manager instances are unavailable.</p>
|
|
224
|
+
*
|
|
225
|
+
* @throws {@link XksProxyVpcEndpointServiceInUseException} (client fault)
|
|
226
|
+
* <p>The request was rejected because the specified Amazon VPC endpoint service is already
|
|
227
|
+
* associated with an external key store in the Amazon Web Services account and Region. Each external key store
|
|
228
|
+
* in an Amazon Web Services account and Region must use a different Amazon VPC endpoint service.</p>
|
|
229
|
+
*
|
|
230
|
+
* @throws {@link XksProxyVpcEndpointServiceInvalidConfigurationException} (client fault)
|
|
231
|
+
* <p>The request was rejected because the Amazon VPC endpoint service configuration does not fulfill
|
|
232
|
+
* the requirements for an external key store proxy. For details, see the exception message and
|
|
233
|
+
* <a href="kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements">review the requirements</a> for Amazon VPC endpoint service connectivity for an external key
|
|
234
|
+
* store.</p>
|
|
235
|
+
*
|
|
236
|
+
* @throws {@link XksProxyVpcEndpointServiceNotFoundException} (client fault)
|
|
237
|
+
* <p>The request was rejected because KMS could not find the specified VPC endpoint service.
|
|
238
|
+
* Use <a>DescribeCustomKeyStores</a> to verify the VPC endpoint service name for the
|
|
239
|
+
* external key store. Also, confirm that the <code>Allow principals</code> list for the VPC
|
|
240
|
+
* endpoint service includes the KMS service principal for the Region, such as
|
|
241
|
+
* <code>cks.kms.us-east-1.amazonaws.com</code>.</p>
|
|
242
|
+
*
|
|
243
|
+
*
|
|
244
|
+
* @example To create an AWS CloudHSM key store
|
|
245
|
+
* ```javascript
|
|
246
|
+
* // This example creates a custom key store that is associated with an AWS CloudHSM cluster.
|
|
247
|
+
* const input = {
|
|
248
|
+
* "CloudHsmClusterId": "cluster-1a23b4cdefg",
|
|
249
|
+
* "CustomKeyStoreName": "ExampleKeyStore",
|
|
250
|
+
* "KeyStorePassword": "kmsPswd",
|
|
251
|
+
* "TrustAnchorCertificate": "<certificate-goes-here>"
|
|
252
|
+
* };
|
|
253
|
+
* const command = new CreateCustomKeyStoreCommand(input);
|
|
254
|
+
* const response = await client.send(command);
|
|
255
|
+
* /* response ==
|
|
256
|
+
* {
|
|
257
|
+
* "CustomKeyStoreId": "cks-1234567890abcdef0"
|
|
258
|
+
* }
|
|
259
|
+
* *\/
|
|
260
|
+
* // example id: to-create-an-aws-cloudhsm-custom-key-store-1
|
|
261
|
+
* ```
|
|
262
|
+
*
|
|
263
|
+
* @example To create an external key store with VPC endpoint service connectivity
|
|
264
|
+
* ```javascript
|
|
265
|
+
* // This example creates an external key store that uses an Amazon VPC endpoint service to communicate with AWS KMS.
|
|
266
|
+
* const input = {
|
|
267
|
+
* "CustomKeyStoreName": "ExampleVPCEndpointKeyStore",
|
|
268
|
+
* "CustomKeyStoreType": "EXTERNAL_KEY_STORE",
|
|
269
|
+
* "XksProxyAuthenticationCredential": {
|
|
270
|
+
* "AccessKeyId": "ABCDE12345670EXAMPLE",
|
|
271
|
+
* "RawSecretAccessKey": "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo="
|
|
272
|
+
* },
|
|
273
|
+
* "XksProxyConnectivity": "VPC_ENDPOINT_SERVICE",
|
|
274
|
+
* "XksProxyUriEndpoint": "https://myproxy-private.xks.example.com",
|
|
275
|
+
* "XksProxyUriPath": "/example-prefix/kms/xks/v1",
|
|
276
|
+
* "XksProxyVpcEndpointServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-example1"
|
|
277
|
+
* };
|
|
278
|
+
* const command = new CreateCustomKeyStoreCommand(input);
|
|
279
|
+
* const response = await client.send(command);
|
|
280
|
+
* /* response ==
|
|
281
|
+
* {
|
|
282
|
+
* "CustomKeyStoreId": "cks-1234567890abcdef0"
|
|
283
|
+
* }
|
|
284
|
+
* *\/
|
|
285
|
+
* // example id: to-create-an-external-custom-key-store-with-vpc-connectivity-2
|
|
286
|
+
* ```
|
|
287
|
+
*
|
|
288
|
+
* @example To create an external key store with public endpoint connectivity
|
|
289
|
+
* ```javascript
|
|
290
|
+
* // This example creates an external key store with public endpoint connectivity.
|
|
291
|
+
* const input = {
|
|
292
|
+
* "CustomKeyStoreName": "ExamplePublicEndpointKeyStore",
|
|
293
|
+
* "CustomKeyStoreType": "EXTERNAL_KEY_STORE",
|
|
294
|
+
* "XksProxyAuthenticationCredential": {
|
|
295
|
+
* "AccessKeyId": "ABCDE12345670EXAMPLE",
|
|
296
|
+
* "RawSecretAccessKey": "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo="
|
|
297
|
+
* },
|
|
298
|
+
* "XksProxyConnectivity": "PUBLIC_ENDPOINT",
|
|
299
|
+
* "XksProxyUriEndpoint": "https://myproxy.xks.example.com",
|
|
300
|
+
* "XksProxyUriPath": "/kms/xks/v1"
|
|
301
|
+
* };
|
|
302
|
+
* const command = new CreateCustomKeyStoreCommand(input);
|
|
303
|
+
* const response = await client.send(command);
|
|
304
|
+
* /* response ==
|
|
305
|
+
* {
|
|
306
|
+
* "CustomKeyStoreId": "cks-987654321abcdef0"
|
|
307
|
+
* }
|
|
308
|
+
* *\/
|
|
309
|
+
* // example id: to-create-an-external-custom-key-store-with-a-public-endpoint-3
|
|
310
|
+
* ```
|
|
311
|
+
*
|
|
119
312
|
*/
|
|
120
313
|
export declare class CreateCustomKeyStoreCommand extends $Command<CreateCustomKeyStoreCommandInput, CreateCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
|
|
121
314
|
readonly input: CreateCustomKeyStoreCommandInput;
|
|
@@ -90,6 +90,73 @@ export interface CreateGrantCommandOutput extends CreateGrantResponse, __Metadat
|
|
|
90
90
|
* @see {@link CreateGrantCommandOutput} for command's `response` shape.
|
|
91
91
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
92
92
|
*
|
|
93
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
94
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
95
|
+
* request.</p>
|
|
96
|
+
*
|
|
97
|
+
* @throws {@link DisabledException} (client fault)
|
|
98
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
101
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
102
|
+
* valid.</p>
|
|
103
|
+
*
|
|
104
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
105
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
108
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
109
|
+
* retried.</p>
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
112
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
113
|
+
* request.</p>
|
|
114
|
+
* <p>This exceptions means one of the following:</p>
|
|
115
|
+
* <ul>
|
|
116
|
+
* <li>
|
|
117
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
118
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
119
|
+
* information about which key states are compatible with each KMS operation, see
|
|
120
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
121
|
+
* <i>Key Management Service Developer Guide</i>
|
|
122
|
+
* </i>.</p>
|
|
123
|
+
* </li>
|
|
124
|
+
* <li>
|
|
125
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
126
|
+
* </li>
|
|
127
|
+
* </ul>
|
|
128
|
+
*
|
|
129
|
+
* @throws {@link LimitExceededException} (client fault)
|
|
130
|
+
* <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
|
|
131
|
+
* <i>Key Management Service Developer Guide</i>.</p>
|
|
132
|
+
*
|
|
133
|
+
* @throws {@link NotFoundException} (client fault)
|
|
134
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
135
|
+
* found.</p>
|
|
136
|
+
*
|
|
137
|
+
*
|
|
138
|
+
* @example To create a grant
|
|
139
|
+
* ```javascript
|
|
140
|
+
* // The following example creates a grant that allows the specified IAM role to encrypt data with the specified KMS key.
|
|
141
|
+
* const input = {
|
|
142
|
+
* "GranteePrincipal": "arn:aws:iam::111122223333:role/ExampleRole",
|
|
143
|
+
* "KeyId": "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
144
|
+
* "Operations": [
|
|
145
|
+
* "Encrypt",
|
|
146
|
+
* "Decrypt"
|
|
147
|
+
* ]
|
|
148
|
+
* };
|
|
149
|
+
* const command = new CreateGrantCommand(input);
|
|
150
|
+
* const response = await client.send(command);
|
|
151
|
+
* /* response ==
|
|
152
|
+
* {
|
|
153
|
+
* "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60",
|
|
154
|
+
* "GrantToken": "AQpAM2RhZTk1MGMyNTk2ZmZmMzEyYWVhOWViN2I1MWM4Mzc0MWFiYjc0ZDE1ODkyNGFlNTIzODZhMzgyZjBlNGY3NiKIAgEBAgB4Pa6VDCWW__MSrqnre1HIN0Grt00ViSSuUjhqOC8OT3YAAADfMIHcBgkqhkiG9w0BBwaggc4wgcsCAQAwgcUGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMmqLyBTAegIn9XlK5AgEQgIGXZQjkBcl1dykDdqZBUQ6L1OfUivQy7JVYO2-ZJP7m6f1g8GzV47HX5phdtONAP7K_HQIflcgpkoCqd_fUnE114mSmiagWkbQ5sqAVV3ov-VeqgrvMe5ZFEWLMSluvBAqdjHEdMIkHMlhlj4ENZbzBfo9Wxk8b8SnwP4kc4gGivedzFXo-dwN8fxjjq_ZZ9JFOj2ijIbj5FyogDCN0drOfi8RORSEuCEmPvjFRMFAwcmwFkN2NPp89amA"
|
|
155
|
+
* }
|
|
156
|
+
* *\/
|
|
157
|
+
* // example id: to-create-a-grant-1477972226782
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
93
160
|
*/
|
|
94
161
|
export declare class CreateGrantCommand extends $Command<CreateGrantCommandInput, CreateGrantCommandOutput, KMSClientResolvedConfig> {
|
|
95
162
|
readonly input: CreateGrantCommandInput;
|