Skip to content

Commit

Permalink
feat(clients): update command documentation examples as of 2024-06-18
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Jun 18, 2024
1 parent 141cb0b commit 861d056
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions clients/client-kms/src/commands/DeriveSharedSecretCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,27 @@ export interface DeriveSharedSecretCommandOutput extends DeriveSharedSecretRespo
* // example id: to-derive-a-shared-secret-1716220614829
* ```
*
* @example To derive a shared secret
* ```javascript
* // The following example derives a shared secret using a key agreement algorithm.
* const input = {
* "KeyAgreementAlgorithm": "ECDH",
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
* "PublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvH3Yj0wbkLEpUl95Cv1cJVjsVNSjwGq3tCLnzXfhVwVvmzGN8pYj3U8nKwgouaHbBWNJYjP5VutbbkKS4Kv4GojwZBJyHN17kmxo8yTjRmjR15SKIQ8cqRA2uaERMLnpztIXdZp232PQPbWGxDyXYJ0aJ5EFSag"
* };
* const command = new DeriveSharedSecretCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "KeyAgreementAlgorithm": "ECDH",
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
* "KeyOrigin": "AWS_KMS",
* "SharedSecret": "MEYCIQCKZLWyTk5runarx6XiAkU9gv3lbwPO/pHa+DXFehzdDwIhANwpsIV2g/9SPWLLsF6p/hiSskuIXMTRwqrMdVKWTMHG"
* }
* *\/
* // example id: to-derive-a-shared-secret-1718381818754
* ```
*
*/
export class DeriveSharedSecretCommand extends $Command
.classBuilder<
Expand Down

0 comments on commit 861d056

Please sign in to comment.