ExamGecko
Home / Microsoft / AZ-204 / List of questions
Ask Question

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

List of questions

Question 71

Report
Export
Collapse

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

What should you do first?

Write custom code to make a Microsoft Graph API call from the e-commerce web app.
Write custom code to make a Microsoft Graph API call from the e-commerce web app.
Assign the Contributor RBAC role to the e-commerce web app by using the Resource Manager create role assignment API.
Assign the Contributor RBAC role to the e-commerce web app by using the Resource Manager create role assignment API.
Update the e-commerce web app to read the HTTP request header values.
Update the e-commerce web app to read the HTTP request header values.
Using the Azure CLI, enable Cross-origin resource sharing (CORS) from the e-commerce checkout API to the e-commerce web app.
Using the Azure CLI, enable Cross-origin resource sharing (CORS) from the e-commerce checkout API to the e-commerce web app.
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

asked 02/10/2024
Dmitrii Nikolaevich
37 questions

Question 72

Report
Export
Collapse

You develop Azure solutions.

You must connect to a No-SQL globally-distributed database by using the .NET API.

You need to create an object to configure and execute requests in the database.

Which code segment should you use?

new Container(EndpointUri, PrimaryKey);
new Container(EndpointUri, PrimaryKey);
new Database(EndpointUri, PrimaryKey);
new Database(EndpointUri, PrimaryKey);
new CosmosClient(EndpointUri, PrimaryKey);
new CosmosClient(EndpointUri, PrimaryKey);
Suggested answer: C

Explanation:

Example:

// Create a new instance of the Cosmos Client

this.cosmosClient = new CosmosClient(EndpointUri, PrimaryKey)

//ADD THIS PART TO YOUR CODE

await this.CreateDatabaseAsync();

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-get-started

asked 02/10/2024
Ages Handriyanto
33 questions

Question 73

Report
Export
Collapse

HOTSPOT

You are developing a ticket reservation system for an airline.

The storage solution for the application must meet the following requirements:

Ensure at least 99.99% availability and provide low latency.

Accept reservations event when localized network outages or other unforeseen failures occur.

Process reservations in the exact sequence as reservations are submitted to minimize overbooking or selling the same seat to multiple travelers.

Allow simultaneous and out-of-order reservations with a maximum five-second tolerance window.

You provision a resource group named airlineResourceGroup in the Azure South-Central US region.

You need to provision a SQL API Cosmos DB account to support the app.

How should you complete the Azure CLI commands? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.


Microsoft AZ-204 image Question 73 86184 10022024015000000
Correct answer: Microsoft AZ-204 image answer Question 73 86184 10022024015000000

Explanation:

Box 1: BoundedStaleness

Bounded staleness: The reads are guaranteed to honor the consistent-prefix guarantee. The reads might lag behind writes by at most "K" versions (that is, "updates") of an item or by "T" time interval. In other words, when you choose bounded staleness, the "staleness" can be configured in two ways:

The number of versions (K) of the item

The time interval (T) by which the reads might lag behind the writes

Incorrect Answers:

Strong

Strong consistency offers a linearizability guarantee. Linearizability refers to serving requests concurrently. The reads are guaranteed to return the most recent committed version of an item. A client never sees an uncommitted or partial write. Users are always guaranteed to read the latest committed write.

Box 2: --enable-automatic-failover true\

For multi-region Cosmos accounts that are configured with a single-write region, enable automatic-failover by using Azure CLI or Azure portal. After you enable automatic failover, whenever there is a regional disaster, Cosmos DB will automatically failover your account.

QAccept reservations event when localized network outages or other unforeseen failures occur.

Box 3: --locations'southcentralus=0 eastus=1 westus=2

Need multi-region.

Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels

https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/cosmos-db/manage-with-cli.md

asked 02/10/2024
Rick Tellez
41 questions

Question 74

Report
Export
Collapse

DRAG DROP

You are developing a new page for a website that uses Azure Cosmos DB for data storage. The feature uses documents that have the following format:

Microsoft AZ-204 image Question 3 86185 10022024015000000000

You must display data for the new page in a specific order. You create the following query for the page:

Microsoft AZ-204 image Question 3 86185 10022024015000000000

You need to configure a Cosmos DB policy to the support the query.

How should you configure the policy? To answer, drag the appropriate JSON segments to the correct locations. Each JSON 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.


Microsoft AZ-204 image Question 74 86185 10022024015000000
Correct answer: Microsoft AZ-204 image answer Question 74 86185 10022024015000000

Explanation:

Box 1: compositeIndexes

You can order by multiple properties. A query that orders by multiple properties requires a composite index.

Box 2: descending

Example: Composite index defined for (name ASC, age ASC):

It is optional to specify the order. If not specified, the order is ascending.

{

"automatic":true,

"indexingMode":"Consistent",

"includedPaths":[

{

"path":"/*"

}

],

"excludedPaths":[],

"compositeIndexes":[

[

{

"path":"/name",

},

{

"path":"/age",

}

]

]

}

asked 02/10/2024
Epitacio Neto
30 questions

Question 75

Report
Export
Collapse

HOTSPOT

You are building a traffic monitoring system that monitors traffic along six highways. The system produces time series analysis-based reports for each highway. Data from traffic sensors are stored in Azure Event Hub.

Traffic data is consumed by four departments. Each department has an Azure Web App that displays the time series-based reports and contains a WebJob that processes the incoming data from Event Hub. All Web Apps run on App

Service Plans with three instances.

Data throughput must be maximized. Latency must be minimized.

You need to implement the Azure Event Hub.

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

NOTE: Each correct selection is worth one point.


Microsoft AZ-204 image Question 75 86186 10022024015000000
Correct answer: Microsoft AZ-204 image answer Question 75 86186 10022024015000000

Explanation:

Box 1: 6

The number of partitions is specified at creation and must be between 2 and 32.

There are 6 highways.

Box 2: Highway

Reference:

https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features

asked 02/10/2024
Renats Fasulins
37 questions

Question 76

Report
Export
Collapse

DRAG DROP

You are developing a microservices solution. You plan to deploy the solution to a multinode Azure Kubernetes Service (AKS) cluster.

You need to deploy a solution that includes the following features:

reverse proxy capabilities

configurable traffic routing

TLS termination with a custom certificate

Which components should you use? To answer, drag the appropriate components to the correct requirements. Each component 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.


Microsoft AZ-204 image Question 76 86187 10022024015000000
Correct answer: Microsoft AZ-204 image answer Question 76 86187 10022024015000000

Explanation:

Box 1: Helm

To create the ingress controller, use Helm to install nginx-ingress.

Box 2: kubectl

To find the cluster IP address of a Kubernetes pod, use the kubectl get pod command on your local machine, with the option -o wide .

Box 3: Ingress Controller

An ingress controller is a piece of software that provides reverse proxy, configurable traffic routing, and TLS termination for Kubernetes services. Kubernetes ingress resources are used to configure the ingress rules and routes for individual

Kubernetes services.

Incorrect Answers:

Virtual Kubelet: Virtual Kubelet is an open-source Kubernetes kubelet implementation that masquerades as a kubelet. This allows Kubernetes nodes to be backed by Virtual Kubelet providers such as serverless cloud container platforms.

CoreDNS: CoreDNS is a flexible, extensible DNS server that can serve as the Kubernetes cluster DNS. Like Kubernetes, the CoreDNS project is hosted by the CNCF.

Reference:

https://docs.microsoft.com/bs-cyrl-ba/azure/aks/ingress-basic

https://www.digitalocean.com/community/tutorials/how-to-inspect-kubernetes-networking

asked 02/10/2024
Steven Henkel
39 questions

Question 77

Report
Export
Collapse

DRAG DROP

You are implementing an order processing system. A point of sale application publishes orders to topics in an Azure Service Bus queue. The Label property for the topic includes the following data:

Microsoft AZ-204 image Question 6 86188 10022024015000000000

The system has the following requirements for subscriptions:

Microsoft AZ-204 image Question 6 86188 10022024015000000000

You need to implement filtering and maximize throughput while evaluating filters.

Which filter types should you implement? To answer, drag the appropriate filter types to the correct subscriptions. Each filter type 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.


Microsoft AZ-204 image Question 77 86188 10022024015000000
Correct answer: Microsoft AZ-204 image answer Question 77 86188 10022024015000000

Explanation:

FutureOrders: SQLFilter

HighPriortyOrders: CorrelationFilter

CorrelationID only

InternationalOrders: SQLFilter

Country NOT USA requires an SQL Filter

HighQuantityOrders: SQLFilter

Need to use relational operators so an SQL Filter is needed.

AllOrders: No Filter

SQL Filter: SQL Filters - A SqlFilter holds a SQL-like conditional expression that is evaluated in the broker against the arriving messages' user-defined properties and system properties. All system properties must be prefixed with sys. in the conditional expression. The SQL-language subset for filter conditions tests for the existence of properties (EXISTS), as well as for null-values (IS NULL), logical NOT/AND/OR, relational operators, simple numeric arithmetic, and simple text pattern matching with LIKE.

Correlation Filters - A CorrelationFilter holds a set of conditions that are matched against one or more of an arriving message's user and system properties. A common use is to match against the CorrelationId property, but the application can also choose to match against ContentType, Label, MessageId, ReplyTo, ReplyToSessionId, SessionId, To, and any user-defined properties. A match exists when an arriving message's value for a property is equal to the value specified in the correlation filter. For string expressions, the comparison is case-sensitive. When specifying multiple match properties, the filter combines them as a logical AND condition, meaning for the filter to match, all conditions must match.

Boolean filters - The TrueFilter and FalseFilter either cause all arriving messages (true) or none of the arriving messages (false) to be selected for the subscription.

Reference:

https://docs.microsoft.com/en-us/azure/service-bus-messaging/topic-filters

asked 02/10/2024
Dang Xuan Bao
41 questions

Question 78

Report
Export
Collapse

DRAG DROP

Your company has several websites that use a company logo image. You use Azure Content Delivery Network (CDN) to store the static image.

You need to determine the correct process of how the CDN and the Point of Presence (POP) server will distribute the image and list the items in the correct order.

In which order do the actions occur? To answer, move all actions from the list of actions to the answer area and arrange them in the correct order.


Microsoft AZ-204 image Question 78 86189 10022024015000000
Correct answer: Microsoft AZ-204 image answer Question 78 86189 10022024015000000

Explanation:

Step 1: A user requests the image..

A user requests a file (also called an asset) by using a URL with a special domain name, such as <endpoint name>.azureedge.net. This name can be an endpoint hostname or a custom domain. The DNS routes the request to the best performing POP location, which is usually the POP that is geographically closest to the user.

Step 2: If no edge servers in the POP have the..

If no edge servers in the POP have the file in their cache, the POP requests the file from the origin server. The origin server can be an Azure Web App, Azure Cloud Service, Azure Storage account, or any publicly accessible web server.

Step 3: The origin server returns the..

The origin server returns the file to an edge server in the POP.

An edge server in the POP caches the file and returns the file to the original requestor (Alice). The file remains cached on the edge server in the POP until the time-to-live (TTL) specified by its HTTP headers expires. If the origin server didn't specify a TTL, the default TTL is seven days.

Step 4: Subsequent requests for..

Additional users can then request the same file by using the same URL that the original user used, and can also be directed to the same POP.

If the TTL for the file hasn't expired, the POP edge server returns the file directly from the cache. This process results in a faster, more responsive user experience.

Reference:

https://docs.microsoft.com/en-us/azure/cdn/cdn-overview

asked 02/10/2024
Coropcianu Mihai
36 questions

Question 79

Report
Export
Collapse

You are developing an Azure Cosmos DB solution by using the Azure Cosmos DB SQL API. The data includes millions of documents. Each document may contain hundreds of properties.

The properties of the documents do not contain distinct values for partitioning. Azure Cosmos DB must scale individual containers in the database to meet the performance needs of the application by spreading the workload evenly across all partitions over time.

You need to select a partition key.

Which two partition keys can you use? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

a single property value that does not appear frequently in the documents
a single property value that does not appear frequently in the documents
a value containing the collection name
a value containing the collection name
a single property value that appears frequently in the documents
a single property value that appears frequently in the documents
a concatenation of multiple property values with a random suffix appended
a concatenation of multiple property values with a random suffix appended
a hash suffix appended to a property value
a hash suffix appended to a property value
Suggested answer: D, E

Explanation:

You can form a partition key by concatenating multiple property values into a single artificial partitionKey property. These keys are referred to as synthetic keys.

Another possible strategy to distribute the workload more evenly is to append a random number at the end of the partition key value. When you distribute items in this way, you can perform parallel write operations across partitions.

Note: It's the best practice to have a partition key with many distinct values, such as hundreds or thousands. The goal is to distribute your data and workload evenly across the items associated with these partition key values. If such a property doesn't exist in your data, you can construct a synthetic partition key.

Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/synthetic-partition-keys

asked 02/10/2024
Nitharsan Balanavaneethan
45 questions

Question 80

Report
Export
Collapse

HOTSPOT

A company develops a series of mobile games. All games use a single leaderboard service.

You have the following requirements:

Code must be scalable and allow for growth.

Each record must consist of a playerId, gameId, score, and time played.

When users reach a new high score, the system will save the new score using the SaveScore function below.

Each game is assigned an Id based on the series title.

You plan to store customer information in Azure Cosmos DB. The following data already exists in the database:

Microsoft AZ-204 image Question 9 86191 10022024015000000000

You develop the following code to save scores in the data store. (Line numbers are included for reference only.)

Microsoft AZ-204 image Question 9 86191 10022024015000000000

You develop the following code to query the database. (Line numbers are included for reference only.)

Microsoft AZ-204 image Question 9 86191 10022024015000000000

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.


Microsoft AZ-204 image Question 80 86191 10022024015000000
Correct answer: Microsoft AZ-204 image answer Question 80 86191 10022024015000000

Explanation:

Box 1: Yes

Create a table.

A CloudTableClient object lets you get reference objects for tables and entities. The following code creates a CloudTableClient object and uses it to create a new CloudTable object, which represents a table

// Retrieve storage account from connection-string.

CloudStorageAccount storageAccount =

CloudStorageAccount.parse(storageConnectionString);

// Create the table client.

CloudTableClient tableClient = storageAccount.createCloudTableClient();

// Create the table if it doesn't exist.

String tableName = "people";

CloudTable cloudTable = tableClient.getTableReference(tableName); cloudTable.createIfNotExists();

Box 2: No

New records are inserted with TableOperation.insert. Old records are not updated.

To update old records TableOperation.insertOrReplace should be used instead.

Box 3: No

Box 4: Yes

Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-java

asked 02/10/2024
Fahrurrazi .
25 questions
Total 377 questions
Go to page: of 38
Search

Related questions