Skip to content

Commit 1535c63

Browse files
authored
Key Vault secret - add comment to sample (Azure#20200)
1 parent 1a8a7c4 commit 1535c63

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

sdk/keyvault/keyvault-secrets/samples-dev/helloWorld.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export async function main(): Promise<void> {
2424
const client = new SecretClient(url, credential);
2525

2626
// Create a secret
27+
// The secret can be a string of any kind. For example,
28+
// a multiline text block such as an RSA private key with newline characters,
29+
// or a stringified JSON object, like `JSON.stringify({ mySecret: 'MySecretValue'})`.
2730
const uniqueString = new Date().getTime();
2831
const secretName = `secret${uniqueString}`;
2932
const result = await client.setSecret(secretName, "MySecretValue");

sdk/keyvault/keyvault-secrets/samples/v4/javascript/helloWorld.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ async function main() {
2424
const client = new SecretClient(url, credential);
2525

2626
// Create a secret
27+
// The secret can be a string of any kind. For example,
28+
// a multiline text block such as an RSA private key with newline characters,
29+
// or a stringified JSON object, like `JSON.stringify({ mySecret: 'MySecretValue'})`.
2730
const uniqueString = new Date().getTime();
2831
const secretName = `secret${uniqueString}`;
2932
const result = await client.setSecret(secretName, "MySecretValue");

sdk/keyvault/keyvault-secrets/samples/v4/typescript/src/helloWorld.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export async function main(): Promise<void> {
2424
const client = new SecretClient(url, credential);
2525

2626
// Create a secret
27+
// The secret can be a string of any kind. For example,
28+
// a multiline text block such as an RSA private key with newline characters,
29+
// or a stringified JSON object, like `JSON.stringify({ mySecret: 'MySecretValue'})`.
2730
const uniqueString = new Date().getTime();
2831
const secretName = `secret${uniqueString}`;
2932
const result = await client.setSecret(secretName, "MySecretValue");

0 commit comments

Comments
 (0)