AZ-204 Practice Test Questions

271 Questions


Topic 4, Misc. Questions

You develop an app that allows users to upload photos and videos to Azure storage. The
app uses a storage REST API call to upload the media to a blob storage account named
Account1. You have blob storage containers named Container1 and Container2.
Uploading of videos occurs on an irregular basis.
You need to copy specific blobs from Container1 to Container2 in real time when specific
requirements are
met, excluding backup blob copies.
What should you do?


A.

Download the blob to a virtual machine and then upload the blob to Container2.


B.

Run the Azure PowerShell command Start-AzureStorageBlobCopy.


C.

Copy blobs to Container2 by using the Put Blob operation of the Blob Service REST
API.


D.

Use AzCopy with the Snapshot switch blobs to Container2.





B.
  

Run the Azure PowerShell command Start-AzureStorageBlobCopy.



The Start-AzureStorageBlobCopy cmdlet starts to copy a blob.
Example 1: Copy a named blob
C:\PS>Start-AzureStorageBlobCopy -SrcBlob "ContosoPlanning2015" -DestContainer
"ContosoArchives" -SrcContainer "ContosoUploads"
This command starts the copy operation of the blob named ContosoPlanning2015 from the
container named ContosoUploads to the container named ContosoArchives.
References:
https://docs.microsoft.com/en-us/powershell/module/azure.storage/startazurestorageblobcopy?
view=azurermps-6.13.0

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 are developing an Azure solution to collect point-of-sale (POS) device data from 2,000
stores located throughout the world. A single device can produce 2 megabytes (MB) of
data every 24 hours. Each store location has one to five devices that send data.
You must store the device data in Azure Blob storage. Device data must be correlated
based on a device identifier. Additional stores are expected to open in the future.
You need to implement a solution to receive the device data.
Solution: Provision an Azure Service Bus. Configure a topic to receive the device data by
using a correlation filter.
Does the solution meet the goal?


A.

Yes





A.
  

Yes



You are developing a solution that will use Azure messaging services.
You need to ensure that the solution uses a publish-subscribe model and eliminates the
need for constant polling.
What are two possible ways to achieve the goal? Each correct answer presents a complete
solution.
NOTE: Each correct selection is worth one point.


A.

Service Bus


B.

Event Hub


C.

Event Grid


D.

Queue





A.
  

Service Bus



C.
  

Event Grid



It is strongly recommended to use available messaging products and services that support a publish-subscribe model, rather than building your own. In Azure, consider using Service
Bus or Event Grid. Other technologies that can be used for pub/sub messaging include
Redis, RabbitMQ, and Apache Kafka.
Reference:
https://docs.microsoft.com/en-us/azure/architecture/patterns/publisher-subscriber

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 a software as a service (SaaS) offering to manage photographs. Users upload
photos to a web service which then stores the photos in Azure Storage Blob storage. The
storage account type is General-purpose V2.
When photos are uploaded, they must be processed to produce and save a mobile-friendly
version of the image. The process to produce a mobile-friendly version of the image must
start in less than one minute.
You need to design the process that starts the photo processing.
Solution: Move photo processing to an Azure Function triggered from the blob upload.
Does the solution meet the goal?


A.

Yes


B.

No





A.
  

Yes



Azure Storage events allow applications to react to events. Common Blob storage event
scenarios include image or video processing, search indexing, or any file-oriented
workflow.
Events are pushed using Azure Event Grid to subscribers such as Azure Functions, Azure
Logic Apps, or even to your own http listener.
Note: Only storage accounts of kind StorageV2 (general purpose v2) and BlobStorage
support event integration. Storage (general purpose v1) does not support integration with
Event Grid.
Reference:
https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-event-overview

A web service provides customer summary information for e-commerce partners. The web
service is implemented as an Azure Function app with an HTTP trigger. Access to the API
is provided by an Azure API Management instance. The API Management instance is
configured in consumption plan mode. All API calls are authenticated by using OAuth.
API calls must be cached. Customers must not be able to view cached data for other
customers.
You need to configure API Management policies for caching.
How should you complete the policy statement?






You develop a web app that uses tier D1 app service plan by using the Web Apps feature
of Microsoft Azure App Service.
Spikes in traffic have caused increases in page load times.
You need to ensure that the web app automatically scales when CPU load is about 85
percent and minimize costs.
Which four 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.
NOTE: More than one order of answer choices is correct. You will receive credit for any of
the correct orders you select.






You are developing an e-commerce solution that uses a microservice architecture.
You need to design a communication backplane for communicating transactional
messages between various parts of the solution. Messages must be communicated in firstin-
first-out (FIFO) order.
What should you use?


A.

Azure Storage Queue


B.

Azure Event Hub


C.

Azure Service Bus


D.

Azure Event Grid





A.
  

Azure Storage Queue



Explanation:
As a solution architect/developer, you should consider using Service Bus queues when:
Your solution requires the queue to provide a guaranteed first-in-first-out (FIFO)
ordered delivery.
Reference:
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-azure-andservice-
bus-queues-compared-contrasted

You are creating a script that will run a large workload on an Azure Batch pool. Resources
will be reused and do not need to be cleaned up after use.
You have the following parameters:
You need to write an Azure CLI script that will create the jobs, tasks, and the pool.
In which order should you arrange the commands to develop the solution? To answer,
move the appropriate commands from the list of command segments to the answer area
and arrange them in the correct order.






You provide an Azure API Management managed web service lo clients. The back end
web service implements HTTP Strict Transport Security (HSTS).
Every request to the backend service must include a valid HTTP authorization header.
You need to configure the Azure API Management instance with an authentication policy.
Which two policies can you uses? Each correct answer presents a complete solution
NOTE: Each correct selection is worth one point.


A.

Certificate Authentication


B.

Basic Authentication


C.

OAuth Client Credential Grant


D.

Digest Authentication





A.
  

Certificate Authentication



C.
  

OAuth Client Credential Grant



You use Azure Table storage to store customer information for an application. The data
contains customer details and is partitioned by last name. You need to create a query that
returns all customers with the last name Smith. Which code segment should you use?


A.

TableQuery.GenerateFilterCondition("PartitionKey", Equals, "Smith")


B.

TableQuery.GenerateFilterCondition("LastName", Equals, "Smith")


C.

TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "Smith")


D.

TableQuery.GenerateFilterCondition("LastName", QueryComparisons.Equal, "Smith")





C.
  

TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "Smith")



Explanation:
Retrieve all entities in a partition. The following code example specifies a filter for entities
where 'Smith' is the partition key. This example prints the fields of each entity in the query
results to the console.
Construct the query operation for all customer entities where PartitionKey="Smith".
TableQuery<CustomerEntity> query = new
TableQuery<CustomerEntity>().Where(TableQuery.GenerateFilterCondition("PartitionKey",
QueryComparisons.Equal, "Smith"));
References:
https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-dotnet

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 and deploy an Azure App Service API app to a Windows-hosted deployment
slot named Development. You create additional deployment slots named Testing and
Production. You enable auto swap on the Production deployment slot.
You need to ensure that scripts run and resources are available before a swap operation
occurs.
Solution: Disable auto swap. Update the app with a method named statuscheck to run the
scripts. Re-enable auto swap and deploy the app to the Production slot.
Does the solution meet the goal?


A.

Yes


B.

No





A.
  

Yes



Explanation:
Instead update the web.config file to include the applicationInitialization configuration
element. Specify custom initialization actions to run the scripts.
Note: Some apps might require custom warm-up actions before the swap. The
applicationInitialization configuration element in web.config lets you specify custom
initialization actions. The swap operation waits for this custom warm-up to finish before
swapping with the target slot. Here's a sample web.config fragment.
<system.webServer>
<applicationInitialization>
<add initializationPage="/" hostName="[app hostname]" />
<add initializationPage="/Home/About" hostName="[app hostname]" />
</applicationInitialization>
</system.webServer>
Reference:
https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#troubleshootswaps

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?


A.

jsonp


B.

authentication-certificate


C.

check-header


D.

validate-jwt





D.
  

validate-jwt



Explanation:
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-protectbackend-
with-aad


Page 10 out of 23 Pages
Previous