Skip to content
The Chat Archive
gpt-4o-2024-05-13· OpenAI WildChat-4.8M (AI2)

Question #31Topic 1 You are developing an application that applies a set of governance…

  1. User

    Question #31Topic 1 You are developing an application that applies a set of governance policies for internal and external services, as well as for applications. You develop a stateful ASP.NET Core 2.1 web application named PolicyApp and deploy it to an Azure App Service Web App. The PolicyApp reacts to events from Azure Event Grid and performs policy actions based on those events. You have the following requirements: ✑ Authentication events must be used to monitor users when they sign in and sign out. ✑ All authentication events must be processed by PolicyApp. ✑ Sign outs must be processed as fast as possible. What should you do? A. Create a new Azure Event Grid subscription for all authentication events. Use the subscription to process sign-out events. B. Create a separate Azure Event Grid handler for sign-in and sign-out events. C. Create separate Azure Event Grid topics and subscriptions for sign-in and sign-out events. D. Add a subject prefix to sign-out events. Create an Azure Event Grid subscription. Configure the subscription to use the subjectBeginsWith filter. Question #32Topic 1 HOTSPOT - You are developing a C++ application that compiles to a native application named process.exe. The application accepts images as input and returns images in one of the following image formats: GIF, PNG, or JPEG. You must deploy the application as an Azure Function. You need to configure the function and host json files. How should you complete the json files? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

    Question #33Topic 1 HOTSPOT

    You are developing an Azure Static Web app that contains training materials for a tool company. Each tool’s training material is contained in a static web page that is linked from the tool’s publicly available description page.

    A user must be authenticated using Azure AD prior to viewing training.

    You need to ensure that the user can view training material pages after authentication.

    How should you complete the configuration file? To answer, select the appropriate options in the answer area.

    NOTE: Each correct selection is worth one point.

    Question #34Topic 1 HOTSPOT

    You are authoring a set of nested Azure Resource Manager templates to deploy Azure resources. You author an Azure Resource Manager template named mainTemplate.json that contains the following linked templates: linkedTemplate1.json, linkedTemplate2.json.

    You add parameters to a parameters template file named mainTemplate.parameters,json. You save all templates on a local device in the C:\templates\ folder.

    You have the following requirements:

    • Store the templates in Azure for later deployment. • Enable versioning of the templates. • Manage access to the templates by using Azure RBAC. • Ensure that users have read-only access to the templates. • Allow users to deploy the templates.

    You need to store the templates in Azure.

    How should you complete the command? To answer, select the appropriate options in the answer area.

    NOTE: Each correct selection is worth one point.

    Question #35Topic 1 HOTSPOT

    You are developing a service where customers can report news events from a browser using Azure Web PubSub. The service is implemented as an Azure Function App that uses the JSON WebSocket subprotocol to receive news events.

    You need to implement the bindings for the Azure Function App.

    How should you configure the binding? To answer, select the appropriate options in the answer area.

    NOTE: Each correct selection is worth one point.

    Question #36Topic 1 HOTSPOT

    You are building a software-as-a-service (SaaS) application that analyzes DNA data that will run on Azure virtual machines (VMs) in an availability zone. The data is stored on managed disks attached to the VM. The performance of the analysis is determined by the speed of the disk attached to the VM.

    You have the following requirements:

    • The application must be able to quickly revert to the previous day’s data if a systemic error is detected. • The application must minimize downtime in the case of an Azure datacenter outage.

    You need to provision the managed disk for the VM to maximize performance while meeting the requirements.

    Which type of Azure Managed Disk should you use? To answer, select the appropriate options in the answer area.

    NOTE: Each correct selection is worth one point.

    Question #37Topic 1 HOTSPOT

    You are developing an application that includes two Docker containers.

    The application must meet the following requirements:

    • The containers must not run as root. • The containers must be deployed to Azure Container Instances by using a YAML file. • The containers must share a lifecycle, resources, local network, and storage volume. • The storage volume must persist through container crashes. • The storage volume must be deployed on stop or restart of the containers.

    You need to configure Azure Container Instances for the application.

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

    NOTE: Each correct selection is worth one point.

    Topic 2 - Question Set 2 Question #1Topic 2 HOTSPOT - 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. Hot Area:

    Question #2Topic 2 DRAG DROP - You are a developer for a software as a service (SaaS) company that uses an Azure Function to process orders. The Azure Function currently runs on an Azure Function app that is triggered by an Azure Storage queue. You are preparing to migrate the Azure Function to Kubernetes using Kubernetes-based Event Driven Autoscaling (KEDA). You need to configure Kubernetes Custom Resource Definitions (CRD) for the Azure Function. Which CRDs should you configure? To answer, drag the appropriate CRD types to the correct locations. Each CRD 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. Select and Place:

    Question #3Topic 2 HOTSPOT - You are creating a CLI script that creates an Azure web app and related services in Azure App Service. The web app uses the following variables:

    You need to automatically deploy code from GitHub to the newly created web app. How should you complete the script? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

  2. Assistant

    Let's address each of the questions one by one:

    Question #31

    For the requirements to handle sign-in and sign-out events with priorities given to processing sign-out events as fast as possible:

    Answer: D. Add a subject prefix to sign-out events. Create an Azure Event Grid subscription. Configure the subscription to use the subjectBeginsWith filter.

    This approach allows you to filter and prioritize specific events (sign-out events) ensuring they are processed immediately.

    Question #32

    For deploying a native application as an Azure Function, the function and host JSON configurations typically involve setting runtimes and specific settings based on the nature of the application. Assuming we need specific additions to these files for the C++ compiled application, we can adjust the properties accordingly. Given that Azure Functions does not natively support running compiled C++ code directly, one approach is to use an interpreter like PowerShell or to convert the C++ into a library callable from a supported language.

    Since there are no specific configurations provided in your question, the completion might look like:

    // function.json
    {
      "scriptFile": "process.exe",
      "entryPoint": "ProcessImages",
      "bindings": [
        {
          "name": "inputImage",
          "type": "blobTrigger",
          "dataType": "binary",
          "direction": "in",
          "path": "images/{name}"
        },
        {
          "name": "outputImage",
          "type": "blob",
          "direction": "out",
          "path": "converted-images/{name}"
        }
      ]
    }
    
    // host.json
    {
      "version": "2.0",
      "extensions": {
        "http": {
          "routePrefix": ""
        }
      }
    }
    

    Question #33

    For configuring an Azure Static Web App with Azure AD authentication:

    Completion:

    {
      "routes": [
        {
          "route": "/training-material/*",
          "allowedRoles": ["authenticated"]
        }
      ],
      "auth": {
        "identityProviders": {
          "azureActiveDirectory": {
            "registration": {
              "openIdIssuer": "https://login.microsoftonline.com/{tenant-id}",
              "clientIdSettingName": "AUTH_AAD_CLIENT_ID",
              "clientSecretSettingName": "AUTH_AAD_CLIENT_SECRET"
            }
          }
        }
      }
    }
    

    Question #34

    For storing templates in Azure with the capabilities you mentioned, you'll typically use Azure Blob Storage:

    Completion:

    az storage blob upload-batch -d my-container -s C:\templates
    

    You would set up an Azure Blob Storage with appropriate access policies.

    Question #35

    For Azure Function App bindings with Web PubSub:

    Completion:

    {
      "type": "webpubsubTrigger",
      "name": "newsEvent",
      "connection": "AzureWebPubSubConnection",
      "hub": "newsHub",
      "dataType": "binary",
      "direction": "in"
    }
    

    Question #36

    For provisioning managed disks:

    Completion:

    • Disk Type: Premium SSD
    • Redundancy: Zone-redundant storage (ZRS)

    Question #37

    Configuring Azure Container Instances using a YAML file for requirements provided:

    Completion:

    apiVersion: '2019-12-01'
    location: eastus
    name: myContainerGroup
    properties:
      containers:
      - name: container1
        properties:
          image: myimage:latest
          resources:
            requests:
              cpu: 1.0
              memoryInGb: 1.5
      osType: Linux
      volumes:
      - name: myStorageVol
        azureFile:
          shareName: myshare
          storageAccountName: mystorageaccount
          storageAccountKey: mystorageaccountkey
    restartPolicy: Always
    

    Question #1, Topic 2

    Configuring the App Service Plan based on requirements will look something like this:

    {
      "pricingTier": "Standard|S1",
      "operatingSystem": "Windows",
      "scmType": "LocalGit",
      "isolation": "On"
    }
    

    Question #2, Topic 2

    Migrating Azure Function to Kubernetes with KEDA:

    Completion:

    apiVersion: keda.sh/v1alpha1
    kind: ScaledObject
    metadata:
      name: azure-function
      namespace: default
    spec:
      scaleTargetRef:
        kind: Deployment
        name: azure-function
      triggers:
      - type: azure-queue
        metadata:
          queueName: orders
          connection: StorageConnectionString
    

    Question #3, Topic 2

    Creating a CLI script to deploy code from GitHub:

    Completion:

    az webapp deployment source config --name MyWebApp --resource-group MyResourceGroup --repo-url https://github.com/myrepo --branch main --manual-integration
    

    Each of these configurations ensures adherence to best practices and functional requirements based on the provided context.

  3. User

    Question #4Topic 2 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: Trigger the photo processing from Blob storage events. Does the solution meet the goal? A. Yes B. No Question #5Topic 2 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: Update the web.config file to include the applicationInitialization configuration element. Specify custom initialization actions to run the scripts. Does the solution meet the goal? A. No B. Yes Question #6Topic 2 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: Enable auto swap for the Testing slot. Deploy the app to the Testing slot. Does the solution meet the goal? A. No B. Yes

    Question #7Topic 2 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. No B. Yes

    Question #8Topic 2 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: Convert the Azure Storage account to a BlockBlobStorage storage account. Does the solution meet the goal? A. Yes B. No Question #9Topic 2 HOTSPOT - You are developing an Azure Web App. You configure TLS mutual authentication for the web app. You need to validate the client certificate in the web app. To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

    Question #10Topic 2 DRAG DROP - You are developing a Docker/Go using Azure App Service Web App for Containers. You plan to run the container in an App Service on Linux. You identify a Docker container image to use. None of your current resource groups reside in a location that supports Linux. You must minimize the number of resource groups required. You need to create the application and perform an initial deployment. Which three Azure CLI commands should you use to develop the solution? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order. Select and Place:

    Question #11Topic 2 DRAG DROP - Fourth Coffee has an ASP.NET Core web app that runs in Docker. The app is mapped to the www.fourthcoffee.com domain. Fourth Coffee is migrating this application to Azure. You need to provision an App Service Web App to host this docker image and map the custom domain to the App Service web app. A resource group named FourthCoffeePublicWebResourceGroup has been created in the WestUS region that contains an App Service Plan named AppServiceLinuxDockerPlan. Which order should the CLI commands be used to develop the solution? To answer, move all of the Azure CLI commands from the list of commands to the answer area and arrange them in the correct order. Select and Place:

    Question #12Topic 2 DRAG DROP - You are developing a serverless Java application on Azure. You create a new Azure Key Vault to work with secrets from a new Azure Functions application. The application must meet the following requirements: ✑ Reference the Azure Key Vault without requiring any changes to the Java code. ✑ Dynamically add and remove instances of the Azure Functions host based on the number of incoming application events. ✑ Ensure that instances are perpetually warm to avoid any cold starts. ✑ Connect to a VNet. ✑ Authentication to the Azure Key Vault instance must be removed if the Azure Function application is deleted. You need to grant the Azure Functions application access to the Azure Key Vault. 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. Select and Place:

    Question #13Topic 2 You develop a website. You plan to host the website in Azure. You expect the website to experience high traffic volumes after it is published. You must ensure that the website remains available and responsive while minimizing cost. You need to deploy the website. What should you do? A. Deploy the website to a virtual machine. Configure the virtual machine to automatically scale when the CPU load is high. B. Deploy the website to an App Service that uses the Shared service tier. Configure the App Service plan to automatically scale when the CPU load is high. C. Deploy the website to a virtual machine. Configure a Scale Set to increase the virtual machine instance count when the CPU load is high. D. Deploy the website to an App Service that uses the Standard service tier. Configure the App Service plan to automatically scale when the CPU load is high.

  4. Assistant

    Question #4

    The solution proposes triggering the photo processing from Blob storage events:

    Answer: A. Yes

    This solution meets the requirement because Azure Blob Storage events can trigger Azure Functions or other services to process the photo as soon as it is uploaded, which can start the processing in less than one minute.

    Question #5

    The solution proposes updating the web.config file to include the applicationInitialization configuration element:

    Answer: A. No

    Updating web.config doesn't address the requirement to ensure scripts run before the swap because applicationInitialization is used for warming up the app but does not control the swap operation.

    Question #6

    The solution proposes enabling auto swap for the Testing slot and deploying the app to this slot:

    Answer: A. No

    Enabling auto swap on the Testing slot does not ensure that resources are available before a swap to the Production slot. The goal is to ensure the conditions are met before swapping to Production.

    Question #7

    The solution proposes disabling auto swap, updating the app with a method named statuscheck to run the scripts, and then re-enabling auto swap and deploying the app:

    Answer: A. No

    Simply adding a statuscheck method doesn't ensure the execution of scripts prior to swapping. The swap process itself needs to ensure the checks are in place.

    Question #8

    The solution proposes converting the storage account to a BlockBlobStorage storage account:

    Answer: B. No

    Changing the type of storage account does not inherently trigger photo processing. The solution should focus on using Blob storage events or other mechanisms to start processing.

    Question #9

    To validate the client certificate in an Azure Web App configured for TLS mutual authentication:

    Completion:

    • To get the client's certificate: Use the client certificate in the X-ARR-ClientCert header.
    • Verify the certificate by: Validating against the trusted root in your application code.
    # Example completion:
    REQUEST_METHOD: X-ARR-ClientCert
    CERTIFICATE_VALIDATION: Application code
    

    Question #10

    To develop and deploy the Docker container in Azure App Service Web App for Containers:

    Completion:

    1. Create the resource group.
    2. Create the App Service plan.
    3. Create the web app with the Docker image.
    az group create --name <resource-group-name> --location <location>
    az appservice plan create --name <app-service-plan-name> --resource-group <resource-group-name> --sku B1 --is-linux
    az webapp create --resource-group <resource-group-name> --plan <app-service-plan-name> --name <app-name> --deployment-container-image-name <image-name>
    

    Question #11

    Provisioning an App Service Web App for Docker and mapping a custom domain:

    Completion:

    1. Create the web app.
    2. Configure the custom domain.
    3. Configure SSL.
    az webapp create --resource-group FourthCoffeePublicWebResourceGroup --plan AppServiceLinuxDockerPlan --name fourthcoffeewebapp --deployment-container-image-name <docker-image>
    az webapp config hostname add --webapp-name fourthcoffeewebapp --resource-group FourthCoffeePublicWebResourceGroup --hostname www.fourthcoffee.com
    az webapp config ssl bind --name fourthcoffeewebapp --resource-group FourthCoffeePublicWebResourceGroup --certificate-thumbprint <thumbprint> --ssl-type SNI
    

    Question #12

    Granting Azure Function access to Azure Key Vault:

    Completion:

    1. Assign a managed identity to the Azure Function.
    2. Update the Key Vault access policies.
    3. Configure the Azure Function to use managed identity.
    az functionapp identity assign --resource-group <resource-group> --name <function-app>
    az keyvault set-policy --name <key-vault> --object-id <identity-object-id> --secret-permissions get list
    # No CLI command needed for integrating managed identity in Function App configuration directly through the portal.
    

    Question #13

    To ensure the website remains available and responsive while minimizing cost:

    Answer: D. Deploy the website to an App Service that uses the Standard service tier. Configure the App Service plan to automatically scale when the CPU load is high.

    Using an App Service in the Standard tier with auto-scaling capabilities is a cost-effective method to handle high traffic volumes while ensuring responsiveness and availability. Deploying to a Standard tier provides better scaling features compared to Shared.

  5. User

    Question #14Topic 2 HOTSPOT - A company is developing a Java web app. The web app code is hosted in a GitHub repository located at https://github.com/Contoso/webapp. The web app must be evaluated before it is moved to production. You must deploy the initial code release to a deployment slot named staging. You need to create the web app and deploy the code. How should you complete the commands? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

    Question #15Topic 2 HOTSPOT - You have a web service that is used to pay for food deliveries. The web service uses Azure Cosmos DB as the data store. You plan to add a new feature that allows users to set a tip amount. The new feature requires that a property named tip on the document in Cosmos DB must be present and contain a numeric value. There are many existing websites and mobile apps that use the web service that will not be updated to set the tip property for some time. How should you complete the trigger? NOTE: Each correct selection is worth one point. Hot Area:

    Question #16Topic 2 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: Use the Durable Function async pattern to process the blob data. Does the solution meet the goal? A. Yes B. No

    Question #17Topic 2 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 Question #18Topic 2 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 Question #19Topic 2 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 Question #20Topic 2 You are developing an application that uses Azure Blob storage. The application must read the transaction logs of all the changes that occur to the blobs and the blob metadata in the storage account for auditing purposes. The changes must be in the order in which they occurred, include only create, update, delete, and copy operations and be retained for compliance reasons. You need to process the transaction logs asynchronously. What should you do? A. Process all Azure Blob storage events by using Azure Event Grid with a subscriber Azure Function app. B. Enable the change feed on the storage account and process all changes for available events. C. Process all Azure Storage Analytics logs for successful blob events. D. Use the Azure Monitor HTTP Data Collector API and scan the request body for successful blob events.

    Question #21Topic 2 DRAG DROP - You plan to create a Docker image that runs an ASP.NET Core application named ContosoApp. You have a setup script named setupScript.ps1 and a series of application files including ContosoApp.dll. You need to create a Dockerfile document that meets the following requirements: ✑ Call setupScripts.ps1 when the container is built. ✑ Run ContosoApp.dll when the container starts. The Dockerfile document must be created in the same folder where ContosoApp.dll and setupScript.ps1 are stored. Which five commands should you use to develop the solution? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order. Select and Place:

    Question #22Topic 2 You are developing an Azure Function App that processes images that are uploaded to an Azure Blob container. Images must be processed as quickly as possible after they are uploaded, and the solution must minimize latency. You create code to process images when the Function App is triggered. You need to configure the Function App. What should you do? A. Use an App Service plan. Configure the Function App to use an Azure Blob Storage input trigger. B. Use a Consumption plan. Configure the Function App to use an Azure Blob Storage trigger. C. Use a Consumption plan. Configure the Function App to use a Timer trigger. D. Use an App Service plan. Configure the Function App to use an Azure Blob Storage trigger. E. Use a Consumption plan. Configure the Function App to use an Azure Blob Storage input trigger.

    Question #23Topic 2 HOTSPOT - You are configuring a new development environment for a Java application. The environment requires a Virtual Machine Scale Set (VMSS), several storage accounts, and networking components. The VMSS must not be created until the storage accounts have been successfully created and an associated load balancer and virtual network is configured. How should you complete the Azure Resource Manager template? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

  6. Assistant

    Question #14

    To create the web app and deploy the code from a GitHub repository to a staging slot:

    Completion:

    az webapp create --name mywebapp --resource-group myResourceGroup --plan myAppServicePlan
    
    az webapp deployment slot create --name mywebapp --resource-group myResourceGroup --slot staging
    
    az webapp deployment source config --name mywebapp --resource-group myResourceGroup --slot staging --repo-url https://github.com/Contoso/webapp --branch main --manual-integration
    

    Question #15

    To ensure the tip property is present and contains a numeric value in the Cosmos DB documents, you would need to set up a Cosmos DB trigger.

    Completion:

    {
        "bindings": [
            {
                "type": "cosmosDBTrigger",
                "name": "inputDocument",
                "direction": "in",
                "databaseName": "FoodDeliveryDB",
                "collectionName": "Orders",
                "connectionStringSetting": "CosmosDBConnection",
                "leaseCollectionName": "leases",
                "createLeaseCollectionIfNotExists": true
            }
        ]
    }
    

    Ensure your function's code includes validation for the tip property.

    Question #16

    Using the Durable Function async pattern to process blob data:

    Answer: A. Yes

    Durable Functions are designed to handle long-running operations and can prevent timeout issues by splitting the work into multiple steps.

    Question #17

    Passing the HTTP trigger payload into an Azure Service Bus queue for processing:

    Answer: A. Yes

    This solution offloads the work to another process, allowing the HTTP function to return immediately and avoiding timeout issues.

    Question #18

    Configuring the app to use an App Service hosting plan and enabling the Always On setting:

    Answer: B. No

    Although Always On prevents the function app from idling, it doesn’t solve the issue of functions timing out after four minutes. Durable Functions or queue-based processing is required.

    Question #19

    Moving photo processing to an Azure Function triggered from the blob upload:

    Answer: A. Yes

    An Azure Function triggered by blob storage can handle the processing immediately as the blob is uploaded, meeting the requirement for timely processing.

    Question #20

    Processing the transaction logs asynchronously and ensuring they include only the specified operations:

    Answer: B. Enable the change feed on the storage account and process all changes for available events.

    Change feed provides a reliable log of ordered changes (create, update, delete) that you can process.

    Question #21

    Creating a Dockerfile to call setupScript.ps1 and run ContosoApp.dll:

    Completion:

    FROM mcr.microsoft.com/dotnet/core/runtime:3.1
    WORKDIR /app
    COPY . .
    RUN powershell -File setupScript.ps1
    ENTRYPOINT ["dotnet", "ContosoApp.dll"]
    

    Question #22

    Configuring the Function App to process images quickly with minimal latency:

    Answer: B. Use a Consumption plan. Configure the Function App to use an Azure Blob Storage trigger.

    A Consumption plan with a Blob Storage trigger minimizes latency and ensures the function app scales automatically as needed.

    Question #23

    Ensuring the VMSS isn't created until the storage accounts and networking components are configured:

    Completion:

    {
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "apiVersion": "2019-06-01",
          "name": "[concat(parameters('storageAccountNamePrefix'), '001')]",
          "location": "[parameters('location')]",
          "sku": {
            "name": "Standard_LRS"
          },
          "kind": "StorageV2",
          "properties": {}
        },
        {
          "type": "Microsoft.Network/virtualNetworks",
          "apiVersion": "2019-07-01",
          "name": "[parameters('virtualNetworkName')]",
          "location": "[parameters('location')]",
          "properties": {
            "addressSpace": {
              "addressPrefixes": [
                "[parameters('addressPrefix')]"
              ]
            },
            "subnets": [
              {
                "name": "[parameters('subnetName')]",
                "properties": {
                  "addressPrefix": "[parameters('subnetPrefix')]"
                }
              }
            ]
          }
        },
        {
          "type": "Microsoft.Network/loadBalancers",
          "apiVersion": "2019-07-01",
          "name": "[parameters('loadBalancerName')]",
          "location": "[parameters('location')]",
          "properties": {
            // Load Balancer Properties
          }
        },
        {
          "type": "Microsoft.Compute/virtualMachineScaleSets",
          "apiVersion": "2019-03-01",
          "name": "[parameters('vmssName')]",
          "location": "[parameters('location')]",
          "dependsOn": [
            "[resourceId('Microsoft.Storage/storageAccounts', concat(parameters('storageAccountNamePrefix'), '001'))]",
            "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
            "[resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName'))]"
          ],
          "properties": {
            // VMSS Properties
          }
        }
      ]
    }
    
  7. User

    Question #24Topic 2 HOTSPOT - You are developing an Azure Function App by using Visual Studio. The app will process orders input by an Azure Web App. The web app places the order information into Azure Queue Storage. You need to review the Azure Function App code shown below.

    NOTE: Each correct selection is worth one point. Hot Area:

    Question #25Topic 2 DRAG DROP - You are developing a solution for a hospital to support the following use cases: ✑ The most recent patient status details must be retrieved even if multiple users in different locations have updated the patient record. ✑ Patient health monitoring data retrieved must be the current version or the prior version. ✑ After a patient is discharged and all charges have been assessed, the patient billing record contains the final charges. You provision a Cosmos DB NoSQL database and set the default consistency level for the database account to Strong. You set the value for Indexing Mode to Consistent. You need to minimize latency and any impact to the availability of the solution. You must override the default consistency level at the query level to meet the required consistency guarantees for the scenarios. Which consistency levels should you implement? To answer, drag the appropriate consistency levels to the correct requirements. Each consistency level 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. Select and Place:

    Question #26Topic 2 HOTSPOT - You are configuring a development environment for your team. You deploy the latest Visual Studio image from the Azure Marketplace to your Azure subscription. The development environment requires several software development kits (SDKs) and third-party components to support application development across the organization. You install and customize the deployed virtual machine (VM) for your development team. The customized VM must be saved to allow provisioning of a new team member development environment. You need to save the customized VM for future provisioning. Which tools or services should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

    Question #27Topic 2 You are preparing to deploy a website to an Azure Web App from a GitHub repository. The website includes static content generated by a script. You plan to use the Azure Web App continuous deployment feature. You need to run the static generation script before the website starts serving traffic. What are two possible ways to achieve this goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point. A. Add the path to the static content generation tool to WEBSITE_RUN_FROM_PACKAGE setting in the host.json file. B. Add a PreBuild target in the websites csproj project file that runs the static content generation script. C. Create a file named run.cmd in the folder /run that calls a script which generates the static content and deploys the website. D. Create a file named .deployment in the root of the repository that calls a script which generates the static content and deploys the website. Question #28Topic 2 DRAG DROP - 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. Select and Place:

    Question #29Topic 2 DRAG DROP - You are preparing to deploy an Azure virtual machine (VM)-based application. The VMs that run the application have the following requirements: ✑ When a VM is provisioned the firewall must be automatically configured before it can access Azure resources. ✑ Supporting services must be installed by using an Azure PowerShell script that is stored in Azure Storage. You need to ensure that the requirements are met. Which features should you use? To answer, drag the appropriate features to the correct requirements. Each feature 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. Select and Place:

    Question #30Topic 2 HOTSPOT - A company is developing a Node.js web app. The web app code is hosted in a GitHub repository located at https://github.com/TailSpinToys/webapp. The web app must be reviewed before it is moved to production. You must deploy the initial code release to a deployment slot named review. You need to create the web app and deploy the code. How should you complete the commands? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

    Question #31Topic 2 HOTSPOT - You are developing an application that needs access to an Azure virtual machine (VM). The access lifecycle for the application must be associated with the VM service instance. You need to enable managed identity for the VM. How should you complete the PowerShell segment? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

    Question #32Topic 2 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: Create an Azure Function app that uses the Consumption hosting model and that is triggered from the blob upload. Does the solution meet the goal? A. Yes B. No Question #33Topic 2 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: Update the app with a method named statuscheck to run the scripts. Update the app settings for the app. Set the WEBSITE_SWAP_WARMUP_PING_PATH and WEBSITE_SWAP_WARMUP_PING_STATUSES with a path to the new method and appropriate response codes. Does the solution meet the goal? A. No B. Yes

  8. Assistant

    Question #24

    You are developing an Azure Function App that processes orders from an Azure Web App by reading from Azure Queue Storage.

    public static class ProcessOrderFunction
    {
        [FunctionName("ProcessOrderFunction")]
        public static void Run([QueueTrigger("orders", Connection = "AzureWebJobsStorage")] string order, ILogger log)
        {
            log.LogInformation($"C# Queue trigger function processed: {order}");
        }
    }
    

    Hot Area:

    • using Microsoft.Azure.WebJobs;
    • using Microsoft.Extensions.Logging;
    • Run

    Question #25

    You need to select the proper consistency levels for various scenarios in Cosmos DB.

    Drag and Drop:

    1. The most recent patient status details must be retrieved even if multiple users in different locations have updated the patient record.

      • Consistency Level: Strong
    2. Patient health monitoring data retrieved must be the current version or the prior version.

      • Consistency Level: Bounded Staleness
    3. After a patient is discharged and all charges have been assessed, the patient billing record contains the final charges.

      • Consistency Level: Eventual

    Question #26

    You need to save a customized virtual machine for future provisioning:

    Hot Area:

    1. Virtual Machine Scale Sets (VMSS):

      • Not the correct choice; VMSS is for scaling virtual machines and not saving VM images.
    2. Azure Resource Manager (ARM) Template:

      • Partially useful for specifying configurations and deployments, but not directly saving VMs.
    3. Azure Disk Snapshot:

      • Correct for capturing a disk state at a point in time, but not as comprehensive as an image.
    4. Azure Image:

      • Correct for creating a reusable template for creating new virtual machines with your customized setup.

    Question #27

    Achieving static content generation before the website serves traffic:

    Possible Solutions:

    • D. Create a file named .deployment in the root of the repository that calls a script which generates the static content and deploys the website.
    • C. Create a file named run.cmd in the folder /run that calls a script which generates the static content and deploys the website.

    Both methods correctly initiate a script that generates the static content before the web app starts serving traffic.

    Question #28

    Creating a copy of the storage account in another region:

    Drag and Drop:

    1. Create a new storage account in another region.
    2. Enable replication, such as Geo-Replication (if not already configured) on the source storage account.
    3. Trigger or monitor the replication and ensure data consistency in the new region.

    Question #29

    Ensuring automation of firewall configuration and running PowerShell scripts on VM provisioning:

    Drag and Drop:

    1. When a VM is provisioned the firewall must be automatically configured before it can access Azure resources.

      • Azure VM Extensions
    2. Supporting services must be installed by using an Azure PowerShell script that is stored in Azure Storage.

      • Custom Script Extension

    Question #30

    To create the web app and deploy the initial code release to a deployment slot named review, you would use the following commands:

    Hot Area:

    1. Creating the web app:

      • az webapp create --name mywebapp --resource-group myResourceGroup --plan myAppServicePlan
    2. Creating the deployment slot:

      • az webapp deployment slot create --name mywebapp --resource-group myResourceGroup --slot review
    3. Configuring deployment from the GitHub repository:

      • az webapp deployment source config --name mywebapp --resource-group myResourceGroup --slot review --repo-url https://github.com/TailSpinToys/webapp --branch main --manual-integration

    Question #31

    To enable managed identity for the VM:

    Hot Area:

    1. Assign managed identity:

      Set-AzVM -ResourceGroupName "myResourceGroup" -Name "myVM" -IdentityType SystemAssigned
      
    2. Grant access to a resource:

      New-AzRoleAssignment -ObjectId (Get-AzVM -ResourceGroupName "myResourceGroup" -Name "myVM").Identity.PrincipalId -RoleDefinitionName "Reader" -Scope "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup"
      

    Question #32

    Creating an Azure Function app using the Consumption plan to process the images:

    Answer: A. Yes

    An Azure Function app on the Consumption plan triggered by blob uploads can start processing the photos quickly and meets the requirement of starting processing in less than one minute.

    Question #33

    Ensuring scripts run and resources are available before a swap operation occurs:

    Solution: Update the app with a method named statuscheck to run the scripts. Update the app settings for the app. Set the WEBSITE_SWAP_WARMUP_PING_PATH and WEBSITE_SWAP_WARMUP_PING_STATUSES with a path to the new method and appropriate response codes.

    Answer: B. Yes

    This solution configures the warm-up path settings correctly to ensure the scripts run and resources are ready before the swap.

  9. User

    Question #34Topic 2 HOTSPOT - You create the following PowerShell script:

    For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point. Hot Area:

    Question #35Topic 2 DRAG DROP - You are developing an Azure Function app. The app must meet the following requirements: ✑ Enable developers to write the functions by using the Rust language. ✑ Declaratively connect to an Azure Blob Storage account. You need to implement the app. Which Azure Function app features should you use? To answer, drag the appropriate features to the correct requirements. Each feature 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. Select and Place:

    Question #36Topic 2 HOTSPOT - You are developing an ASP.NET Core web application. You plan to deploy the application to Azure Web App for Containers. The application needs to store runtime diagnostic data that must be persisted across application restarts. You have the following code:

    You need to configure the application settings so that diagnostic data is stored as required. How should you configure the web app's settings? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

    Question #37Topic 2 You are developing a web app that is protected by Azure Web Application Firewall (WAF). All traffic to the web app is routed through an Azure Application Gateway instance that is used by multiple web apps. The web app address is contoso.azurewebsites.net. All traffic must be secured with SSL. The Azure Application Gateway instance is used by multiple web apps. You need to configure the Azure Application Gateway for the web app. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point. A. In the Azure Application Gateway's HTTP setting, enable the Use for App service setting. B. Convert the web app to run in an Azure App service environment (ASE). C. Add an authentication certificate for contoso.azurewebsites.net to the Azure Application Gateway. D. In the Azure Application Gateway's HTTP setting, set the value of the Override backend path option to contoso22.azurewebsites.net. Question #38Topic 2 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: Use the Azure Blob Storage change feed to trigger photo processing. Does the solution meet the goal? A. Yes B. No Question #39Topic 2 You are developing a web application that runs as an Azure Web App. The web application stores data in Azure SQL Database and stores files in an Azure Storage account. The web application makes HTTP requests to external services as part of normal operations. The web application is instrumented with Application Insights. The external services are OpenTelemetry compliant. You need to ensure that the customer ID of the signed in user is associated with all operations throughout the overall system. What should you do? A. Add the customer ID for the signed in user to the CorrelationContext in the web application B. On the current SpanContext, set the TraceId to the customer ID for the signed in user C. Set the header Ocp-Apim-Trace to the customer ID for the signed in user D. Create a new SpanContext with the TraceFlags value set to the customer ID for the signed in user

    Question #40Topic 2 HOTSPOT - You are developing an Azure Function App. You develop code by using a language that is not supported by the Azure Function App host. The code language supports HTTP primitives. You must deploy the code to a production Azure Function App environment. You need to configure the app for deployment. Which configuration values should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

    Question #41Topic 2 DRAG DROP - You provision virtual machines (VMs) as development environments. One VM does not start. The VM is stuck in a Windows update process. You attach the OS disk for the affected VM to a recovery VM. You need to correct the issue. In which order should you perform the actions? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order. Select and Place:

    Question #42Topic 2 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: Update the functionTimeout property of the host.json project file to 10 minutes. Does the solution meet the goal? A. Yes B. No Question #43Topic 2 HOTSPOT - You are developing an Azure Durable Function based application that processes a list of input values. The application is monitored using a console application that retrieves JSON data from an Azure Function diagnostic endpoint. During processing a single instance of invalid input does not cause the function to fail. Invalid input must be available to the monitoring application. You need to implement the Azure Durable Function and the monitoring console application. How should you complete the code segments? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

  10. Assistant

    Question #34

    You need to determine whether each of the following statements about Azure Functions in a PowerShell script is true.

    Statements:

    1. The script can be triggered using an HTTP request.

      • Yes: Azure Functions support HTTP triggers which allow functions to be invoked using HTTP requests.
    2. The script can log information to the Azure Monitor logs.

      • Yes: Azure Functions integrate with Azure Monitor and can log information to Azure Monitor logs using built-in logging features.
    3. The script can be scheduled to execute periodically.

      • Yes: Azure Functions can be set up with Timer triggers to execute periodically based on a schedule.

    Question #35

    You are developing an Azure Function app that must meet the following requirements: write functions in Rust, and declaratively connect to an Azure Blob Storage account.

    Drag and Drop:

    1. Enable developers to write the functions by using the Rust language.

      • Custom Handlers
    2. Declaratively connect to an Azure Blob Storage account.

      • Bindings

    Question #36

    To configure the ASP.NET Core web application to store runtime diagnostic data persistently across application restarts:

    Hot Area:

    1. Mount a storage volume to the specified path in the web container:

      • Configure Azure Web App settings to mount an Azure File Share or other storage as a volume to the specified path.
    2. Use a blob storage account:

      • Ensure the application settings are set to use Azure Blob Storage and configure relevant connection strings or storage paths.

    Question #37

    To configure Azure Application Gateway for the web app with SSL requirement:

    Correct Answers:

    1. In the Azure Application Gateway's HTTP setting, enable the Use for App service setting.

      • A. In the Azure Application Gateway's HTTP setting, enable the Use for App service setting.
    2. Add an authentication certificate for contoso.azurewebsites.net to the Azure Application Gateway.

      • C. Add an authentication certificate for contoso.azurewebsites.net to the Azure Application Gateway.

    Question #38

    Using Azure Blob Storage change feed to trigger photo processing for processing uploaded photos:

    Answer: B. No

    Azure Blob Storage change feed provides a log of changes but does not inherently trigger events for photo processing. The correct solution should involve triggering an Azure Function directly from blob uploads.

    Question #39

    Ensuring customer ID is associated with all operations throughout the overall system:

    Answer: A. Add the customer ID for the signed in user to the CorrelationContext in the web application

    Using CorrelationContext helps in propagating the necessary context (like customer ID) through the instrumentation pipeline.

    Question #40

    Configuring an Azure Function App with an unsupported language that relies on HTTP primitives:

    Hot Area:

    1. Select the Runtime Stack:

      • Custom Handler
    2. Set the Handler Path:

      • Provide the relative path to the executable or script.

    Question #41

    Correcting a VM stuck in a Windows update process using a recovery VM:

    Select and Place:

    1. Detach the OS disk from the affected VM and attach it to the recovery VM.
    2. Run the following command to resolve the update issue:
      • Stop the Windows Update service
      • Delete the SoftwareDistribution folder
      • Restart the Windows Update service
    3. Reattach the OS disk back to the affected VM and start it.

    Question #42

    Updating the functionTimeout property of the host.json project file to prevent timeout:

    Answer: B. No

    While the functionTimeout can be adjusted, the property has a maximum limit for Consumption plans that might still be insufficient. Using Durable Functions to better handle long-running operations would be a more appropriate solution.

    Question #43

    Implementing Azure Durable Function and the monitoring console application:

    Hot Area:

    For the Durable Function code:

    public static async Task Run(DurableOrchestrationContext context)
    {
        var inputs = context.GetInput<List<string>>();
        var results = new List<string>();
    
        foreach (var input in inputs)
        {
            string result = await context.CallActivityAsync<string>("ProcessInput", input);
            results.Add(result);
        }
    
        return results;
    }
    

    For the monitoring application to retrieve invalid input:

    using (var client = new HttpClient())
    {
        client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        var response = await client.GetStringAsync("https://functionapp.azurewebsites.net/runtime/webhooks/durabletask/instances/{id}/logs?code={functionkey}");
        Console.WriteLine(response);
    }