From 1535c63eabbb54dc04406ddd18a408712401f4d5 Mon Sep 17 00:00:00 2001 From: Dina Berry <41597107+diberry@users.noreply.github.com> Date: Thu, 3 Feb 2022 14:21:57 -0800 Subject: [PATCH] Key Vault secret - add comment to sample (#20200) --- sdk/keyvault/keyvault-secrets/samples-dev/helloWorld.ts | 3 +++ .../keyvault-secrets/samples/v4/javascript/helloWorld.js | 3 +++ .../keyvault-secrets/samples/v4/typescript/src/helloWorld.ts | 3 +++ 3 files changed, 9 insertions(+) diff --git a/sdk/keyvault/keyvault-secrets/samples-dev/helloWorld.ts b/sdk/keyvault/keyvault-secrets/samples-dev/helloWorld.ts index a9555dcbfc62..aad019a08768 100644 --- a/sdk/keyvault/keyvault-secrets/samples-dev/helloWorld.ts +++ b/sdk/keyvault/keyvault-secrets/samples-dev/helloWorld.ts @@ -24,6 +24,9 @@ export async function main(): Promise { const client = new SecretClient(url, credential); // Create a secret + // The secret can be a string of any kind. For example, + // a multiline text block such as an RSA private key with newline characters, + // or a stringified JSON object, like `JSON.stringify({ mySecret: 'MySecretValue'})`. const uniqueString = new Date().getTime(); const secretName = `secret${uniqueString}`; const result = await client.setSecret(secretName, "MySecretValue"); diff --git a/sdk/keyvault/keyvault-secrets/samples/v4/javascript/helloWorld.js b/sdk/keyvault/keyvault-secrets/samples/v4/javascript/helloWorld.js index 7ca65136f295..c23e6741ed0b 100644 --- a/sdk/keyvault/keyvault-secrets/samples/v4/javascript/helloWorld.js +++ b/sdk/keyvault/keyvault-secrets/samples/v4/javascript/helloWorld.js @@ -24,6 +24,9 @@ async function main() { const client = new SecretClient(url, credential); // Create a secret + // The secret can be a string of any kind. For example, + // a multiline text block such as an RSA private key with newline characters, + // or a stringified JSON object, like `JSON.stringify({ mySecret: 'MySecretValue'})`. const uniqueString = new Date().getTime(); const secretName = `secret${uniqueString}`; const result = await client.setSecret(secretName, "MySecretValue"); diff --git a/sdk/keyvault/keyvault-secrets/samples/v4/typescript/src/helloWorld.ts b/sdk/keyvault/keyvault-secrets/samples/v4/typescript/src/helloWorld.ts index 5fa6098af2d8..0cb0b59fcd22 100644 --- a/sdk/keyvault/keyvault-secrets/samples/v4/typescript/src/helloWorld.ts +++ b/sdk/keyvault/keyvault-secrets/samples/v4/typescript/src/helloWorld.ts @@ -24,6 +24,9 @@ export async function main(): Promise { const client = new SecretClient(url, credential); // Create a secret + // The secret can be a string of any kind. For example, + // a multiline text block such as an RSA private key with newline characters, + // or a stringified JSON object, like `JSON.stringify({ mySecret: 'MySecretValue'})`. const uniqueString = new Date().getTime(); const secretName = `secret${uniqueString}`; const result = await client.setSecret(secretName, "MySecretValue");