ExamGecko
Home Home / Microsoft / AZ-204

Microsoft AZ-204 Practice Test - Questions Answers, Page 7

Question list
Search
Search

List of questions

Search

Related questions











You need to deploy the CheckUserContent Azure Function. The solution must meet the security and cost requirements.

Which hosting model should you use?

A.
Premium plan
A.
Premium plan
Answers
B.
App Service plan
B.
App Service plan
Answers
C.
Consumption plan
C.
Consumption plan
Answers
Suggested answer: B

Explanation:

Scenario:

You must minimize costs for all Azure services.

All Internal services must only be accessible from internal Virtual Networks (VNets).

Best for long-running scenarios where Durable Functions can't be used. Consider an App Service plan in the following situations:

You have existing, underutilized VMs that are already running other App Service instances.

You want to provide a custom image on which to run your functions.

Predictive scaling and costs are required.

Note: When you create a function app in Azure, you must choose a hosting plan for your app. There are three basic hosting plans available for Azure Functions: Consumption plan, Premium plan, and Dedicated (App Service) plan.

Incorrect Answers:

A: A Premium plan would be more costly.

C: Need the VNET functionality.

Reference:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale

HOTSPOT

You need to configure Azure Cosmos DB.

Which settings should you use? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.


Question 62
Correct answer: Question 62

Explanation:

Box 1: Strong

When the consistency level is set to strong, the staleness window is equivalent to zero, and the clients are guaranteed to read the latest committed value of the write operation.

Scenario: Changes to the Order data must reflect immediately across all partitions. All reads to the Order data must fetch the most recent writes.

Note: You can choose from five well-defined models on the consistency spectrum. From strongest to weakest, the models are: Strong, Bounded staleness, Session, Consistent prefix, Eventual

Box 2: SQL

Scenario: You identify the following requirements for data management and manipulation:

Order data is stored as nonrelational JSON and must be queried using Structured Query Language (SQL).

HOTSPOT

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.


Question 63
Correct answer: Question 63

Explanation:

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.

HOTSPOT

You need to add code at line PC26 of Processing.cs to ensure that security policies are met.

How should you complete the code that you will add at line PC26? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.


Question 64
Correct answer: Question 64

Explanation:

Box 1: var key = await Resolver.ResolveKeyAsyn(keyBundle,KeyIdentifier.CancellationToken.None);

Box 2: var x = new BlobEncryptionPolicy(key,resolver);

Example:

// We begin with cloudKey1, and a resolver capable of resolving and caching Key Vault secrets.

BlobEncryptionPolicy encryptionPolicy = new BlobEncryptionPolicy(cloudKey1, cachingResolver); client.DefaultRequestOptions.EncryptionPolicy = encryptionPolicy;

Box 3: cloudblobClient. DefaultRequestOptions.EncryptionPolicy = x;

Reference:

https://github.com/Azure/azure-storage-net/blob/master/Samples/GettingStarted/EncryptionSamples/KeyRotation/Program.cs

You need to ensure the security policies are met.

What code do you add at line CS07 of ConfigureSSE.ps1?

A.
-PermissionsToKeys create, encrypt, decrypt
A.
-PermissionsToKeys create, encrypt, decrypt
Answers
B.
-PermissionsToCertificates create, encrypt, decrypt
B.
-PermissionsToCertificates create, encrypt, decrypt
Answers
C.
-PermissionsToCertificates wrapkey, unwrapkey, get
C.
-PermissionsToCertificates wrapkey, unwrapkey, get
Answers
D.
-PermissionsToKeys wrapkey, unwrapkey, get
D.
-PermissionsToKeys wrapkey, unwrapkey, get
Answers
Suggested answer: B

Explanation:

Scenario: All certificates and secrets used to secure data must be stored in Azure Key Vault.

You must adhere to the principle of least privilege and provide privileges which are essential to perform the intended function.

The Set-AzureRmKeyValutAccessPolicy parameter -PermissionsToKeys specifies an array of key operation permissions to grant to a user or service principal. The acceptable values for this parameter: decrypt, encrypt, unwrapKey, wrapKey, verify, sign, get, list, update, create, import, delete, backup, restore, recover, purge

Incorrect Answers:

A, C: The Set-AzureRmKeyValutAccessPolicy parameter -PermissionsToCertificates specifies an array of certificate permissions to grant to a user or service principal. The acceptable values for this parameter: get, list, delete, create, import, update, managecontacts, getissuers, listissuers, setissuers, deleteissuers, manageissuers, recover, purge, backup, restore

Reference:

https://docs.microsoft.com/en-us/powershell/module/azurerm.keyvault/set-azurermkeyvaultaccesspolicy

You need to ensure receipt processing occurs correctly.

What should you do?

A.
Use blob properties to prevent concurrency problems
A.
Use blob properties to prevent concurrency problems
Answers
B.
Use blob SnapshotTime to prevent concurrency problems
B.
Use blob SnapshotTime to prevent concurrency problems
Answers
C.
Use blob metadata to prevent concurrency problems
C.
Use blob metadata to prevent concurrency problems
Answers
D.
Use blob leases to prevent concurrency problems
D.
Use blob leases to prevent concurrency problems
Answers
Suggested answer: B

Explanation:

You can create a snapshot of a blob. A snapshot is a read-only version of a blob that's taken at a point in time. Once a snapshot has been created, it can be read, copied, or deleted, but not modified. Snapshots provide a way to back up a blob as it appears at a moment in time.

Scenario: Processing is performed by an Azure Function that uses version 2 of the Azure Function runtime. Once processing is completed, results are stored in Azure Blob Storage and an Azure SQL database. Then, an email summary is sent to the user with a link to the processing report. The link to the report must remain valid if the email is forwarded to another user.

Reference:

https://docs.microsoft.com/en-us/rest/api/storageservices/creating-a-snapshot-of-a-blob

You need to resolve the capacity issue.

What should you do?

A.
Convert the trigger on the Azure Function to an Azure Blob storage trigger
A.
Convert the trigger on the Azure Function to an Azure Blob storage trigger
Answers
B.
Ensure that the consumption plan is configured correctly to allow scaling
B.
Ensure that the consumption plan is configured correctly to allow scaling
Answers
C.
Move the Azure Function to a dedicated App Service Plan
C.
Move the Azure Function to a dedicated App Service Plan
Answers
D.
Update the loop starting on line PC09 to process items in parallel
D.
Update the loop starting on line PC09 to process items in parallel
Answers
Suggested answer: D

Explanation:

If you want to read the files in parallel, you cannot use forEach. Each of the async callback function calls does return a promise. You can await the array of promises that you'll get with Promise.all.

Scenario: Capacity issue: During busy periods, employees report long delays between the time they upload the receipt and when it appears in the web application.

Reference:

https://stackoverflow.com/questions/37576685/using-async-await-with-a-foreach-loop

You need to resolve the log capacity issue.

What should you do?

A.
Create an Application Insights Telemetry Filter
A.
Create an Application Insights Telemetry Filter
Answers
B.
Change the minimum log level in the host.json file for the function
B.
Change the minimum log level in the host.json file for the function
Answers
C.
Implement Application Insights Sampling
C.
Implement Application Insights Sampling
Answers
D.
Set a LogCategoryFilter during startup
D.
Set a LogCategoryFilter during startup
Answers
Suggested answer: C

Explanation:

Scenario, the log capacity issue: Developers report that the number of log message in the trace output for the processor is too high, resulting in lost log messages.

Sampling is a feature in Azure Application Insights. It is the recommended way to reduce telemetry traffic and storage, while preserving a statistically correct analysis of application data. The filter selects items that are related, so that you can navigate between items when you are doing diagnostic investigations. When metric counts are presented to you in the portal, they are renormalized to take account of the sampling, to minimize any effect on the statistics.

Sampling reduces traffic and data costs, and helps you avoid throttling.

Reference:

https://docs.microsoft.com/en-us/azure/azure-monitor/app/sampling

DRAG DROP

You need to deploy a new version of the LabelMaker application to ACR.

Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.


Question 69
Correct answer: Question 69

Explanation:

Step 1: Build a new application image by using dockerfile

Step 2: Create an alias if the image with the fully qualified path to the registry Before you can push the image to a private registry, you've to ensure a proper image name. This can be achieved using the docker tag command. For demonstration purpose, we'll use Docker's hello world image, rename it and push it to

ACR.

# pulls hello-world from the public docker hub

$ docker pull hello-world

# tag the image in order to be able to push it to a private registry

$ docker tag hello-word <REGISTRY_NAME>/hello-world

# push the image

$ docker push <REGISTRY_NAME>/hello-world

Step 3: Log in to the registry and push image In order to push images to the newly created ACR instance, you need to login to ACR form the Docker CLI. Once logged in, you can push any existing docker image to your ACR instance.

Scenario:

Coho Winery plans to move the application to Azure and continue to support label creation.

LabelMaker app

Azure Monitor Container Health must be used to monitor the performance of workloads that are deployed to Kubernetes environments and hosted on Azure Kubernetes Service (AKS).

You must use Azure Container Registry to publish images that support the AKS deployment.

Reference:

https://thorsten-hans.com/how-to-use-a-private-azure-container-registry-with-kubernetes-9b86e67b93b6

https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick-task

You need to access data from the user claim object in the e-commerce web app.

What should you do first?

A.
Write custom code to make a Microsoft Graph API call from the e-commerce web app.
A.
Write custom code to make a Microsoft Graph API call from the e-commerce web app.
Answers
B.
Assign the Contributor RBAC role to the e-commerce web app by using the Resource Manager create role assignment API.
B.
Assign the Contributor RBAC role to the e-commerce web app by using the Resource Manager create role assignment API.
Answers
C.
Update the e-commerce web app to read the HTTP request header values.
C.
Update the e-commerce web app to read the HTTP request header values.
Answers
D.
Using the Azure CLI, enable Cross-origin resource sharing (CORS) from the e-commerce checkout API to the e-commerce web app.
D.
Using the Azure CLI, enable Cross-origin resource sharing (CORS) from the e-commerce checkout API to the e-commerce web app.
Answers
Suggested answer: C

Explanation:

Methods to Get User Identity and Claims in a .NET Azure Functions App include:

ClaimsPrincipal from the Request Context

The ClaimsPrincipal object is also available as part of the request context and can be extracted from the HttpRequest.HttpContext.

User Claims from the Request Headers.

App Service passes user claims to the app by using special request headers.

Reference:

https://levelup.gitconnected.com/four-alternative-methods-to-get-user-identity-and-claims-in-a-net-azure-functions-app-df98c40424bb

Total 345 questions
Go to page: of 35