File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
sdk/template/Azure.Template Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ The `GetSecret` method retrieves a secret from the service.
6868``` C# Snippet:Azure_Template_GetSecret
6969string endpoint = " https://myvault.vault.azure.net" ;
7070var credential = new DefaultAzureCredential ();
71- var client = new TemplateClient (endpoint , new DefaultAzureCredential () );
71+ var client = new TemplateClient (endpoint , credential );
7272
7373SecretBundle secret = client .GetSecretValue (" TestSecret" );
7474
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ You can also get secrets asynchronously:
1616``` C# Snippet:Azure_Template_GetSecretAsync
1717string endpoint = " https://myvault.vault.azure.net" ;
1818var credential = new DefaultAzureCredential ();
19- var client = new TemplateClient (endpoint , new DefaultAzureCredential () );
19+ var client = new TemplateClient (endpoint , credential );
2020
2121SecretBundle secret = await client .GetSecretValueAsync (" TestSecret" );
2222
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ You can create a client and get secrets synchronously:
1616``` C# Snippet:Azure_Template_GetSecret
1717string endpoint = " https://myvault.vault.azure.net" ;
1818var credential = new DefaultAzureCredential ();
19- var client = new TemplateClient (endpoint , new DefaultAzureCredential () );
19+ var client = new TemplateClient (endpoint , credential );
2020
2121SecretBundle secret = client .GetSecretValue (" TestSecret" );
2222
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public void GettingASecret()
2626 string endpoint = TestEnvironment . KeyVaultUri ;
2727 var credential = TestEnvironment . Credential ;
2828#endif
29- var client = new TemplateClient ( endpoint , new DefaultAzureCredential ( ) ) ;
29+ var client = new TemplateClient ( endpoint , credential ) ;
3030
3131 SecretBundle secret = client . GetSecretValue ( "TestSecret" ) ;
3232
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public async Task GettingASecretAsync()
2424 string endpoint = TestEnvironment . KeyVaultUri ;
2525 var credential = TestEnvironment . Credential ;
2626#endif
27- var client = new TemplateClient ( endpoint , new DefaultAzureCredential ( ) ) ;
27+ var client = new TemplateClient ( endpoint , credential ) ;
2828
2929 SecretBundle secret = await client . GetSecretValueAsync ( "TestSecret" ) ;
3030
You can’t perform that action at this time.
0 commit comments