@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
|
@@ -43,6 +43,75 @@ export interface GenerateRandomCommandOutput extends GenerateRandomResponse, __M
|
|
|
43
43
|
* @see {@link GenerateRandomCommandOutput} for command's `response` shape.
|
|
44
44
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
45
45
|
*
|
|
46
|
+
* @throws {@link CustomKeyStoreInvalidStateException} (client fault)
|
|
47
|
+
* <p>The request was rejected because of the <code>ConnectionState</code> of the custom key
|
|
48
|
+
* store. To get the <code>ConnectionState</code> of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
|
|
49
|
+
* <p>This exception is thrown under the following conditions:</p>
|
|
50
|
+
* <ul>
|
|
51
|
+
* <li>
|
|
52
|
+
* <p>You requested the <a>ConnectCustomKeyStore</a> operation on a custom key
|
|
53
|
+
* store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
|
|
54
|
+
* <code>FAILED</code>. This operation is valid for all other <code>ConnectionState</code>
|
|
55
|
+
* values. To reconnect a custom key store in a <code>FAILED</code> state, disconnect it
|
|
56
|
+
* (<a>DisconnectCustomKeyStore</a>), then connect it
|
|
57
|
+
* (<code>ConnectCustomKeyStore</code>).</p>
|
|
58
|
+
* </li>
|
|
59
|
+
* <li>
|
|
60
|
+
* <p>You requested the <a>CreateKey</a> operation in a custom key store that is
|
|
61
|
+
* not connected. This operations is valid only when the custom key store
|
|
62
|
+
* <code>ConnectionState</code> is <code>CONNECTED</code>.</p>
|
|
63
|
+
* </li>
|
|
64
|
+
* <li>
|
|
65
|
+
* <p>You requested the <a>DisconnectCustomKeyStore</a> operation on a custom key
|
|
66
|
+
* store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
|
|
67
|
+
* <code>DISCONNECTED</code>. This operation is valid for all other
|
|
68
|
+
* <code>ConnectionState</code> values.</p>
|
|
69
|
+
* </li>
|
|
70
|
+
* <li>
|
|
71
|
+
* <p>You requested the <a>UpdateCustomKeyStore</a> or <a>DeleteCustomKeyStore</a> operation on a custom key store that is not
|
|
72
|
+
* disconnected. This operation is valid only when the custom key store
|
|
73
|
+
* <code>ConnectionState</code> is <code>DISCONNECTED</code>.</p>
|
|
74
|
+
* </li>
|
|
75
|
+
* <li>
|
|
76
|
+
* <p>You requested the <a>GenerateRandom</a> operation in an CloudHSM key store
|
|
77
|
+
* that is not connected. This operation is valid only when the CloudHSM key store
|
|
78
|
+
* <code>ConnectionState</code> is <code>CONNECTED</code>. </p>
|
|
79
|
+
* </li>
|
|
80
|
+
* </ul>
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link CustomKeyStoreNotFoundException} (client fault)
|
|
83
|
+
* <p>The request was rejected because KMS cannot find a custom key store with the specified
|
|
84
|
+
* key store name or ID.</p>
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
87
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
88
|
+
* request.</p>
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
91
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
92
|
+
* retried.</p>
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link UnsupportedOperationException} (client fault)
|
|
95
|
+
* <p>The request was rejected because a specified parameter is not supported or a specified
|
|
96
|
+
* resource is not valid for this operation.</p>
|
|
97
|
+
*
|
|
98
|
+
*
|
|
99
|
+
* @example To generate random data
|
|
100
|
+
* ```javascript
|
|
101
|
+
* // The following example generates 32 bytes of random data.
|
|
102
|
+
* const input = {
|
|
103
|
+
* "NumberOfBytes": 32
|
|
104
|
+
* };
|
|
105
|
+
* const command = new GenerateRandomCommand(input);
|
|
106
|
+
* const response = await client.send(command);
|
|
107
|
+
* /* response ==
|
|
108
|
+
* {
|
|
109
|
+
* "Plaintext": "<binary data>"
|
|
110
|
+
* }
|
|
111
|
+
* *\/
|
|
112
|
+
* // example id: to-generate-random-data-1479163645600
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
46
115
|
*/
|
|
47
116
|
export declare class GenerateRandomCommand extends $Command<GenerateRandomCommandInput, GenerateRandomCommandOutput, KMSClientResolvedConfig> {
|
|
48
117
|
readonly input: GenerateRandomCommandInput;
|
|
@@ -36,6 +36,58 @@ export interface GetKeyPolicyCommandOutput extends GetKeyPolicyResponse, __Metad
|
|
|
36
36
|
* @see {@link GetKeyPolicyCommandOutput} for command's `response` shape.
|
|
37
37
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
38
38
|
*
|
|
39
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
40
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
41
|
+
* request.</p>
|
|
42
|
+
*
|
|
43
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
44
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
45
|
+
* valid.</p>
|
|
46
|
+
*
|
|
47
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
48
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
49
|
+
* retried.</p>
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
52
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
53
|
+
* request.</p>
|
|
54
|
+
* <p>This exceptions means one of the following:</p>
|
|
55
|
+
* <ul>
|
|
56
|
+
* <li>
|
|
57
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
58
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
59
|
+
* information about which key states are compatible with each KMS operation, see
|
|
60
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
61
|
+
* <i>Key Management Service Developer Guide</i>
|
|
62
|
+
* </i>.</p>
|
|
63
|
+
* </li>
|
|
64
|
+
* <li>
|
|
65
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
66
|
+
* </li>
|
|
67
|
+
* </ul>
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link NotFoundException} (client fault)
|
|
70
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
71
|
+
* found.</p>
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
* @example To retrieve a key policy
|
|
75
|
+
* ```javascript
|
|
76
|
+
* // The following example retrieves the key policy for the specified KMS key.
|
|
77
|
+
* const input = {
|
|
78
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
79
|
+
* "PolicyName": "default"
|
|
80
|
+
* };
|
|
81
|
+
* const command = new GetKeyPolicyCommand(input);
|
|
82
|
+
* const response = await client.send(command);
|
|
83
|
+
* /* response ==
|
|
84
|
+
* {
|
|
85
|
+
* "Policy": "{\n \"Version\" : \"2012-10-17\",\n \"Id\" : \"key-default-1\",\n \"Statement\" : [ {\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}"
|
|
86
|
+
* }
|
|
87
|
+
* *\/
|
|
88
|
+
* // example id: to-retrieve-a-key-policy-1479170128325
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
39
91
|
*/
|
|
40
92
|
export declare class GetKeyPolicyCommand extends $Command<GetKeyPolicyCommandInput, GetKeyPolicyCommandOutput, KMSClientResolvedConfig> {
|
|
41
93
|
readonly input: GetKeyPolicyCommandInput;
|
|
@@ -81,6 +81,61 @@ export interface GetKeyRotationStatusCommandOutput extends GetKeyRotationStatusR
|
|
|
81
81
|
* @see {@link GetKeyRotationStatusCommandOutput} for command's `response` shape.
|
|
82
82
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
83
83
|
*
|
|
84
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
85
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
86
|
+
* request.</p>
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
89
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
90
|
+
* valid.</p>
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
93
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
94
|
+
* retried.</p>
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
97
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
98
|
+
* request.</p>
|
|
99
|
+
* <p>This exceptions means one of the following:</p>
|
|
100
|
+
* <ul>
|
|
101
|
+
* <li>
|
|
102
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
103
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
104
|
+
* information about which key states are compatible with each KMS operation, see
|
|
105
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
106
|
+
* <i>Key Management Service Developer Guide</i>
|
|
107
|
+
* </i>.</p>
|
|
108
|
+
* </li>
|
|
109
|
+
* <li>
|
|
110
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
111
|
+
* </li>
|
|
112
|
+
* </ul>
|
|
113
|
+
*
|
|
114
|
+
* @throws {@link NotFoundException} (client fault)
|
|
115
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
116
|
+
* found.</p>
|
|
117
|
+
*
|
|
118
|
+
* @throws {@link UnsupportedOperationException} (client fault)
|
|
119
|
+
* <p>The request was rejected because a specified parameter is not supported or a specified
|
|
120
|
+
* resource is not valid for this operation.</p>
|
|
121
|
+
*
|
|
122
|
+
*
|
|
123
|
+
* @example To retrieve the rotation status for a KMS key
|
|
124
|
+
* ```javascript
|
|
125
|
+
* // The following example retrieves the status of automatic annual rotation of the key material for the specified KMS key.
|
|
126
|
+
* const input = {
|
|
127
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
128
|
+
* };
|
|
129
|
+
* const command = new GetKeyRotationStatusCommand(input);
|
|
130
|
+
* const response = await client.send(command);
|
|
131
|
+
* /* response ==
|
|
132
|
+
* {
|
|
133
|
+
* "KeyRotationEnabled": true
|
|
134
|
+
* }
|
|
135
|
+
* *\/
|
|
136
|
+
* // example id: to-retrieve-the-rotation-status-for-a-cmk-1479172287408
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
84
139
|
*/
|
|
85
140
|
export declare class GetKeyRotationStatusCommand extends $Command<GetKeyRotationStatusCommandInput, GetKeyRotationStatusCommandOutput, KMSClientResolvedConfig> {
|
|
86
141
|
readonly input: GetKeyRotationStatusCommandInput;
|
|
@@ -62,6 +62,66 @@ export interface GetParametersForImportCommandOutput extends GetParametersForImp
|
|
|
62
62
|
* @see {@link GetParametersForImportCommandOutput} for command's `response` shape.
|
|
63
63
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
64
64
|
*
|
|
65
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
66
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
67
|
+
* request.</p>
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
70
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
71
|
+
* valid.</p>
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
74
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
75
|
+
* retried.</p>
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
78
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
79
|
+
* request.</p>
|
|
80
|
+
* <p>This exceptions means one of the following:</p>
|
|
81
|
+
* <ul>
|
|
82
|
+
* <li>
|
|
83
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
84
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
85
|
+
* information about which key states are compatible with each KMS operation, see
|
|
86
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
87
|
+
* <i>Key Management Service Developer Guide</i>
|
|
88
|
+
* </i>.</p>
|
|
89
|
+
* </li>
|
|
90
|
+
* <li>
|
|
91
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
92
|
+
* </li>
|
|
93
|
+
* </ul>
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link NotFoundException} (client fault)
|
|
96
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
97
|
+
* found.</p>
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link UnsupportedOperationException} (client fault)
|
|
100
|
+
* <p>The request was rejected because a specified parameter is not supported or a specified
|
|
101
|
+
* resource is not valid for this operation.</p>
|
|
102
|
+
*
|
|
103
|
+
*
|
|
104
|
+
* @example To retrieve the public key and import token for a KMS key
|
|
105
|
+
* ```javascript
|
|
106
|
+
* // The following example retrieves the public key and import token for the specified KMS key.
|
|
107
|
+
* const input = {
|
|
108
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
109
|
+
* "WrappingAlgorithm": "RSAES_OAEP_SHA_1",
|
|
110
|
+
* "WrappingKeySpec": "RSA_2048"
|
|
111
|
+
* };
|
|
112
|
+
* const command = new GetParametersForImportCommand(input);
|
|
113
|
+
* const response = await client.send(command);
|
|
114
|
+
* /* response ==
|
|
115
|
+
* {
|
|
116
|
+
* "ImportToken": "<binary data>",
|
|
117
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
118
|
+
* "ParametersValidTo": "2016-12-01T14:52:17-08:00",
|
|
119
|
+
* "PublicKey": "<binary data>"
|
|
120
|
+
* }
|
|
121
|
+
* *\/
|
|
122
|
+
* // example id: to-retrieve-the-public-key-and-import-token-for-a-cmk-1480626483211
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
65
125
|
*/
|
|
66
126
|
export declare class GetParametersForImportCommand extends $Command<GetParametersForImportCommandInput, GetParametersForImportCommandOutput, KMSClientResolvedConfig> {
|
|
67
127
|
readonly input: GetParametersForImportCommandInput;
|
|
@@ -77,6 +77,99 @@ export interface GetPublicKeyCommandOutput extends GetPublicKeyResponse, __Metad
|
|
|
77
77
|
* @see {@link GetPublicKeyCommandOutput} for command's `response` shape.
|
|
78
78
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
79
79
|
*
|
|
80
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
81
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
82
|
+
* request.</p>
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link DisabledException} (client fault)
|
|
85
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
88
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
89
|
+
* valid.</p>
|
|
90
|
+
*
|
|
91
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
92
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
95
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
96
|
+
* <ul>
|
|
97
|
+
* <li>
|
|
98
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
99
|
+
* operation.</p>
|
|
100
|
+
* </li>
|
|
101
|
+
* <li>
|
|
102
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
103
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
104
|
+
* </li>
|
|
105
|
+
* </ul>
|
|
106
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
107
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
108
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
109
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
110
|
+
* <code>GENERATE_VERIFY_MAC</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
111
|
+
* <a>DescribeKey</a> operation.</p>
|
|
112
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
113
|
+
* <a>DescribeKey</a> operation.</p>
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
116
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
117
|
+
* the request.</p>
|
|
118
|
+
*
|
|
119
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
120
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
121
|
+
* retried.</p>
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
124
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
125
|
+
* request.</p>
|
|
126
|
+
* <p>This exceptions means one of the following:</p>
|
|
127
|
+
* <ul>
|
|
128
|
+
* <li>
|
|
129
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
130
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
131
|
+
* information about which key states are compatible with each KMS operation, see
|
|
132
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
133
|
+
* <i>Key Management Service Developer Guide</i>
|
|
134
|
+
* </i>.</p>
|
|
135
|
+
* </li>
|
|
136
|
+
* <li>
|
|
137
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
138
|
+
* </li>
|
|
139
|
+
* </ul>
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link NotFoundException} (client fault)
|
|
142
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
143
|
+
* found.</p>
|
|
144
|
+
*
|
|
145
|
+
* @throws {@link UnsupportedOperationException} (client fault)
|
|
146
|
+
* <p>The request was rejected because a specified parameter is not supported or a specified
|
|
147
|
+
* resource is not valid for this operation.</p>
|
|
148
|
+
*
|
|
149
|
+
*
|
|
150
|
+
* @example To download the public key of an asymmetric KMS key
|
|
151
|
+
* ```javascript
|
|
152
|
+
* // This example gets the public key of an asymmetric RSA KMS key used for encryption and decryption. The operation returns the key spec, key usage, and encryption or signing algorithms to help you use the public key correctly outside of AWS KMS.
|
|
153
|
+
* const input = {
|
|
154
|
+
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321"
|
|
155
|
+
* };
|
|
156
|
+
* const command = new GetPublicKeyCommand(input);
|
|
157
|
+
* const response = await client.send(command);
|
|
158
|
+
* /* response ==
|
|
159
|
+
* {
|
|
160
|
+
* "CustomerMasterKeySpec": "RSA_4096",
|
|
161
|
+
* "EncryptionAlgorithms": [
|
|
162
|
+
* "RSAES_OAEP_SHA_1",
|
|
163
|
+
* "RSAES_OAEP_SHA_256"
|
|
164
|
+
* ],
|
|
165
|
+
* "KeyId": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
|
|
166
|
+
* "KeyUsage": "ENCRYPT_DECRYPT",
|
|
167
|
+
* "PublicKey": "<binary data>"
|
|
168
|
+
* }
|
|
169
|
+
* *\/
|
|
170
|
+
* // example id: to-download-the-public-key-of-an-asymmetric-kms-key-1628621691873
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
80
173
|
*/
|
|
81
174
|
export declare class GetPublicKeyCommand extends $Command<GetPublicKeyCommandInput, GetPublicKeyCommandOutput, KMSClientResolvedConfig> {
|
|
82
175
|
readonly input: GetPublicKeyCommandInput;
|
|
@@ -92,6 +92,79 @@ export interface ImportKeyMaterialCommandOutput extends ImportKeyMaterialRespons
|
|
|
92
92
|
* @see {@link ImportKeyMaterialCommandOutput} for command's `response` shape.
|
|
93
93
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
94
94
|
*
|
|
95
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
96
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
97
|
+
* request.</p>
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link ExpiredImportTokenException} (client fault)
|
|
100
|
+
* <p>The request was rejected because the specified import token is expired. Use <a>GetParametersForImport</a> to get a new import token and public key, use the new
|
|
101
|
+
* public key to encrypt the key material, and then try the request again.</p>
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link IncorrectKeyMaterialException} (client fault)
|
|
104
|
+
* <p>The request was rejected because the key material in the request is, expired, invalid, or
|
|
105
|
+
* is not the same key material that was previously imported into this KMS key.</p>
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
108
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
109
|
+
* valid.</p>
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link InvalidCiphertextException} (client fault)
|
|
112
|
+
* <p>From the <a>Decrypt</a> or <a>ReEncrypt</a> operation, the request
|
|
113
|
+
* was rejected because the specified ciphertext, or additional authenticated data incorporated
|
|
114
|
+
* into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise
|
|
115
|
+
* invalid.</p>
|
|
116
|
+
* <p>From the <a>ImportKeyMaterial</a> operation, the request was rejected because
|
|
117
|
+
* KMS could not decrypt the encrypted (wrapped) key material. </p>
|
|
118
|
+
*
|
|
119
|
+
* @throws {@link InvalidImportTokenException} (client fault)
|
|
120
|
+
* <p>The request was rejected because the provided import token is invalid or is associated
|
|
121
|
+
* with a different KMS key.</p>
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
124
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
125
|
+
* retried.</p>
|
|
126
|
+
*
|
|
127
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
128
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
129
|
+
* request.</p>
|
|
130
|
+
* <p>This exceptions means one of the following:</p>
|
|
131
|
+
* <ul>
|
|
132
|
+
* <li>
|
|
133
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
134
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
135
|
+
* information about which key states are compatible with each KMS operation, see
|
|
136
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
137
|
+
* <i>Key Management Service Developer Guide</i>
|
|
138
|
+
* </i>.</p>
|
|
139
|
+
* </li>
|
|
140
|
+
* <li>
|
|
141
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
142
|
+
* </li>
|
|
143
|
+
* </ul>
|
|
144
|
+
*
|
|
145
|
+
* @throws {@link NotFoundException} (client fault)
|
|
146
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
147
|
+
* found.</p>
|
|
148
|
+
*
|
|
149
|
+
* @throws {@link UnsupportedOperationException} (client fault)
|
|
150
|
+
* <p>The request was rejected because a specified parameter is not supported or a specified
|
|
151
|
+
* resource is not valid for this operation.</p>
|
|
152
|
+
*
|
|
153
|
+
*
|
|
154
|
+
* @example To import key material into a KMS key
|
|
155
|
+
* ```javascript
|
|
156
|
+
* // The following example imports key material into the specified KMS key.
|
|
157
|
+
* const input = {
|
|
158
|
+
* "EncryptedKeyMaterial": "<binary data>",
|
|
159
|
+
* "ExpirationModel": "KEY_MATERIAL_DOES_NOT_EXPIRE",
|
|
160
|
+
* "ImportToken": "<binary data>",
|
|
161
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
162
|
+
* };
|
|
163
|
+
* const command = new ImportKeyMaterialCommand(input);
|
|
164
|
+
* await client.send(command);
|
|
165
|
+
* // example id: to-import-key-material-into-a-cmk-1480630551969
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
95
168
|
*/
|
|
96
169
|
export declare class ImportKeyMaterialCommand extends $Command<ImportKeyMaterialCommandInput, ImportKeyMaterialCommandOutput, KMSClientResolvedConfig> {
|
|
97
170
|
readonly input: ImportKeyMaterialCommandInput;
|
|
@@ -69,6 +69,83 @@ export interface ListAliasesCommandOutput extends ListAliasesResponse, __Metadat
|
|
|
69
69
|
* @see {@link ListAliasesCommandOutput} for command's `response` shape.
|
|
70
70
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
71
71
|
*
|
|
72
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
73
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
74
|
+
* request.</p>
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
77
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
78
|
+
* valid.</p>
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link InvalidMarkerException} (client fault)
|
|
81
|
+
* <p>The request was rejected because the marker that specifies where pagination should next
|
|
82
|
+
* begin is not valid.</p>
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
85
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
86
|
+
* retried.</p>
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link NotFoundException} (client fault)
|
|
89
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
90
|
+
* found.</p>
|
|
91
|
+
*
|
|
92
|
+
*
|
|
93
|
+
* @example To list aliases
|
|
94
|
+
* ```javascript
|
|
95
|
+
* // The following example lists aliases.
|
|
96
|
+
* const input = undefined;
|
|
97
|
+
* const command = new ListAliasesCommand(input);
|
|
98
|
+
* const response = await client.send(command);
|
|
99
|
+
* /* response ==
|
|
100
|
+
* {
|
|
101
|
+
* "Aliases": [
|
|
102
|
+
* {
|
|
103
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/acm",
|
|
104
|
+
* "AliasName": "alias/aws/acm",
|
|
105
|
+
* "TargetKeyId": "da03f6f7-d279-427a-9cae-de48d07e5b66"
|
|
106
|
+
* },
|
|
107
|
+
* {
|
|
108
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/ebs",
|
|
109
|
+
* "AliasName": "alias/aws/ebs",
|
|
110
|
+
* "TargetKeyId": "25a217e7-7170-4b8c-8bf6-045ea5f70e5b"
|
|
111
|
+
* },
|
|
112
|
+
* {
|
|
113
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/rds",
|
|
114
|
+
* "AliasName": "alias/aws/rds",
|
|
115
|
+
* "TargetKeyId": "7ec3104e-c3f2-4b5c-bf42-bfc4772c6685"
|
|
116
|
+
* },
|
|
117
|
+
* {
|
|
118
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/redshift",
|
|
119
|
+
* "AliasName": "alias/aws/redshift",
|
|
120
|
+
* "TargetKeyId": "08f7a25a-69e2-4fb5-8f10-393db27326fa"
|
|
121
|
+
* },
|
|
122
|
+
* {
|
|
123
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/s3",
|
|
124
|
+
* "AliasName": "alias/aws/s3",
|
|
125
|
+
* "TargetKeyId": "d2b0f1a3-580d-4f79-b836-bc983be8cfa5"
|
|
126
|
+
* },
|
|
127
|
+
* {
|
|
128
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example1",
|
|
129
|
+
* "AliasName": "alias/example1",
|
|
130
|
+
* "TargetKeyId": "4da1e216-62d0-46c5-a7c0-5f3a3d2f8046"
|
|
131
|
+
* },
|
|
132
|
+
* {
|
|
133
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example2",
|
|
134
|
+
* "AliasName": "alias/example2",
|
|
135
|
+
* "TargetKeyId": "f32fef59-2cc2-445b-8573-2d73328acbee"
|
|
136
|
+
* },
|
|
137
|
+
* {
|
|
138
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example3",
|
|
139
|
+
* "AliasName": "alias/example3",
|
|
140
|
+
* "TargetKeyId": "1374ef38-d34e-4d5f-b2c9-4e0daee38855"
|
|
141
|
+
* }
|
|
142
|
+
* ],
|
|
143
|
+
* "Truncated": false
|
|
144
|
+
* }
|
|
145
|
+
* *\/
|
|
146
|
+
* // example id: to-list-aliases-1480729693349
|
|
147
|
+
* ```
|
|
148
|
+
*
|
|
72
149
|
*/
|
|
73
150
|
export declare class ListAliasesCommand extends $Command<ListAliasesCommandInput, ListAliasesCommandOutput, KMSClientResolvedConfig> {
|
|
74
151
|
readonly input: ListAliasesCommandInput;
|
|
@@ -73,6 +73,117 @@ export interface ListGrantsCommandOutput extends ListGrantsResponse, __MetadataB
|
|
|
73
73
|
* @see {@link ListGrantsCommandOutput} for command's `response` shape.
|
|
74
74
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
75
75
|
*
|
|
76
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
77
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
78
|
+
* request.</p>
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link InvalidArnException} (client fault)
|
|
81
|
+
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
|
|
82
|
+
* valid.</p>
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link InvalidGrantIdException} (client fault)
|
|
85
|
+
* <p>The request was rejected because the specified <code>GrantId</code> is not valid.</p>
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link InvalidMarkerException} (client fault)
|
|
88
|
+
* <p>The request was rejected because the marker that specifies where pagination should next
|
|
89
|
+
* begin is not valid.</p>
|
|
90
|
+
*
|
|
91
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
92
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
93
|
+
* retried.</p>
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
96
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
97
|
+
* request.</p>
|
|
98
|
+
* <p>This exceptions means one of the following:</p>
|
|
99
|
+
* <ul>
|
|
100
|
+
* <li>
|
|
101
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
102
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
103
|
+
* information about which key states are compatible with each KMS operation, see
|
|
104
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
105
|
+
* <i>Key Management Service Developer Guide</i>
|
|
106
|
+
* </i>.</p>
|
|
107
|
+
* </li>
|
|
108
|
+
* <li>
|
|
109
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p>
|
|
110
|
+
* </li>
|
|
111
|
+
* </ul>
|
|
112
|
+
*
|
|
113
|
+
* @throws {@link NotFoundException} (client fault)
|
|
114
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
115
|
+
* found.</p>
|
|
116
|
+
*
|
|
117
|
+
*
|
|
118
|
+
* @example To list grants for a KMS key
|
|
119
|
+
* ```javascript
|
|
120
|
+
* // The following example lists grants for the specified KMS key.
|
|
121
|
+
* const input = {
|
|
122
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
123
|
+
* };
|
|
124
|
+
* const command = new ListGrantsCommand(input);
|
|
125
|
+
* const response = await client.send(command);
|
|
126
|
+
* /* response ==
|
|
127
|
+
* {
|
|
128
|
+
* "Grants": [
|
|
129
|
+
* {
|
|
130
|
+
* "CreationDate": "2016-10-25T14:37:41-07:00",
|
|
131
|
+
* "GrantId": "91ad875e49b04a9d1f3bdeb84d821f9db6ea95e1098813f6d47f0c65fbe2a172",
|
|
132
|
+
* "GranteePrincipal": "acm.us-east-2.amazonaws.com",
|
|
133
|
+
* "IssuingAccount": "arn:aws:iam::111122223333:root",
|
|
134
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
135
|
+
* "Operations": [
|
|
136
|
+
* "Encrypt",
|
|
137
|
+
* "ReEncryptFrom",
|
|
138
|
+
* "ReEncryptTo"
|
|
139
|
+
* ],
|
|
140
|
+
* "RetiringPrincipal": "acm.us-east-2.amazonaws.com"
|
|
141
|
+
* },
|
|
142
|
+
* {
|
|
143
|
+
* "CreationDate": "2016-10-25T14:37:41-07:00",
|
|
144
|
+
* "GrantId": "a5d67d3e207a8fc1f4928749ee3e52eb0440493a8b9cf05bbfad91655b056200",
|
|
145
|
+
* "GranteePrincipal": "acm.us-east-2.amazonaws.com",
|
|
146
|
+
* "IssuingAccount": "arn:aws:iam::111122223333:root",
|
|
147
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
148
|
+
* "Operations": [
|
|
149
|
+
* "ReEncryptFrom",
|
|
150
|
+
* "ReEncryptTo"
|
|
151
|
+
* ],
|
|
152
|
+
* "RetiringPrincipal": "acm.us-east-2.amazonaws.com"
|
|
153
|
+
* },
|
|
154
|
+
* {
|
|
155
|
+
* "CreationDate": "2016-10-25T14:37:41-07:00",
|
|
156
|
+
* "GrantId": "c541aaf05d90cb78846a73b346fc43e65be28b7163129488c738e0c9e0628f4f",
|
|
157
|
+
* "GranteePrincipal": "acm.us-east-2.amazonaws.com",
|
|
158
|
+
* "IssuingAccount": "arn:aws:iam::111122223333:root",
|
|
159
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
160
|
+
* "Operations": [
|
|
161
|
+
* "Encrypt",
|
|
162
|
+
* "ReEncryptFrom",
|
|
163
|
+
* "ReEncryptTo"
|
|
164
|
+
* ],
|
|
165
|
+
* "RetiringPrincipal": "acm.us-east-2.amazonaws.com"
|
|
166
|
+
* },
|
|
167
|
+
* {
|
|
168
|
+
* "CreationDate": "2016-10-25T14:37:41-07:00",
|
|
169
|
+
* "GrantId": "dd2052c67b4c76ee45caf1dc6a1e2d24e8dc744a51b36ae2f067dc540ce0105c",
|
|
170
|
+
* "GranteePrincipal": "acm.us-east-2.amazonaws.com",
|
|
171
|
+
* "IssuingAccount": "arn:aws:iam::111122223333:root",
|
|
172
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
173
|
+
* "Operations": [
|
|
174
|
+
* "Encrypt",
|
|
175
|
+
* "ReEncryptFrom",
|
|
176
|
+
* "ReEncryptTo"
|
|
177
|
+
* ],
|
|
178
|
+
* "RetiringPrincipal": "acm.us-east-2.amazonaws.com"
|
|
179
|
+
* }
|
|
180
|
+
* ],
|
|
181
|
+
* "Truncated": true
|
|
182
|
+
* }
|
|
183
|
+
* *\/
|
|
184
|
+
* // example id: to-list-grants-for-a-cmk-1481067365389
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
76
187
|
*/
|
|
77
188
|
export declare class ListGrantsCommand extends $Command<ListGrantsCommandInput, ListGrantsCommandOutput, KMSClientResolvedConfig> {
|
|
78
189
|
readonly input: ListGrantsCommandInput;
|