Topic 4, Misc. Questions
You develop a news and blog content delivery 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.
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);
References:
https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notificationregistration-
management
https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/app-service-mobile/appservice-
mobile-windows-store-dotnet-get-started-push.md
Note: This question is part of a series of questions that present the same scenario. Each
question in the series contains a unique solution that might meet the stated goals. Some
question sets might have more than one correct solution, while others might not have a
correct solution.
After you answer a question in this question, you will NOT be able to return to it. As a
result, these questions will not appear in the review screen.
You are developing a solution that will be deployed to an Azure Kubernetes Service (AKS)
cluster. The solution will include a custom VNet, Azure Container Registry images, and an
Azure Storage account.
The solution must allow dynamic creation and management of all Azure resources within
the AKS cluster.
You need to configure an AKS cluster for use with the Azure APIs.
Solution: Create an AKS cluster that supports network policy. Create and apply a network
to allow traffic only from within a defined namespace.
Does the solution meet the goal?
A.
Yes
B.
No
Yes
When you run modern, microservices-based applications in Kubernetes, you often want to
control which components can communicate with each other. The principle of least
privilege should be applied to how traffic can flow between pods in an Azure Kubernetes
Service (AKS) cluster. Let's say you likely want to block traffic directly to back-end
applications. The Network Policy feature in Kubernetes lets you define rules for ingress and
egress traffic between pods in a cluster.
References:
https://docs.microsoft.com/en-us/azure/aks/use-network-policies
Note: This question is part of a series of questions that present the same scenario. Each
question in the series contains a unique solution that might meet the stated goals. Some
question sets might have more than one correct solution, while others might not have a
correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result,
these questions will not appear in the review screen.
Margie’s Travel is an international travel and bookings management service. The company
is expanding into restaurant bookings. You are tasked with implementing Azure Search for
the restaurants listed in their solution
You create the index in Azure Search.
You need to import the restaurant data into the Azure Search service by using the Azure
Search NET SDK.
Solution:
1 Create a SearchlndexClient object to connect to the search index
2. Create an IndexBatch that contains the documents which must be added.
3. Call the Documents.Index method of the SearchIndexClient and pass the IndexBatch.
.
Does the solution meet the goal?
A.
Yes
B.
No
Yes
1. The index needs to be populated. To do this, we will need a SearchIndexClient. There
are two ways to obtain one: by constructing it, or by calling Indexes.GetClient on the
SearchServiceClient. Here we will use the first method.
2. Create the indexBatch with the documents
Something like:
var hotels = new Hotel[];
{
new Hotel()
{
HotelId = "3",
BaseRate = 129.99,
Description = "Close to town hall and the river"
}
};
…
var batch = IndexBatch.Upload(hotels);
3. The next step is to populate the newly-created index
Example:
var batch = IndexBatch.Upload(hotels);
try
{
indexClient.Documents.Index(batch);
}
References:
https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk
You develop and deploy a Java RESTful API to Azure App Service.
You open a browser and navigate to the URL for the API. You receive the following error
message:
You need to resolve the error.
What should you do?
A.
Bind an SSL certificate
B.
Enable authentication
C.
Enable CORS
D.
Map a custom domain
E.
Add a CDN
Enable CORS
We need to enable Cross-Origin Resource Sharing (CORS).
References:
https://medium.com/@xinganwang/a-practical-guide-to-cors-51e8fd329a1f
You are developing an application to use Azure Blob storage. You have configured Azure
Blob storage to include change feeds.
A copy of your storage account must be created in another region. Data must be copied
from the current storage account to the new storage account directly between the storage
servers.
You need to create a copy of the storage account in another region and copy the data.
In which order should you perform the actions? To answer, move all actions from the list of
actions to the answer area and arrange them in the correct order.
You are developing a Java application that uses Cassandra to store key and value data.
You plan to use a new Azure Cosmos DB resource and the Cassandra API in the
application. You create an Azure Active Directory (Azure AD) group named Cosmos DB
Creators to enable provisioning of Azure Cosmos accounts, databases, and containers.
The Azure AD group must not be able to access the keys that are required to access the
data.
You need to restrict access to the Azure AD group.
Which role-based access control should you use?
A.
DocumentDB Accounts Contributor
B.
Cosmos Backup Operator
C.
Cosmos DB Operator
D.
Cosmos DB Account Reader
Cosmos DB Operator
Explanation:
Azure Cosmos DB now provides a new RBAC role, Cosmos DB Operator. This new role
lets you provision Azure Cosmos accounts, databases, and containers, but can’t access
the keys that are required to access the data. This role is intended for use in scenarios
where the ability to grant access to Azure Active Directory service principals to manage
deployment operations for Cosmos DB is needed, including the account, database, and
containers.
Reference:
https://azure.microsoft.com/en-us/updates/azure-cosmos-db-operator-role-for-role-basedaccess-
control-rbac-is-now-available/
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?
A.
new Container(EndpointUri, PrimaryKey);
B.
new Database(Endpoint, PrimaryKey);
C.
new CosmosClient(EndpointUri, PrimaryKey);
new CosmosClient(EndpointUri, PrimaryKey);
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
Note: This question is part of a series of questions that present the same scenario.
Each question in the series contains a unique solution. Determine whether the
solution meets the stated goals.You are developing and deploying several ASP.NET web applications to Azure App
Service. You plan to save session state information and HTML output.
You must use a storage mechanism with the following requirements:
Share session state across all ASP.NET web applications.
Support controlled, concurrent access to the same session state data for multiple
readers and a single writer.
Save full HTTP responses for concurrent requests.
You need to store the information.
Solution: Enable Application Request Routing (ARR).
Does the solution meet the goal?
A.
Yes
B.
No
No
Explanation:
Instead deploy and configure Azure Cache for Redis. Update the web applications.
Reference:
https://docs.microsoft.com/en-us/azure/architecture/best-practices/caching#managingconcurrency-
in-a-cache
Note: This question is part of a series of questions that present the same scenario.
Each question in the series contains a unique solution that might meet the stated
goals. Some question sets might have more than one correct solution, while others
might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a
result, these questions will not appear in the review screen.
You develop an HTTP triggered Azure Function app to process Azure Storage blob data.
The app is triggered using an output binding on the blob.
The app continues to time out after four minutes. The app must process the blob data.
You need to ensure the app does not time out and processes the blob data.
Solution: Configure the app to use an App Service hosting plan and enable the Always On
setting.
Does the solution meet the goal?
A.
Yes
B.
No
No
Instead pass the HTTP trigger payload into an Azure Service Bus queue to be processed
by a queue trigger function and return an immediate HTTP success response.
Note: Large, long-running functions can cause unexpected timeout issues. General best
practices include:
Whenever possible, refactor large functions into smaller function sets that work together
and return responses fast. For example, a webhook or HTTP trigger function might require
an acknowledgment response within a certain time limit; it's common for webhooks to
require an immediate response. You can pass the HTTP trigger payload into a queue to be
processed by a queue trigger function. This approach lets you defer the actual work and
return an immediate response.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-best-practices
Note: This question is part of a series of questions that present the same scenario.
Each question in the series contains a unique solution that might meet the stated
goals. Some question sets might have more than one correct solution, while others
might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a
result, these questions will not appear in the review screen.
You develop an HTTP triggered Azure Function app to process Azure Storage blob data.
The app is triggered using an output binding on the blob.
The app continues to time out after four minutes. The app must process the blob data.
You need to ensure the app does not time out and processes the blob data.
Solution: Pass the HTTP trigger payload into an Azure Service Bus queue to be processed
by a queue trigger function and return an immediate HTTP success response.
Does the solution meet the goal?
A.
Yes
B.
No
Yes
Large, long-running functions can cause unexpected timeout issues. General best practices include:
Whenever possible, refactor large functions into smaller function sets that work together
and return responses fast. For example, a webhook or HTTP trigger function might require
an acknowledgment response within a certain time limit; it's common for webhooks to
require an immediate response. You can pass the HTTP trigger payload into a queue to be
processed by a queue trigger function. This approach lets you defer the actual work and
return an immediate response.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-best-practices
You are developing an app that manages users for a video game. You plan to store the
region, email address, and phone number for the player. Some players may not have a
phone number. The player’s region will be used to load-balance data.
Data for the app must be stored in Azure Table Storage.
You need to develop code to retrieve data for an individual player
How should you complete the code? To answer, select the appropriate options in the
answer area.
You are implementing a software as a service (SaaS) ASP.NET Core web service that will
run as an Azure Web App. The web service will use an on-premises SQL Server database
for storage. The web service also includes a WebJob that processes data updates. Four
customers will use the web service.
Each instance of the WebJob processes data for a single customer and must run
as a singleton instance.
Each deployment must be tested by using deployment slots prior to serving
production data.
Azure costs must be minimized.
Azure resources must be located in an isolated network.
You need to configure the App Service plan for the Web App.
How should you configure the App Service plan? To answer, select the appropriate settings
in the answer area.
NOTE: Each correct selection is worth one point.
Number of VM instances: 4
You are not charged extra for deployment slots.
Pricing tier: Isolated
The App Service Environment (ASE) is a powerful feature offering of the Azure App
Service that gives network isolation and improved scale capabilities. It is essentially a
deployment of the Azure App Service into a subnet of a customer’s Azure Virtual Network
(VNet).
References:
https://azure.microsoft.com/sv-se/blog/announcing-app-service-isolated-more-power-scaleand-
ease-of-use/
Page 8 out of 23 Pages |
Previous |