Complete the code to create a Key Vault resource in Azure.
az keyvault create --name [1] --resource-group MyResourceGroup --location eastusThe az keyvault create command requires a valid Key Vault name. 'MyKeyVault' is a proper name for the vault.
Complete the code to add a secret named 'DbPassword' with value 'P@ssw0rd!' to the Key Vault.
az keyvault secret set --vault-name MyKeyVault --name DbPassword --value [1]The secret value should be the actual password you want to store securely. 'P@ssw0rd!' is the correct secret value here.
Fix the error in the command to retrieve the secret value from the Key Vault.
az keyvault secret [1] --vault-name MyKeyVault --name DbPasswordThe show command retrieves the value of a secret. 'list' shows all secrets, 'delete' removes a secret, and 'set' adds or updates a secret.
Fill both blanks to assign access policy to a user with secret permissions.
az keyvault set-policy --name MyKeyVault --upn [1] --secret-permissions [2]
The --upn option requires the user's email. The --secret-permissions option should include 'get' to allow reading secrets.
Fill all three blanks to create a secret, retrieve it, and delete it from the Key Vault.
az keyvault secret [1] --vault-name MyKeyVault --name ApiKey --value [2] az keyvault secret [3] --vault-name MyKeyVault --name ApiKey
First, use 'set' to create the secret with value '12345-abcde'. Then use 'show' to retrieve it. 'list' would show all secrets but not the specific one.