@aws-sdk/client-kms 3.288.0 → 3.289.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 +16 -0
  2. package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +11 -0
  3. package/dist-types/commands/CreateAliasCommand.d.ts +12 -0
  4. package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +68 -0
  5. package/dist-types/commands/CreateGrantCommand.d.ts +22 -0
  6. package/dist-types/commands/CreateKeyCommand.d.ts +283 -0
  7. package/dist-types/commands/DecryptCommand.d.ts +18 -0
  8. package/dist-types/commands/DeleteAliasCommand.d.ts +11 -0
  9. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +11 -0
  10. package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +11 -0
  11. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +101 -0
  12. package/dist-types/commands/DescribeKeyCommand.d.ts +228 -0
  13. package/dist-types/commands/DisableKeyCommand.d.ts +11 -0
  14. package/dist-types/commands/DisableKeyRotationCommand.d.ts +11 -0
  15. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +11 -0
  16. package/dist-types/commands/EnableKeyCommand.d.ts +11 -0
  17. package/dist-types/commands/EnableKeyRotationCommand.d.ts +11 -0
  18. package/dist-types/commands/EncryptCommand.d.ts +18 -0
  19. package/dist-types/commands/GenerateDataKeyCommand.d.ts +19 -0
  20. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +21 -0
  21. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +20 -0
  22. package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +18 -0
  23. package/dist-types/commands/GenerateMacCommand.d.ts +20 -0
  24. package/dist-types/commands/GenerateRandomCommand.d.ts +16 -0
  25. package/dist-types/commands/GetKeyPolicyCommand.d.ts +17 -0
  26. package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +16 -0
  27. package/dist-types/commands/GetParametersForImportCommand.d.ts +21 -0
  28. package/dist-types/commands/GetPublicKeyCommand.d.ts +23 -0
  29. package/dist-types/commands/ImportKeyMaterialCommand.d.ts +14 -0
  30. package/dist-types/commands/ListAliasesCommand.d.ts +56 -0
  31. package/dist-types/commands/ListGrantsCommand.d.ts +69 -0
  32. package/dist-types/commands/ListKeyPoliciesCommand.d.ts +19 -0
  33. package/dist-types/commands/ListKeysCommand.d.ts +44 -0
  34. package/dist-types/commands/ListResourceTagsCommand.d.ts +30 -0
  35. package/dist-types/commands/ListRetirableGrantsCommand.d.ts +30 -0
  36. package/dist-types/commands/PutKeyPolicyCommand.d.ts +13 -0
  37. package/dist-types/commands/ReEncryptCommand.d.ts +19 -0
  38. package/dist-types/commands/ReplicateKeyCommand.d.ts +48 -0
  39. package/dist-types/commands/RetireGrantCommand.d.ts +12 -0
  40. package/dist-types/commands/RevokeGrantCommand.d.ts +12 -0
  41. package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +18 -0
  42. package/dist-types/commands/SignCommand.d.ts +42 -0
  43. package/dist-types/commands/TagResourceCommand.d.ts +17 -0
  44. package/dist-types/commands/UntagResourceCommand.d.ts +15 -0
  45. package/dist-types/commands/UpdateAliasCommand.d.ts +12 -0
  46. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +77 -0
  47. package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +12 -0
  48. package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +16 -0
  49. package/dist-types/commands/VerifyCommand.d.ts +44 -0
  50. package/dist-types/commands/VerifyMacCommand.d.ts +21 -0
  51. package/package.json +29 -29
@@ -121,6 +121,83 @@ 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
+ * @example To edit the friendly name of a custom key store
125
+ * ```javascript
126
+ * // 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.
127
+ * const input = {
128
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
129
+ * "NewCustomKeyStoreName": "DevelopmentKeys"
130
+ * };
131
+ * const command = new UpdateCustomKeyStoreCommand(input);
132
+ * await client.send(command);
133
+ * // example id: to-edit-the-friendly-name-of-a-custom-key-store-1
134
+ * ```
135
+ *
136
+ * @example To edit the password of an AWS CloudHSM key store
137
+ * ```javascript
138
+ * // 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.
139
+ * const input = {
140
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
141
+ * "KeyStorePassword": "ExamplePassword"
142
+ * };
143
+ * const command = new UpdateCustomKeyStoreCommand(input);
144
+ * await client.send(command);
145
+ * // example id: to-edit-the-properties-of-an-aws-cloudhsm-key-store-2
146
+ * ```
147
+ *
148
+ * @example To associate the custom key store with a different, but related, AWS CloudHSM cluster.
149
+ * ```javascript
150
+ * // 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.
151
+ * const input = {
152
+ * "CloudHsmClusterId": "cluster-1a23b4cdefg",
153
+ * "CustomKeyStoreId": "cks-1234567890abcdef0"
154
+ * };
155
+ * const command = new UpdateCustomKeyStoreCommand(input);
156
+ * await client.send(command);
157
+ * // example id: to-associate-the-custom-key-store-with-a-different-but-related-aws-cloudhsm-cluster-3
158
+ * ```
159
+ *
160
+ * @example To update the proxy authentication credential of an external key store
161
+ * ```javascript
162
+ * // 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.
163
+ * const input = {
164
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
165
+ * "XksProxyAuthenticationCredential": {
166
+ * "AccessKeyId": "ABCDE12345670EXAMPLE",
167
+ * "RawSecretAccessKey": "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo="
168
+ * }
169
+ * };
170
+ * const command = new UpdateCustomKeyStoreCommand(input);
171
+ * await client.send(command);
172
+ * // example id: to-update-the-proxy-authentication-credential-of-an-external-key-store-4
173
+ * ```
174
+ *
175
+ * @example To edit the proxy URI path of an external key store.
176
+ * ```javascript
177
+ * // This example updates the proxy URI path for an external key store
178
+ * const input = {
179
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
180
+ * "XksProxyUriPath": "/new-path/kms/xks/v1"
181
+ * };
182
+ * const command = new UpdateCustomKeyStoreCommand(input);
183
+ * await client.send(command);
184
+ * // example id: to-update-the-xks-proxy-api-path-of-an-external-key-store-5
185
+ * ```
186
+ *
187
+ * @example To update the proxy connectivity of an external key store to VPC_ENDPOINT_SERVICE
188
+ * ```javascript
189
+ * // 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.
190
+ * const input = {
191
+ * "CustomKeyStoreId": "cks-1234567890abcdef0",
192
+ * "XksProxyConnectivity": "VPC_ENDPOINT_SERVICE",
193
+ * "XksProxyUriEndpoint": "https://myproxy-private.xks.example.com",
194
+ * "XksProxyVpcEndpointServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-example"
195
+ * };
196
+ * const command = new UpdateCustomKeyStoreCommand(input);
197
+ * await client.send(command);
198
+ * // example id: to-update-the-proxy-connectivity-of-an-external-key-store-to-vpc_endpoint_service-6
199
+ * ```
200
+ *
124
201
  */
125
202
  export declare class UpdateCustomKeyStoreCommand extends $Command<UpdateCustomKeyStoreCommandInput, UpdateCustomKeyStoreCommandOutput, KMSClientResolvedConfig> {
126
203
  readonly input: UpdateCustomKeyStoreCommandInput;
@@ -50,6 +50,18 @@ 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
+ * @example To update the description of a KMS key
54
+ * ```javascript
55
+ * // The following example updates the description of the specified KMS key.
56
+ * const input = {
57
+ * "Description": "Example description that indicates the intended use of this KMS key.",
58
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
59
+ * };
60
+ * const command = new UpdateKeyDescriptionCommand(input);
61
+ * await client.send(command);
62
+ * // example id: to-update-the-description-of-a-cmk-1481574808619
63
+ * ```
64
+ *
53
65
  */
54
66
  export declare class UpdateKeyDescriptionCommand extends $Command<UpdateKeyDescriptionCommandInput, UpdateKeyDescriptionCommandOutput, KMSClientResolvedConfig> {
55
67
  readonly input: UpdateKeyDescriptionCommandInput;
@@ -93,6 +93,22 @@ export interface UpdatePrimaryRegionCommandOutput extends __MetadataBearer {
93
93
  * @see {@link UpdatePrimaryRegionCommandOutput} for command's `response` shape.
94
94
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
95
95
  *
96
+ * @example To update the primary Region of a multi-Region KMS key
97
+ * ```javascript
98
+ * // The following UpdatePrimaryRegion example changes the multi-Region replica key in the eu-central-1 Region to the primary key. The current primary key in the us-west-1 Region becomes a replica key.
99
+ * //
100
+ * // The KeyId parameter identifies the current primary key in the us-west-1 Region. The PrimaryRegion parameter indicates the Region of the replica key that will become the new primary key.
101
+ * //
102
+ * // This operation does not return any output. To verify that primary key is changed, use the DescribeKey operation.
103
+ * const input = {
104
+ * "KeyId": "arn:aws:kms:us-west-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
105
+ * "PrimaryRegion": "eu-central-1"
106
+ * };
107
+ * const command = new UpdatePrimaryRegionCommand(input);
108
+ * await client.send(command);
109
+ * // example id: to-update-the-primary-region-of-a-multi-region-kms-key-1660249555577
110
+ * ```
111
+ *
96
112
  */
97
113
  export declare class UpdatePrimaryRegionCommand extends $Command<UpdatePrimaryRegionCommandInput, UpdatePrimaryRegionCommandOutput, KMSClientResolvedConfig> {
98
114
  readonly input: UpdatePrimaryRegionCommandInput;
@@ -64,6 +64,50 @@ export interface VerifyCommandOutput extends VerifyResponse, __MetadataBearer {
64
64
  * @see {@link VerifyCommandOutput} for command's `response` shape.
65
65
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
66
66
  *
67
+ * @example To use an asymmetric KMS key to verify a digital signature
68
+ * ```javascript
69
+ * // This operation uses the public key in an elliptic curve (ECC) asymmetric key to verify a digital signature within AWS KMS.
70
+ * const input = {
71
+ * "KeyId": "alias/ECC_signing_key",
72
+ * "Message": "<message to be verified>",
73
+ * "MessageType": "RAW",
74
+ * "Signature": "<binary data>",
75
+ * "SigningAlgorithm": "ECDSA_SHA_384"
76
+ * };
77
+ * const command = new VerifyCommand(input);
78
+ * const response = await client.send(command);
79
+ * /* response ==
80
+ * {
81
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
82
+ * "SignatureValid": true,
83
+ * "SigningAlgorithm": "ECDSA_SHA_384"
84
+ * }
85
+ * *\/
86
+ * // example id: to-use-an-asymmetric-kms-key-to-verify-a-digital-signature-1
87
+ * ```
88
+ *
89
+ * @example To use an asymmetric KMS key to verify a digital signature on a message digest
90
+ * ```javascript
91
+ * // This operation uses the public key in an RSA asymmetric signing key pair to verify the digital signature of a message digest. Hashing a message into a digest before sending it to KMS lets you verify messages that exceed the 4096-byte message size limit. To indicate that the value of Message is a digest, use the MessageType parameter
92
+ * const input = {
93
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
94
+ * "Message": "<message digest to be verified>",
95
+ * "MessageType": "DIGEST",
96
+ * "Signature": "<binary data>",
97
+ * "SigningAlgorithm": "RSASSA_PSS_SHA_512"
98
+ * };
99
+ * const command = new VerifyCommand(input);
100
+ * const response = await client.send(command);
101
+ * /* response ==
102
+ * {
103
+ * "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
104
+ * "SignatureValid": true,
105
+ * "SigningAlgorithm": "RSASSA_PSS_SHA_512"
106
+ * }
107
+ * *\/
108
+ * // example id: to-use-an-asymmetric-kms-key-to-verify-a-digital-signature-on-a-message-digest-2
109
+ * ```
110
+ *
67
111
  */
68
112
  export declare class VerifyCommand extends $Command<VerifyCommandInput, VerifyCommandOutput, KMSClientResolvedConfig> {
69
113
  readonly input: VerifyCommandInput;
@@ -49,6 +49,27 @@ export interface VerifyMacCommandOutput extends VerifyMacResponse, __MetadataBea
49
49
  * @see {@link VerifyMacCommandOutput} for command's `response` shape.
50
50
  * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
51
51
  *
52
+ * @example To verify an HMAC
53
+ * ```javascript
54
+ * // This example verifies an HMAC for a particular message, HMAC KMS keys, and MAC algorithm. A value of 'true' in the MacValid value in the response indicates that the HMAC is valid.
55
+ * const input = {
56
+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
57
+ * "Mac": "<HMAC_TAG>",
58
+ * "MacAlgorithm": "HMAC_SHA_384",
59
+ * "Message": "Hello World"
60
+ * };
61
+ * const command = new VerifyMacCommand(input);
62
+ * const response = await client.send(command);
63
+ * /* response ==
64
+ * {
65
+ * "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
66
+ * "MacAlgorithm": "HMAC_SHA_384",
67
+ * "MacValid": true
68
+ * }
69
+ * *\/
70
+ * // example id: to-verify-an-hmac-1631570863401
71
+ * ```
72
+ *
52
73
  */
53
74
  export declare class VerifyMacCommand extends $Command<VerifyMacCommandInput, VerifyMacCommandOutput, KMSClientResolvedConfig> {
54
75
  readonly input: VerifyMacCommandInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-kms",
3
3
  "description": "AWS SDK for JavaScript Kms Client for Node.js, Browser and React Native",
4
- "version": "3.288.0",
4
+ "version": "3.289.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,37 +20,37 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.288.0",
24
- "@aws-sdk/config-resolver": "3.287.0",
25
- "@aws-sdk/credential-provider-node": "3.288.0",
26
- "@aws-sdk/fetch-http-handler": "3.282.0",
27
- "@aws-sdk/hash-node": "3.272.0",
28
- "@aws-sdk/invalid-dependency": "3.272.0",
29
- "@aws-sdk/middleware-content-length": "3.282.0",
30
- "@aws-sdk/middleware-endpoint": "3.282.0",
31
- "@aws-sdk/middleware-host-header": "3.282.0",
32
- "@aws-sdk/middleware-logger": "3.288.0",
33
- "@aws-sdk/middleware-recursion-detection": "3.282.0",
34
- "@aws-sdk/middleware-retry": "3.287.0",
35
- "@aws-sdk/middleware-serde": "3.272.0",
36
- "@aws-sdk/middleware-signing": "3.282.0",
37
- "@aws-sdk/middleware-stack": "3.272.0",
38
- "@aws-sdk/middleware-user-agent": "3.282.0",
39
- "@aws-sdk/node-config-provider": "3.287.0",
40
- "@aws-sdk/node-http-handler": "3.282.0",
41
- "@aws-sdk/protocol-http": "3.282.0",
42
- "@aws-sdk/smithy-client": "3.279.0",
43
- "@aws-sdk/types": "3.272.0",
44
- "@aws-sdk/url-parser": "3.272.0",
23
+ "@aws-sdk/client-sts": "3.289.0",
24
+ "@aws-sdk/config-resolver": "3.289.0",
25
+ "@aws-sdk/credential-provider-node": "3.289.0",
26
+ "@aws-sdk/fetch-http-handler": "3.289.0",
27
+ "@aws-sdk/hash-node": "3.289.0",
28
+ "@aws-sdk/invalid-dependency": "3.289.0",
29
+ "@aws-sdk/middleware-content-length": "3.289.0",
30
+ "@aws-sdk/middleware-endpoint": "3.289.0",
31
+ "@aws-sdk/middleware-host-header": "3.289.0",
32
+ "@aws-sdk/middleware-logger": "3.289.0",
33
+ "@aws-sdk/middleware-recursion-detection": "3.289.0",
34
+ "@aws-sdk/middleware-retry": "3.289.0",
35
+ "@aws-sdk/middleware-serde": "3.289.0",
36
+ "@aws-sdk/middleware-signing": "3.289.0",
37
+ "@aws-sdk/middleware-stack": "3.289.0",
38
+ "@aws-sdk/middleware-user-agent": "3.289.0",
39
+ "@aws-sdk/node-config-provider": "3.289.0",
40
+ "@aws-sdk/node-http-handler": "3.289.0",
41
+ "@aws-sdk/protocol-http": "3.289.0",
42
+ "@aws-sdk/smithy-client": "3.289.0",
43
+ "@aws-sdk/types": "3.289.0",
44
+ "@aws-sdk/url-parser": "3.289.0",
45
45
  "@aws-sdk/util-base64": "3.208.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
47
  "@aws-sdk/util-body-length-node": "3.208.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.279.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.287.0",
50
- "@aws-sdk/util-endpoints": "3.272.0",
51
- "@aws-sdk/util-retry": "3.272.0",
52
- "@aws-sdk/util-user-agent-browser": "3.282.0",
53
- "@aws-sdk/util-user-agent-node": "3.287.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.289.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.289.0",
50
+ "@aws-sdk/util-endpoints": "3.289.0",
51
+ "@aws-sdk/util-retry": "3.289.0",
52
+ "@aws-sdk/util-user-agent-browser": "3.289.0",
53
+ "@aws-sdk/util-user-agent-node": "3.289.0",
54
54
  "@aws-sdk/util-utf8": "3.254.0",
55
55
  "tslib": "^2.3.1"
56
56
  },