Docsity

AZ204 Microsoft Azure Developer Practice Test Questions, Exams of Advanced Education

Toggle sidebar
bg1
AZ204 Microsoft Azure Developer Practice Test Questions
Which of the following statements describes the type of data that can be retrieved using
Microsoft Graph?
https://docs.microsoft.com/en-us/graph/overview#whats-in-microsoft-graph - All of the
data contained in Microsoft 365, including documents, calendar, email, Teams and people
Microsoft Graph is the gateway to data and intelligence in Microsoft 365. It provides a
unified programmability model that you can use to access the tremendous amount of data
in Microsoft 365, Windows 10, and Enterprise Mobility + Security. Microsoft Graph exposes
REST APIs and client libraries to access data on the following Microsoft cloud services: (A)
Microsoft 365 core services: Bookings, Calendar, Delve, Excel, Microsoft 365 compliance
eDiscovery, Microsoft Search, OneDrive, OneNote, Outlook/Exchange, People (Outlook
contacts), Planner, SharePoint, Teams, To Do, Workplace Analytics. (B) Enterprise Mobility
and Security services: Advanced Threat Analytics, Advanced Threat Protection, Azure Active
Directory, Identity Manager, and Intune. (C) Windows 10 services: activities, devices,
notifications, Universal Print. (D) Dynamics 365 Business Central.
What advantage does a Spot VM provide over a regularly-provisioned VM?
https://docs.microsoft.com/en-us/azure/virtual-machines/spot-vms - Spot instances are
significantly cheaper.
Using Azure Spot Virtual Machines allows you to take advantage of our unused capacity at a
significant cost savings. At any point in time when Azure needs the capacity back, the Azure
infrastructure will evict Azure Spot Virtual Machines. Therefore, Azure Spot Virtual Machines
are great for workloads that can handle interruptions like batch processing jobs, dev/test
environments, large compute workloads, and more.
If your Azure solution relies on third-party public images, some risks are added to your
process. Microsoft recommends keeping a private copy of public images and deploying from
there, instead of deploying directly from public image locations like DockerHub. Which CLI
command is able to copy a public image into Azure Container Registry?
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download AZ204 Microsoft Azure Developer Practice Test Questions and more Exams Advanced Education in PDF only on Docsity!

AZ204 Microsoft Azure Developer Practice Test Questions Which of the following statements describes the type of data that can be retrieved using Microsoft Graph? https://docs.microsoft.com/en-us/graph/overview#whats-in-microsoft-graph - All of the data contained in Microsoft 365, including documents, calendar, email, Teams and people Microsoft Graph is the gateway to data and intelligence in Microsoft 365. It provides a unified programmability model that you can use to access the tremendous amount of data in Microsoft 365, Windows 10, and Enterprise Mobility + Security. Microsoft Graph exposes REST APIs and client libraries to access data on the following Microsoft cloud services: (A) Microsoft 365 core services: Bookings, Calendar, Delve, Excel, Microsoft 365 compliance eDiscovery, Microsoft Search, OneDrive, OneNote, Outlook/Exchange, People (Outlook contacts), Planner, SharePoint, Teams, To Do, Workplace Analytics. (B) Enterprise Mobility and Security services: Advanced Threat Analytics, Advanced Threat Protection, Azure Active Directory, Identity Manager, and Intune. (C) Windows 10 services: activities, devices, notifications, Universal Print. (D) Dynamics 365 Business Central. What advantage does a Spot VM provide over a regularly-provisioned VM? https://docs.microsoft.com/en-us/azure/virtual-machines/spot-vms - Spot instances are significantly cheaper. Using Azure Spot Virtual Machines allows you to take advantage of our unused capacity at a significant cost savings. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Azure Spot Virtual Machines. Therefore, Azure Spot Virtual Machines are great for workloads that can handle interruptions like batch processing jobs, dev/test environments, large compute workloads, and more. If your Azure solution relies on third-party public images, some risks are added to your process. Microsoft recommends keeping a private copy of public images and deploying from there, instead of deploying directly from public image locations like DockerHub. Which CLI command is able to copy a public image into Azure Container Registry?

https://docs.microsoft.com/en-ca/azure/container-registry/buffer-gate-public- content#import-images-to-an-azure-container-registry - az acr import As a recommended one-time step, import base images and other public content to your Azure container registry. The az acr import command in the Azure CLI supports image import from public registries such as Docker Hub and Microsoft Container Registry and from other private container registries. You would like to receive an email every time a new Azure Container Registry is created. Which of the following steps would accomplish that goal? https://docs.microsoft.com/en-us/azure/container-registry/monitor-service - Go into Azure Monitor. Go into Alerts. Select the Subscription scope. Select the Create or Update Container Registry signal. Add the action group that emails you. Give it a name and click save You are a developer for Acme Inc. You have implemented Redis as a caching service and it's going great. You are running on a premium plan, and using the top 120 GB of memory cache. You'd like to increase the memory limit to 500 GB, but Redis does not support that. How can you get more memory when using Azure Redis? Choose the best answer. - implement the Redis Cluster feature, and add a second shard to double the memory available. Redis Cluster supports up to 10 shards to create 1.2 TB of memory. ARM templates are said to have a declarative syntax. Why is a declarative syntax better than a programmatic approach? https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/overview - You don't have to check if the resource exists, you simply declare that it should exist ARM templates allow you to create and deploy an entire Azure infrastructure declaratively. For example, you can deploy not only virtual machines, but also the network infrastructure, storage systems, and any other resources you may need.

read but is static can benefit from caching, but it does not benefit the most of the four options. What does the CLI command 'az acr build --registry $ACR_NAME --image helloacrtasks:v1 .' do? https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick- task - Performs a docker build and immediately pushes the result image into an ACR ACR Tasks is a suite of features within Azure Container Registry that provides streamlined and efficient Docker container image builds in Azure. az acr build is an ACR Task which queues a quick build, providing streaming logs for an Azure Container Registry. You are a developer for Acme Inc. Your company's flagship application is the Wind Monitoring software that Wind Energy farms use to monitor their equipment. At the end of each day, the Wind Collector sends a message that contains all of the days statistics in JSON format which needs to be read, processed, and posted to the database. Which Azure Service is best for processing this type of data? - Service Bus Service Bus Queue is enterprise-grade message queue. Which ASP.NET method outputs log messages to the application diagnostics log? https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs - System.Diagnostics.Trace.TraceError("message"); Logs messages generated by your application code. The messages can be generated by the web framework you choose, or from your application code directly using the standard logging pattern of your language. Each message is assigned one of the following categories: Critical, Error, Warning, Info, Debug, and Trace. You can select how verbose you want the logging to be by setting the severity level when you enable application logging.

How many input bindings is an Azure Function allowed to have? https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers- bindings?tabs=csharp - Any number or zero. You can mix and match different bindings to suit your needs. Bindings are optional and a function might have one or multiple input and/or output bindings. Refer to Microsoft You have a Timer Trigger Function that uses "0 15,30,45 0 * * *" as it's timer setting. How often will the function run? https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings- timer?tabs=csharp#ncrontab-expressions - At 00:15, 00:30, and 00:45 (12:15am, 12:30am, and 12:45am); three times per day only. CRON uses a "{second} {minute} {hour} {day} {month} {day-of-week}" format for expressions. The first "0" means that it runs when the second equals 0. The second "15,30,45" means when the minutes equal 15, 30 and 45. The third "0" means at midnight. So the answer is at 12:15, 12:30, and 12:45 every day. The speed of an Azure Event Hub is determined by the number of Throughput units you reserve for it. You can set between 1 and 20 throughput units for the Event Hub. How fast does 1 throughput unit represent for data coming in to an Event Hub? - 1 MB per second or 1000 events per second (whichever comes first) The API Management Gateway includes a powerful feature called Policies. What is the main function of policies? - Policies allow you to modify the behavior of the API using configuration instead of code. A policy can change both the inbound request and the outbound response. Policies allow you to modify the inbound request as well as the outbound results without modifying the API code itself.

Core (SQL) API stores data in JSON document format. Cassandra API stores data in column- oriented schema. Gremlin API allows users to make graph queries and stores data as edges and vertices. MongoDB API also uses documents but is BSON format, which is a binary format and not text-based. Your company has several applications running on Azure App Services - App1, App2, App and App4. Each application is configured to use a system-managed identity to access resources. Your applications all store their secrets in a KeyVault named KV1. You are finding it difficult to manage the permissions for all these applications, and would like to move to a single managed identity for all applications instead of each application having their own. What action do you take to implement that? https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure- resources/overview - Change the applications t the same user-managed identity Managed identities eliminate the need for developers to manage credentials. Managed identities provide an identity for applications to use when connecting to resources that support Azure Active Directory (Azure AD) authentication. Applications may use the managed identity to obtain Azure AD tokens. For example, an application may use a managed identity to access resources like Azure Key Vault where developers can store credentials in a secure manner or to access storage accounts. You cannot configure multiple applications to use the same system-assigned identity. You must use a user-assigned identity for this purpose. For Windows App Services, where can you choose to have logging saved to? https://docs.microsoft.com/en-us/learn/modules/capture-application-logs-app-service/2- enable-and-configure-app-service-application-logging - File system, and blog storage To route messages to log files, Azure Web apps use the Web server (IIS process). Because Windows-based Web apps are a well-established Azure service, and messaging for ASP.NET apps is tightly integrated with the underlying IIS service, Windows apps benefit from a rich logging infrastructure. For other apps, logging options may be limited by the development platform, even when running on a Windows app service.

What is the Azure CLI command to download application log files to the local disk? https://docs.microsoft.com/en-us/learn/modules/capture-application-logs-app-service/2- enable-and-configure-app-service-application-logging - az webapp log download az webapp log download allows you to download the logs to your local disk. You have a Lifecycle Storage policy that moves blobs from hot storage to cool storage if they have not been modified in 30 days. You realize that there is a frequently accessed file that is in cool storage due to this policy, and you'd like to save money by moving it back to hot storage. So you manually move this file back to hot storage. Will this solve your problem? https://docs.microsoft.com/en-us/azure/storage/blobs/storage-lifecycle-management- concepts?tabs=azure-portal - No, the blob will be automatically moved back to cool storage the next day Moving the blob from cool to hot does not modify it's modification date, and so it will be moved back to cool storage the next time lifecycle management runs. You need to either modify the rule to be based on last access date, or modify the file when moving it back so that the modification date is updated. In ASP.NET Core, using the logger factory class, how do you write a message to the application diagnostics log that only shows up with the user has enabled error level messages? https://docs.microsoft.com/en-us/learn/modules/capture-application-logs-app-service/2- enable-and-configure-app-service-application-logging - logger.LogCritical("message") logger.LogCritical("Message") writes a critical message at log level 5. Levels 4 and 5 are "error" messages.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers- bindings?tabs=csharp - function.json The function.json file defines the function's trigger, bindings, and other configuration settings. Every function has one and only one trigger. The runtime uses this config file to determine the events to monitor and how to pass data into and return data from a function execution. The following is an example function.json file. When deploying an Azure Storage account, and you choose Zone Redundant Storage (ZRS), how many copies of your data does Azure keep? https://docs.microsoft.com/en-us/azure/storage/common/storage-redundancy - 3 Azure Storage always stores multiple copies of your data so that it is protected from planned and unplanned events, including transient hardware failures, network or power outages, and massive natural disasters. Redundancy ensures that your storage account meets its availability and durability targets even in the face of failures. Zone-redundant storage (ZRS) copies your data synchronously across three Azure availability zones in the primary region. For applications requiring high availability, Microsoft recommends using ZRS in the primary region, and also replicating to a secondary region. You have a docker image in your local repository that you'd like to share to the Azure Container Register. Your local respository image is named myimage, and your ACR is named myacr.azurecr.io. What is the command to get the image from your local into ACR? https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started- docker-cli?tabs=azure-cli#push-the-image-to-your-registry - docker push myacr.azurecr.io/myimage Why would someone prefer a Consumption-based pricing model as opposed to a Time- based pricing model?

https://docs.microsoft.com/en-us/azure/azure-functions/functions-consumption-costs - you can save a log of money if you don't use the resource often as opposed to having it available for use 24/ Consumption-Based Model - paying for something based on how much you used, as opposed to paying for something no matter if you use it or not. You have a Timer Trigger Function that uses "0 */5 * * * " as it's timer setting. How often will the function run? https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings- timer?tabs=csharp#ncrontab-expressions - Every 5 minutes CRON uses a "{second} {minute} {hour} {day} {month} {day-of-week}" format for expressions. The first "0" means that it runs when the second equals 0. The second "/5" means every 5th minute of every hour, of every day. What is the maximum storage capacity of a Cosmos DB container? - Unlimited Cosmos DB can store an unlimited amount of data. There is no specific limit. When deploying an Azure Storage account, and you choose Geo Redundant Storage (GRS), how many copies of your data does Azure keep? https://docs.microsoft.com/en-us/azure/storage/common/storage-redundancy - 6 Azure Storage always stores multiple copies of your data so that it is protected from planned and unplanned events, including transient hardware failures, network or power outages, and massive natural disasters. Redundancy ensures that your storage account meets its availability and durability targets even in the face of failures. Geo-redundant storage (GRS) copies your data synchronously three times within a single physical location in the primary

Exponential = Retry attempts will delay based on a backoff strategy, where each attempt will increase the duration that it waits before retrying. Fixed = Retry attempts happen at fixed intervals; each delay is a consistent duration. In ASP.NET Core, using the logger factory class, how do you write a message to the application diagnostics log that only shows up with the user has enabled warning level messages? https://docs.microsoft.com/en-us/learn/modules/capture-application-logs-app-service/2- enable-and-configure-app-service-application-logging - logger.LogWarning("message") For Azure Functions, what are the possible values for the direction property in the function.json file? https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers- bindings?tabs=csharp - in, out, inout All triggers and bindings have a direction property in the function.json file. For triggers, the direction is always in. Input and output bindings use in and out. Some bindings support a special direction inout. If you use inout, only the Advanced editor is available via the Integrate tab in the portal. What is the major downside/risk to using Spot VMs compared to regularly-provisioned VMs? https://docs.microsoft.com/en-us/azure/virtual-machines/spot-vms - Eviction VMs can be evicted based on capacity or the max price you set. When creating an Azure Spot Virtual Machine, you can set the eviction policy to Deallocate (default) or Delete. As well, pricing is variable. Even though there is no SLA (for obvious reasons), this is not the major risk to using spot instances. Your account is limited to the number of any instance type you have per region, and so the limit on spot instances is not different than that. They should cost less than regular VMs though.

You have an Azure Container Instance with the DNS label "mycontainer". What is the public Fully-Qualified Domain Name (FQDN) for that instance? https://docs.microsoft.com/en-us/azure/container-instances/container-instances-overview - mycontainer.(azureregion).azurecontainer.io Azure Container Instances enables exposing your container groups directly to the internet with an IP address and a fully qualified domain name (FQDN). When you create a container instance, you can specify a custom DNS name label so your application is reachable at customlabel.azureregion.azurecontainer.io. All Azure data resources (Cosmos DB, SQL Database, Redis Cache, etc) must belong to one and only one....? https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/overview - Resource Group Each resource can exist in only one resource group. However, you can move a resource from one resource group to another group. The resources inside the resource group do not have to exist in the same region as the resource group. Which library allows you to develop and test Azure Functions locally before deploying into Azure? https://docs.microsoft.com/en-us/azure/azure-functions/functions-develop-local - Core Tools, cross-platform on Windows, macOS and Linux Azure Functions Core Tools provides the core runtime and templates for creating functions, which enable local development. Version 2.X supports development on Windows, Linux and MacOS.

https://docs.microsoft.com/en-us/azure/app-service/overview-managed- identity?tabs=dotnet - System-assigned Managed Identity, User-Assigned Managed Identity Azure Key Vault is a service that provides centralized secrets management, with full control over access policies and audit history. In order to read secrets from Key Vault, you need to have a vault created and give your app permission to access it. You must create a managed identity and assign it permissions to read the vault, or you can use a user-assigned identity. You have a new project coming up and the development team would like to use Go as the programming language. At least some of the new project needs to be handled by Azure Functions. Go is not a native language supported by Functions. What is a feature of Azure Functions that you can use to implement Go code? https://docs.microsoft.com/en-us/azure/azure-functions/functions-custom-handlers - Custom Handlers Every Functions app is executed by a language-specific handler. While Azure Functions features many language handlers by default, there are cases where you may want to use other languages or runtimes. Custom handlers are lightweight web servers that receive events from the Functions host. Any language that supports HTTP primitives can implement a custom handler. Which feature within Azure collects all of the logs from various resources into a central dashboard, where you can run queries, view graphs, and create alerts on certain events? https://docs.microsoft.com/en-us/azure/azure-monitor/overview - Azure Monitor Azure Monitor - a centralized dashboard that collects all the logs, metrics and events from your resources What does the PowerShell command 'Get-AzVMImageSku - Location "EastUS" - PublisherName "MicrosoftWindowsServer" - Offer "WindowsServer"' return?

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-manage-vm - A list of publicly available Windows Server OS images in the EastUS region. A list of publicly available Windows Server OS images in the EastUS region. There could be dozens of Windows VM images available to you. I get 62 when I run this command myself. What is an App Service Plan? https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans - A serverless environment in which App services and Functions can run. In App Service (Web Apps, API Apps, or Mobile Apps), an app always runs in an App Service plan. In addition, Azure Functions also has the option of running in an App Service plan. An App Service plan defines a set of compute resources for a web app to run. These compute resources are analogous to the server farm in conventional web hosting. One or more apps can be configured to run on the same computing resources (or in the same App Service plan). You are a developer for Acme Inc. Your application uses a Service Bus Queue to receive messages from an outside app, and your have a number of applications processing those messages. You have recently been told that the business is seeing a problem of some messages in an unusal circumstance being processed twice. When you debug the problem, it's a message that was successfully processed by the job but then the program fails before the queue could be updated to delete the message. Your boss wants you to fix the problem such that it might be better if a message was missed than if a message was processed twice. What do you do to ensure messages do not get processed twice, even if sometimes they don't get processed? - Switch the queue to "at-most-once" delivery At-most-once delivery is designed for this In ASP.NET, how do you write a message to the application diagnostics log that only shows up when the user has enabled warning level messages?

Gremlin API allows users to make graph queries and stores data as edges and vertices. Cassandra API stores data in column-oriented schema. Core (SQL) API stores data in document format. Table API stores data in key/value format. Which ASP.NET language is cross-platform and can run on both Windows and Linux Web Apps? https://docs.microsoft.com/en-us/azure/app-service/overview - ASP.NET Core ASP.NET Core is a cross-platform version of ASP.NET. Ruby and Python are only natively supported on Linux. ASP.NET 4 is only supported on Windows. You have a Timer Trigger Function that uses "0 0 0 1 1 *" as it's timer setting. How often will the function run? https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings- timer?tabs=csharp#ncrontab-expressions - At midnight on Jan 1st only CRON uses a "{second} {minute} {hour} {day} {month} {day-of-week}" format for expressions. The first "0" means that it runs when the second equals 0. The first three "0" means 0:00 or midnight. The fourth "1" means on the 1st day of the month. The fifth "1" means January. So the function triggers once per year, on Jan 1 at midnight. Happy new year! What can you do to ensure your Azure Redis Cache removes keys proactively instead of waiting until memory is full? https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices - Set an expiration value on your keys Setting an expiration value for keys allows the system to keep the cache size smaller for you, and you never need to worry about reaching maximum cache size.

What container image formats does Azure Container Registry support? https://docs.microsoft.com/en-us/azure/container-registry/container-registry-image-formats

  • Docker images, OCI images, OCI artifacts, Helm charts The following Docker container image formats are supported: Docker images, OCI images, OCI artifacts, Helm charts Which of the following Azure CLI commands is considered part of the ACR Tasks set? https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick- task - az acr build ACR Tasks is a suite of features within Azure Container Registry that provides streamlined and efficient Docker container image builds in Azure. az acr build is an ACR Task which queues a quick build, providing streaming logs for an Azure Container Registry. What is the Azure CLI command to do live streaming of application log files? https://docs.microsoft.com/en-us/learn/modules/capture-application-logs-app-service/2- enable-and-configure-app-service-application-logging - az webapp log will retrive the log, and the tail operator will read the last lines of the log and keep a live stream of it going. How can you create a shared access signature and modify the expiry date and time after it's already been created? https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview - A shared access signature (SAS) provides secure delegated access to resources in your storage account. With a SAS, you have granular control over how a client can access your data. A stored access policy is defined on a resource container, which can be a blob container, table, queue, or file share. The stored access policy can be used to manage constraints for one or