Home » Microsoft » AZ-204 v.2 » How should you complete the code segment? To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
DRAG DROP
You are developing an Azure solution.
You need to develop code to access a secret stored in Azure Key Vault.
How should you complete the code segment? To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:
Correct Answer:
Explanation/Reference:
Explanation:
Box 1: SecretClient
Box 2: DefaultAzureCredential
In below example, the name of your key vault is expanded to the key vault URI, in the format “https://.vault.azure.net”. This example is using ‘DefaultAzureCredential()’ class from Azure Identity Library, which allowsto use the same code across different environments with different options to provide identity.string keyVaultName = Environment.GetEnvironmentVariable(“KEY_VAULT_NAME”);var kvUri = “https://” + keyVaultName + “.vault.azure.net”;var client = new SecretClient(new Uri(kvUri), new DefaultAzureCredential());Reference:
https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-net
Microsoft AZ-204: Developing Solutions for Microsoft Azure
Free dumps for AZ-204 in PDF format also you can read online.
High quality AZ-204 PDF and software. VALID exam to help you pass.
|
|