- (Exam Topic 8)
You are preparing to deploy a Python website to an Azure Web App using a container. The solution will use multiple containers in the same container group. The Dockerfile that builds the container is as follows:
You build a container by using the following command. The Azure Container Registry instance named images is a private registry.
The user name and password for the registry is admin.
The Web App must always run the same version of the website regardless of future builds.
You need to create an Azure Web App to run the website.
How should you complete the commands? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Solution:
Box 1: --SKU B1 --hyper-v
--hyper-v
Host web app on Windows container.
Box 2: --deployment-source-url images.azurecr.io/website:v1.0.0
--deployment-source-url -u
Git repository URL to link with manual integration.
The Web App must always run the same version of the website regardless of future builds. Incorrect:
--deployment-container-image-name -i
Linux only. Container image name from Docker Hub, e.g. publisher/image-name:tag. Box 3: az webapp config container set -url https://images.azurecr.io -u admin -p admin az webapp config container set
Set a web app container's settings. Paremeter: --docker-registry-server-url -r The container registry server url.
The Azure Container Registry instance named images is a private registry. Example:
az webapp config container set --docker-registry-server-url https://{azure-container-registry-name}.azurecr.io Reference:
https://docs.microsoft.com/en-us/cli/azure/appservice/plan
Does this meet the goal?
Correct Answer:
A
- (Exam Topic 8)
You are developing an application. You have an Azure user account that has access to two subscriptions. You need to retrieve a storage account key secret from Azure Key Vault.
In which order should you arrange the PowerShell commands to develop the solution? To answer, move all commands from the list of commands to the answer area and arrange them in the correct order.
Solution:
Step 1: Get-AzSubscription
If you have multiple subscriptions, you might have to specify the one that was used to create your key vault. Enter the following to see the subscriptions for your account:
Get-AzSubscription
Step 2: Set-AzContext -SubscriptionId
To specify the subscription that's associated with the key vault you'll be logging, enter: Set-AzContext -SubscriptionId
Step 3: Get-AzStorageAccountKey You must get that storage account key.
Step 4: $secretvalue = ConvertTo-SecureString
Set-AzKeyVaultSecret -VaultName
string, and then create a secret with that value in your key vault.
Step 5: Get-AzKeyVaultSecret
Next, get the URI for the secret you created. You'll need this URI in a later step to call the key vault and retrieve your secret. Run the following PowerShell command and make note of the ID value, which is the secret's URI:
Get-AzKeyVaultSecret –VaultName
https://docs.microsoft.com/bs-latn-ba/Azure/key-vault/key-vault-key-rotation-log-monitoring
Does this meet the goal?
Correct Answer:
A
- (Exam Topic 8)
HOTSPOT
You develop a news and blog content app for Windows devices.
A notification must arrive on a user’s device when there is a new article available for them to view. You need to implement push notifications.
How should you complete the code segment? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Solution:
Box 1: NotificationHubClient
Box 2: NotificationHubClient
Box 3: CreateClientFromConnectionString
// Initialize the Notification Hub
NotificationHubClient hub = NotificationHubClient.CreateClientFromConnectionString(listenConnString, hubName);
Box 4: SendWindowsNativeNotificationAsync Send the push notification.
var result = await hub.SendWindowsNativeNotificationAsync(windowsToastPayload); Reference:
https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-registration-manag https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/app-service-mobile/app-service-mobile-windo
Does this meet the goal?
Correct Answer:
A
- (Exam Topic 6)
You need to retrieve all order line items from Order.json and sort the data alphabetically by the city. How should you complete the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.
Solution:
Graphical user interface Description automatically generated
Box 1: orders o
Scenario: Order data is stored as nonrelational JSON and must be queried using SQL. Box 2:li
Box 3: o.line_items
Box 4: o.city
The city field is in Order, not in the 2s.
Does this meet the goal?
Correct Answer:
A
- (Exam Topic 8)
You are a developer for a SaaS company that offers many web services. All web services for the company must meet the following requirements: Use API Management to access the services
Use OpenID Connect for authentication
Prevent anonymous usage
A recent security audit found that several web services can be called without any authentication. Which API Management policy should you implement?
Correct Answer:
D
Add the validate-jwt policy to validate the OAuth token for every incoming request. Reference:
https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-protect-backend-with-aad