File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
clients/client-kms/src/commands Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,27 @@ export interface DeriveSharedSecretCommandOutput extends DeriveSharedSecretRespo
244244 * // example id: to-derive-a-shared-secret-1716220614829
245245 * ```
246246 *
247+ * @example To derive a shared secret
248+ * ```javascript
249+ * // The following example derives a shared secret using a key agreement algorithm.
250+ * const input = {
251+ * "KeyAgreementAlgorithm": "ECDH",
252+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
253+ * "PublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvH3Yj0wbkLEpUl95Cv1cJVjsVNSjwGq3tCLnzXfhVwVvmzGN8pYj3U8nKwgouaHbBWNJYjP5VutbbkKS4Kv4GojwZBJyHN17kmxo8yTjRmjR15SKIQ8cqRA2uaERMLnpztIXdZp232PQPbWGxDyXYJ0aJ5EFSag"
254+ * };
255+ * const command = new DeriveSharedSecretCommand(input);
256+ * const response = await client.send(command);
257+ * /* response ==
258+ * {
259+ * "KeyAgreementAlgorithm": "ECDH",
260+ * "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
261+ * "KeyOrigin": "AWS_KMS",
262+ * "SharedSecret": "MEYCIQCKZLWyTk5runarx6XiAkU9gv3lbwPO/pHa+DXFehzdDwIhANwpsIV2g/9SPWLLsF6p/hiSskuIXMTRwqrMdVKWTMHG"
263+ * }
264+ * *\/
265+ * // example id: to-derive-a-shared-secret-1718381818754
266+ * ```
267+ *
247268 */
248269export class DeriveSharedSecretCommand extends $Command
249270 . classBuilder <
You can’t perform that action at this time.
0 commit comments