Skip to content

Commit 861d056

Browse files
author
awstools
committed
feat(clients): update command documentation examples as of 2024-06-18
1 parent 141cb0b commit 861d056

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Diff for: clients/client-kms/src/commands/DeriveSharedSecretCommand.ts

+21
Original file line numberDiff line numberDiff 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
*/
248269
export class DeriveSharedSecretCommand extends $Command
249270
.classBuilder<

0 commit comments

Comments
 (0)