All practice questions
972 questions
You need to update a specific metadata tag on an existing Azure Blob Storage blob using the Azure.Storage.Blobs SDK (v12) for C# while ensuring that all other existing metadata key-value pairs on the blob are preserved. Which sequence of steps should you perform?
Drag items to arrange them in the correct order
You are configuring a Standard availability test in Azure Application Insights to monitor a public web application. You need to ensure the test fails if the page load takes longer than a specified duration or if the home page does not contain the word "Welcome".
Which two settings under the Success criteria section of the availability test configuration should you configure? (Select two.)
Select all that apply
You have a private Azure Blob Storage account named `storeorigin` containing static web assets in a container named `images`. You deploy an Azure CDN Standard from Microsoft endpoint to deliver these assets. You must configure the solution so that the CDN endpoint can retrieve the assets using a Shared Access Signature (SAS) token, while ensuring clients can access the assets using clean URLs that do not expose the SAS token. Which sequence of actions should you perform?
Drag items to arrange them in the correct order
An enterprise order processing application sends custom metric telemetry to Azure Application Insights to monitor message queue sizes. A custom metric named 'QueueBacklog' is recorded, and the specific queue's identifier is stored inside a custom dimension named 'QueueName'.
You need to write a Kusto Query Language (KQL) query to find the maximum backlog value for each queue over the last 36 hours. To ensure optimal query performance, you must filter by time range before performing any other operations.
How should you complete the KQL query?
Fill in the blanks below
| where timestamp > ago(36h) and name == "QueueBacklog"
| extend QueueName = (customDimensions.QueueName)
| summarize MaxBacklog = (value) by QueueName
You are developing a backend service in C# using MSAL.NET that runs on an Azure App Service. The App Service has a user-assigned managed identity configured with the Client ID `d29d3368-8f83-4a25-97a1-872f23cf9e3c`. The service must securely access an Azure Key Vault without storing any secrets or certificates in the application configuration. Which two configuration steps should you implement in the C# code? (Select two.)
Select all that apply
An organization has a web application that provides temporary write access to an Azure Blob Storage container named `uploads` for external clients. You must meet the following requirements:
- Enable the security team to revoke access tokens immediately without impacting other clients or rotating the storage account keys.
- Limit the lifetime of individual client tokens to a maximum of 30 minutes.
- Enforce the use of secure connections only.
Which two actions should you perform to meet these requirements?
Select all that apply
You are configuring an Azure CDN endpoint to serve static images for an online catalog. The images are updated infrequently, but users append query parameters such as version numbers (e.g., image.png?v=1.2) to the URLs. You want to ensure that the CDN serves the cached image regardless of any query strings provided in the request to maximize the cache hit ratio and reduce traffic to the origin.
Which query string caching behavior should you configure for the CDN endpoint?
You are configuring telemetry for a C# application using the Application Insights SDK. You instantiate and initialize the telemetry client, but notice that no telemetry data is transmitted to Azure Monitor. You confirm that there are no runtime exceptions, compile errors, or network blockages.
Which of the following is the most likely cause of this behavior?
You are building a C# application to process events from an Azure Event Hub. The application needs to dynamically distribute partitions among multiple running instances of the consumer and checkpoint progress using Azure Blob Storage. Which class from the Azure.Messaging.EventHubs.Processor SDK library should you use as the main client to implement this consumer?
You are developing an integration solution that uses Azure Event Grid to route custom events to a Webhook endpoint. To secure the webhook, you must implement Microsoft Entra ID authentication so that the Webhook only accepts authorized requests from Event Grid. You need to configure the authentication and the subscription.
Which sequence of steps should you perform to complete the configuration?
Drag items to arrange them in the correct order
You are developing a C# service that processes real-time bids for an online auction platform using the Azure Cosmos DB .NET SDK v3. The target container uses `/auctionId` as the partition key. To ensure data consistency, when a new bid is placed, you must atomically create a new bid item of type `Bid` and replace the existing auction summary item of type `AuctionSummary` within the same partition.
Which two of the following code segments must you use to successfully initialize and execute the transactional batch?
Select all that apply
You are developing a C# web application that runs on an Azure App Service. The application must retrieve database connection secrets from an Azure Key Vault. You have already enabled a system-assigned managed identity for the App Service.
You write the following code to access the Key Vault:
csharp
using Azure.Identity;
using Azure.Security.KeyVault.Secrets;
// ...
var client = new SecretClient(new Uri("https://myvault.vault.azure.net/"), new DefaultAzureCredential());
var secret = await client.GetSecretAsync("DbConnectionString");
When you deploy and run the application in Azure, it fails to retrieve the secret and throws an exception indicating that access is forbidden.
Which of the following actions should you perform to resolve this error?
You are configuring an Azure CDN endpoint to distribute responses from a weather forecast API. The API serves localized forecast data based on geographic coordinates passed as query string parameters, such as `/forecast?lat=40.7128&lon=-74.0060`. You need to ensure that the CDN endpoint caches unique forecast data for each distinct coordinate combination while maximizing cache efficiency for the rest of the application. Which query string caching behavior should you select?
You are setting up monitoring for an Azure App Service web app. You create an Azure Monitor metric alert rule to detect when the HTTP Server Errors count exceeds a specified threshold. You need to ensure that an email notification is automatically sent to the operations team when the alert fires. Which Azure Monitor component must you configure to define the email notification recipient and delivery channel?
You are developing a Single Page Application (SPA) named SalesPortal and a backend Web API named SalesAPI. You register both applications in Microsoft Entra ID. SalesPortal runs in the user's web browser and must call SalesAPI to retrieve the signed-in user's sales data. You need to configure the applications to ensure SalesPortal can access SalesAPI on behalf of the signed-in user while adhering to the principle of least privilege. Which action should you perform to configure the required permissions?
You need to download the diagnostic log files from a Windows-based Azure App Service named `contoso-web` by using the Kudu REST API. You want to retrieve all log files compiled into a single compressed ZIP file.
Arrange the actions in the correct order to configure the request, authenticate, and download the logs.
Drag items to arrange them in the correct order
You are developing a C# application using the .NET SDK Azure.Messaging.EventHubs to send telemetry data to an Azure Event Hub. You need to write the code to send a batch of events efficiently and reliably. Which two actions must you perform to create and publish the event batch using the SDK? (Select TWO).
Select all that apply
You are developing a Python application that uses the `azure-storage-blob` SDK (v12). You write the following code to upload a blob and assign custom metadata:
python
from azure.storage.blob import BlobServiceClient
service_client = BlobServiceClient.from_connection_string(connection_string)
blob_client = service_client.get_blob_client(container="reports", blob="annual_report.pdf")
blob_client.upload_blob(data=pdf_data, metadata={"ProjectName": "Delta"}, overwrite=True)
Later, you need to read this metadata value from the blob. Which code segment should you use to retrieve the value of the `ProjectName` metadata?
properties = blob_client.get_blob_properties()
project_name = properties.metadata.get("ProjectName")
properties = blob_client.get_blob_properties()
project_name = properties.metadata.get("x-ms-meta-projectname")
properties = blob_client.get_blob_properties()
project_name = properties.metadata.get("projectname")
properties = blob_client.get_blob_properties()
project_name = properties.metadata.get("x-ms-meta-ProjectName")
A university course enrollment system uses an Azure Service Bus queue to process student registration requests. You are developing a C# console application that retrieves these requests. The application must guarantee that if the console application crashes during processing, the registration request is not lost and remains on the queue to be reprocessed by another instance. Which approach should you implement?
You are configuring inbound request processing rules for an API in Azure API Management (APIM). You need to allow cross-origin resource sharing (CORS) and limit the rate of incoming calls based on the client IP address.
Which two of the following configurations must you perform to implement these policies? (Select two.)
Select all that apply