Tüm alıştırma soruları

972 soru

Soru 501Soru

An API hosted on Azure App Service serves real-time inventory updates via an Azure CDN Standard from Microsoft endpoint. The requests use a query string to specify a store location (e.g., `/inventory/status?storeId=99`). You need to ensure that requests to `/inventory/status` always bypass the CDN cache and fetch the latest inventory data directly from the origin. Other paths on the same endpoint, such as `/assets/images`, must continue to cache assets based on their query strings. Which configuration should you apply to the CDN endpoint to meet these requirements?

Cevabı ve açıklamayı göster

Cevap: Create a custom caching rule for the path `/inventory/status` and set the caching behavior to Bypass cache.

Cevap

Create a custom caching rule for the path `/inventory/status` and set the caching behavior to Bypass cache.
Creating a custom caching rule for the path `/inventory/status` with a 'Bypass cache' behavior ensures that all requests matching this path are not cached by the CDN and are sent directly to the origin. This allows other paths on the endpoint to continue caching normally using their query strings.

Adım Adım Çözüm

1
Analyze the requirement to disable caching for a specific endpoint path while keeping query string caching for other paths.
Identified that global query string configurations will not work because they apply endpoint-wide and would affect all paths.
Global query string behaviors like 'Bypass caching for query strings' or 'Ignore query strings' cannot be scoped to a single path.
2
Select the appropriate Azure CDN configuration mechanism for path-level overrides.
Determined that a custom caching rule matched by path is required.
Custom caching rules allow fine-grained control over caching behaviors based on specific request paths.
3
Determine the correct caching behavior to completely prevent CDN caching of the inventory path.
Selected the 'Bypass cache' behavior.
Setting the behavior to 'Bypass cache' instructs the CDN edge not to cache matching assets and to fetch them directly from the origin.

Anahtar Kavram

Azure CDN Caching Rules and Query String Caching Behavior
Tahmini Süre:1m 30s
Soru 502Soru

You are troubleshooting a startup failure for a web application hosted on a Linux-based Azure App Service. You need to enable container logging, view the logs in real-time to identify the exception, and minimize administrative overhead. Move the actions from the list of actions to the answer area and arrange them in the correct order.

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

First, run the az webapp log config command with the --docker-container-logging filesystem parameter. Second, run the az webapp log tail command. Third, access the web application URL. Fourth, review the streaming stdout and stderr console output in the CLI terminal.
To diagnose a startup failure on a Linux App Service, you must first enable container logging by running the command with the filesystem parameter. Once enabled, starting the log stream with the tail command ensures you can capture live output. Accessing the web application triggers the startup or request cycle, producing log entries that are then piped directly to the console for analysis.

Adım Adım Çözüm

1
Enable container logging to the filesystem.
Container logging is activated, instructing the Linux App Service to write stdout and stderr to the filesystem.
By default, container logging is disabled. You must enable it using the az webapp log config command with the --docker-container-logging parameter set to filesystem before you can stream the logs.
2
Initiate the log streaming session.
A persistent connection is established to the App Service log streaming endpoint.
Running the az webapp log tail command starts a live stream session in your terminal, which will capture and print logs in real-time as they are written.
3
Trigger the failure.
The App Service container attempts to initialize or process the incoming web request, generating diagnostic events.
Since the stream is live, generating a new request ensures that the startup or runtime error is immediately logged and streamed to the active CLI session.
4
Review the log stream output.
The exact exception details, stack traces, or console outputs are displayed in the CLI terminal.
Analyzing the stdout/stderr streaming output allows you to inspect the exception details and trace the root cause of the startup failure.

Anahtar Kavram

Configuring container logging and streaming logs in real-time using Azure CLI for Linux Azure App Service.
Soru 503Soru

You are deploying a .NET 8.0 web application to an Azure App Service. You want to implement Application Insights Profiler to identify performance bottlenecks and analyze the hot paths of your application's code execution.

Which two configurations or conditions must be met to enable Application Insights Profiler? Select two.

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: The App Service plan must be configured to use the Basic, Standard, or Premium pricing tier.; The App Service application settings must include the APPLICATIONINSIGHTS_CONNECTION_STRING app setting with a valid connection string.

Cevap

To enable Application Insights Profiler on Azure App Service, the App Service plan must be on the Basic, Standard, or Premium tier, and the APPLICATIONINSIGHTS_CONNECTION_STRING application setting must be configured with a valid connection string.
The correct options are configuring the App Service plan to use the Basic, Standard, or Premium pricing tier, and configuring the APPLICATIONINSIGHTS_CONNECTION_STRING application setting. Application Insights Profiler requires a Basic plan tier or higher to execute. It also requires the APPLICATIONINSIGHTS_CONNECTION_STRING setting to connect the application to the Application Insights resource.

Adım Adım Çözüm

1
Verify the App Service plan pricing tier.
Ensure that the plan is scaled to at least the Basic, Standard, or Premium tier, as Free and Shared tiers do not support Profiler.
Profiler requires compute capabilities available only in Basic or higher plans.
2
Configure the Application Insights connection string.
Add the APPLICATIONINSIGHTS_CONNECTION_STRING application setting in the App Service configuration.
This establishes the connection to send profiling telemetry to the correct Application Insights resource.

Anahtar Kavram

Application Insights Profiler baseline prerequisites and setup requirements on Azure App Service.
Soru 504Soru

You are configuring telemetry for an ASP.NET Core web application deployed to Azure Container Apps using the .NET SDK. In your `Program.cs` file, you register the Application Insights services using the following code:

csharp
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddApplicationInsightsTelemetry();

You configure the Container App with an environment variable named `APPINSIGHTS_INSTRUMENTATIONKEY` containing the valid instrumentation key of your Application Insights resource.

After deploying the application, you observe that no telemetry data is being received by Application Insights. There are no exception messages in the application logs, and the application is running successfully.

Which of the following modifications is required to resolve this issue and enable telemetry collection?

Cevabı ve açıklamayı göster

Cevap: Configure the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable in the Azure Container App instead of APPINSIGHTS_INSTRUMENTATIONKEY.

Cevap

Configure the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable in the Azure Container App instead of APPINSIGHTS_INSTRUMENTATIONKEY.
The correct option correctly identifies that the modern Application Insights .NET SDK requires the connection string configured via the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable. Ingestion using only the instrumentation key (`APPINSIGHTS_INSTRUMENTATIONKEY` or the `InstrumentationKey` property in code) has been deprecated and does not work for telemetry ingestion in modern SDK releases.

Adım Adım Çözüm

1
Identify the environment variable being used to configure Application Insights.
The application is currently configured with the deprecated `APPINSIGHTS_INSTRUMENTATIONKEY` environment variable.
To determine if the configuration uses the obsolete instrumentation key or the required connection string.
2
Analyze SDK requirements for telemetry ingestion.
The modern Application Insights SDK requires a connection string (`APPLICATIONINSIGHTS_CONNECTION_STRING`) to successfully route and ingest telemetry.
Ingestion using only the instrumentation key has been deprecated and is ignored by the SDK, resulting in a silent failure where no telemetry is sent.
3
Apply the correct environment variable configuration.
Replace `APPINSIGHTS_INSTRUMENTATIONKEY` with `APPLICATIONINSIGHTS_CONNECTION_STRING` containing the full connection string from the Azure Portal.
This supplies the required endpoint information and key to the SDK, enabling telemetry to flow successfully.

Anahtar Kavram

Application Insights SDK requires the use of Connection Strings rather than the deprecated Instrumentation Key to ingest telemetry data.
Soru 505Soru

You are deploying a C# ASP.NET Core web application to Azure App Service. The application is configured to use a system-assigned managed identity. The application must retrieve a database password from an Azure Key Vault named kv-finance-prod. The Key Vault is configured with the Vault access policy permission model.

The application contains the following C# code to retrieve the secret:

csharp
using System;
using Azure.Identity;
using Azure.Security.KeyVault.Secrets;

// ...
var client = new SecretClient(new Uri("https://kv-finance-prod.vault.azure.net/"), new DefaultAzureCredential());
KeyVaultSecret secret = await client.GetSecretAsync("DbPassword");

During testing, the call to GetSecretAsync fails with a RequestFailedException showing a 403 (Forbidden) error.

Which action should you perform to resolve the authorization issue using the minimum level of privileges?

Cevabı ve açıklamayı göster

Cevap: Add a Key Vault access policy for the application's system-assigned managed identity and grant it the Get secret permission.

Cevap

Add a Key Vault access policy for the application's system-assigned managed identity and grant it the Get secret permission.
The Azure Key Vault uses the Vault access policy permission model. Under this model, data plane authorization must be configured via Key Vault access policies rather than Azure RBAC. Since the application retrieves a specific secret using GetSecretAsync, granting only the 'Get' secret permission in the access policy satisfies the minimum privilege requirements.

Adım Adım Çözüm

1
Identify the active authorization model of the Azure Key Vault.
The Key Vault is configured to use the Vault access policy model rather than Azure role-based access control (Azure RBAC).
This determines whether to configure access policies or assign RBAC roles to authorize the application's identity.
2
Analyze the C# SDK code to determine the required permission.
The application calls GetSecretAsync to retrieve a single secret by its exact name.
This operation requires only the 'Get' secret permission. The 'List' permission is not required to read a specific secret.
3
Apply the permission under the legacy Vault access policy model.
Create a new Key Vault access policy targeting the application's system-assigned managed identity, selecting only the 'Get' permission for secrets.
This grants the minimum level of privileges required to resolve the 403 Forbidden error without introducing unnecessary access rights like List.

Anahtar Kavram

Key Vault Data Plane Access Policies
Soru 506Soru

A company is deploying an automated synchronization service named DeptSync that runs as a daily background task on an Azure virtual machine. The service must connect to Microsoft Graph to update the department and job title properties of all user accounts in Microsoft Entra ID. The service runs without any user interaction.

You need to configure the Microsoft Entra ID application registration for DeptSync to allow the service to authenticate and perform these updates securely using the principle of least privilege.

Which two actions should you perform? (Choose two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Configure the application registration with the User.ReadWrite.All Application permission for the Microsoft Graph API.; Grant tenant-wide admin consent for the configured Microsoft Graph API permissions.

Cevap

To configure the daemon service, you must add the User.ReadWrite.All Application permission to the Microsoft Graph API and grant tenant-wide administrator consent.
The background synchronization service runs as a scheduled task without a signed-in user, meaning it must authenticate as its own identity using the client credentials flow. Therefore, it requires Application permissions rather than Delegated permissions. Updating user profile details (such as department and job title) across all accounts in the tenant requires the User.ReadWrite.All permission. Because Application permissions grant broad access to directory data, Microsoft Entra ID requires tenant-wide administrator consent to be granted before the application can successfully call the Microsoft Graph API.

Adım Adım Çözüm

1
Determine the application type and authentication context.
The service runs in the background without user interaction, requiring the client credentials flow and Application permissions.
Delegated permissions require a signed-in user, whereas daemon services run under their own identity.
2
Select the appropriate Microsoft Graph permission scope.
Choose the User.ReadWrite.All permission.
The service needs to read and write department and job title properties for all user accounts in the directory, and User.ReadWrite.All covers these operations.
3
Grant the necessary consent for the permissions.
Grant tenant-wide administrator consent.
All Microsoft Graph Application permissions require administrator approval before they can be used.

Anahtar Kavram

Microsoft Entra ID Application permissions and administrator consent requirements for daemon applications.
Soru 507Soru

You are configuring dead-lettering for an Azure Event Grid subscription that routes events for a customer portal. You must write dead-lettered events to an Azure Blob Storage container named `undelivered-events`. To meet corporate security compliance, you must use a system-assigned managed identity rather than access keys or SAS tokens. Which security configuration is required to allow Event Grid to write the dead-lettered events?

Cevabı ve açıklamayı göster

Cevap: Assign the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the destination storage account.

Cevap

Assign the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the destination storage account.
To allow Event Grid to write dead-lettered events using a system-assigned managed identity, you must assign the Storage Blob Data Contributor role to Event Grid's system-assigned managed identity at the storage account or container scope. This provides the minimal required permission to write block blobs.

Adım Adım Çözüm

1
Identify the identity used by Azure Event Grid.
The Event Grid subscription uses a system-assigned managed identity to authenticate.
This identity represents the Event Grid resource itself in Microsoft Entra ID.
2
Determine the required Azure RBAC role for writing blobs to Azure Storage.
The Storage Blob Data Contributor role is required.
This role allows the identity to perform write operations (such as uploading dead-letter events) on the container.
3
Grant the role assignment.
Assign the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity at the storage account scope.
This authorizes Event Grid to securely write dead-letter events to the container without storing credentials.

Anahtar Kavram

Azure Event Grid dead-letter destination security using managed identity
Tahmini Süre:1m 0s
Soru 508Soru

You are deploying a web application to Azure App Service. The application must retrieve database credentials from an Azure Key Vault. To follow organizational security policies, you decide to use a user-assigned managed identity to authenticate the application.

Which of the following actions are required to configure this security solution? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Associate the user-assigned managed identity with the App Service instance.; Configure an Azure Key Vault access policy or Azure RBAC role assignment that grants Secret Get permissions to the user-assigned managed identity.

Cevap

The correct actions are to associate the user-assigned managed identity with the App Service instance, and to configure an Azure Key Vault access policy or Azure RBAC role assignment that grants Secret Get permissions to the user-assigned managed identity.
To authenticate using a user-assigned managed identity, you must first associate the identity with the App Service. Then, you must grant the identity permissions to the Key Vault using access policies or role assignments.

Adım Adım Çözüm

1
Assign the identity to the compute resource.
The App Service is associated with the user-assigned managed identity, enabling it to request Microsoft Entra ID tokens using this identity.
Before an Azure resource can use a user-assigned managed identity, the identity must be linked to the resource configuration.
2
Grant access to the target resource.
The user-assigned managed identity is authorized to perform get operations on Key Vault secrets.
By default, identities have no permissions. You must explicitly configure access policies or RBAC roles to grant access to the Key Vault.

Anahtar Kavram

Configuring a user-assigned managed identity to authenticate and authorize access to Azure Key Vault.
Soru 509Soru

You are developing a C# desktop application using MSAL.NET that will run on Windows 11 client machines. The application must authenticate users against Microsoft Entra ID and support Single Sign-On (SSO) using the native Windows Web Account Manager (WAM) broker. You need to configure the Microsoft Entra ID application registration and the C# initialization code. Which two configuration steps should you perform? Select two.

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: In the Microsoft Entra ID application registration, configure a Redirect URI using the format ms-appx-web://microsoft.aad.brokerplugin/{ClientId}.; Initialize the client application using PublicClientApplicationBuilder and call the WithBroker method with Windows broker options enabled.

Cevap

Configure a Redirect URI in Microsoft Entra ID using the format ms-appx-web://microsoft.aad.brokerplugin/{ClientId}, and initialize the application using PublicClientApplicationBuilder while calling WithBroker with Windows broker options enabled.
To configure Windows Web Account Manager (WAM) broker authentication, you must register a Redirect URI matching the 'ms-appx-web://microsoft.aad.brokerplugin/{ClientId}' pattern in Entra ID and call the 'WithBroker' method with Windows options on the 'PublicClientApplicationBuilder'. This allows the application to utilize WAM for native Single Sign-On.

Adım Adım Çözüm

1
Register the correct redirect URI pattern in Microsoft Entra ID for the public client application.
The application registration now contains the ms-appx-web://microsoft.aad.brokerplugin/{ClientId} redirect URI, allowing the Entra ID authorization endpoint to redirect tokens back to the native WAM broker.
Windows broker authentication requires a specific callback scheme to identify the broker handler.
2
Use the MSAL.NET PublicClientApplicationBuilder in your C# application code.
The application is initialized as a public client (desktop) application, which is suitable for client-side execution.
A public client application is required for interactive token acquisition and integration with OS brokers.
3
Call the WithBroker extension method passing Windows operating system broker options.
MSAL.NET enables interaction with the local Windows WAM broker for SSO authentication.
Enabling the broker runtime bypasses the browser flow and uses the OS native broker for a seamless user experience.

Anahtar Kavram

Configuring Single Sign-On (SSO) with Web Account Manager (WAM) broker authentication in MSAL.NET and Microsoft Entra ID.
Tahmini Süre:2m 0s
Soru 510Soru

A web application running in a Linux-based Azure App Service environment within resource group `rg1` is failing to start up. To diagnose the initialization error, you want to inspect the output sent to standard output (stdout) and standard error (stderr) by enabling local filesystem logging.

Which Azure CLI command should you execute to enable this diagnostic log collection for the app named `webapp1`?

Cevabı ve açıklamayı göster

Cevap: az webapp log config --name webapp1 --resource-group rg1 --docker-container-logging filesystem

Cevap

Execute the command `az webapp log config --name webapp1 --resource-group rg1 --docker-container-logging filesystem` to enable container logging.
The correct command uses `--docker-container-logging filesystem` which enables the collection of standard output and standard error streams from the Docker container hosting the Linux App Service application, saving them to the local filesystem.

Adım Adım Çözüm

1
Identify the App Service operating system (Linux) and the type of logs needed (stdout/stderr console output).
Determine that for Linux-based App Services, console streams are captured via container logging rather than traditional application logging.
Linux App Services run applications inside Docker containers, where standard output and standard error are written to the container log files.
2
Select the correct Azure CLI parameter to enable container logging on the filesystem.
Identify `--docker-container-logging filesystem` as the correct parameter.
This parameter configures the App Service to save container stdout/stderr logs directly to the local filesystem for retrieval.

Anahtar Kavram

Configuring container logging on Linux-based Azure App Services to capture console output.
Tahmini Süre:1m 30s
Soru 511Soru

An Azure Resource Manager configuration is being designed to host an API container image stored in a private Azure Container Registry named `acrcat.azurecr.io`. To comply with security guidelines, a dedicated user-assigned managed identity named `acr-reader-identity` has been assigned to the Azure Container App. To successfully pull the container image, which Bicep block must be defined under the `properties.configuration` section of the Container App resource?

Cevabı ve açıklamayı göster

Cevap: registries: [
{
server: 'acrcat.azurecr.io'
identity: acrReaderIdentity.id
}
]

Cevap

The Bicep configuration block that defines a list of registries containing the registry server name and the resource ID of the user-assigned managed identity as the value for the identity property.
The configuration block specifying registries with the correct server property and the user-assigned managed identity resource ID is correct. This instructs Azure Container Apps to use the specified user-assigned managed identity to authenticate and pull the image from the private registry.

Adım Adım Çözüm

1
Identify the identity type used by the Container App for authentication.
A user-assigned managed identity is configured and assigned the AcrPull role.
Determines how to reference credentials in the registry configuration.
2
Examine the Bicep template schema for container registries.
The registries property requires a 'server' string and an 'identity' string containing the resource ID of the user-assigned identity.
Ensures template syntax compliance with Azure Resource Manager specifications.
3
Associate the user-assigned identity ID with the private registry server in the Bicep template.
The container app is successfully deployed and pulls the image securely from the private Azure Container Registry.
Enables secure, passwordless authentication for container deployment.

Anahtar Kavram

Azure Container Apps Private Registry Authentication via Managed Identities
Soru 512Soru

You are developing a C# gaming service that stores player session state in Azure Cosmos DB using the .NET SDK v3. Initially, the container was partitioned by a low-cardinality property path `/sessionType` (which had a static value of 'ActiveSession' for all items), causing hot partitions and high latency. To resolve this, you re-create the container with the partition key path set to `/playerId`. You need to write a method to upsert a player's session. Which C# code segment should you use?

Cevabı ve açıklamayı göster

Cevap: PlayerSession session = new PlayerSession { Id = "session-901", PlayerId = "p-888", SessionType = "ActiveSession" };
ItemResponse<PlayerSession> response = await container.UpsertItemAsync<PlayerSession>(
session,
new PartitionKey(session.PlayerId)
);

Cevap

The option that invokes UpsertItemAsync using the session object and a PartitionKey constructed with session.PlayerId
The correct answer correctly calls container.UpsertItemAsync with the session object and a new PartitionKey instance set to session.PlayerId. This is compatible with the container's partition key path of /playerId, ensuring the item is routed to the correct partition, and uses the correct .NET SDK v3 types.

Adım Adım Çözüm

1
Identify the target SDK version requirement.
The target SDK is the .NET SDK v3, which utilizes CosmosClient, Database, Container, and ItemResponse.
This filters out obsolete SDK v2 classes such as DocumentClient, Document, and ResourceResponse.
2
Analyze the container partition key configuration.
The partition key path is set to /playerId. Therefore, the partition key value passed to the operation must be the PlayerId of the document.
Using any other property (like SessionType) will cause a partition key mismatch runtime error and can lead to hot partitions.
3
Verify SDK best practices for item operations.
SDK v3 requires explicitly passing the PartitionKey as a parameter in methods like UpsertItemAsync.
Omitting the PartitionKey causes additional processing latency or runtime exceptions during serialization/deserialization.

Anahtar Kavram

Performing item upsert operations using the Cosmos DB .NET SDK v3 with an explicit partition key value that aligns with the container partition key path.
Tahmini Süre:1m 30s
Soru 513Soru

You are developing a web application that serves static assets from an Azure CDN Standard from Microsoft endpoint. You need to configure the CDN endpoint to automatically redirect all incoming HTTP requests to HTTPS using the CDN's Rules engine. Which five actions should you perform in sequence? To answer, arrange the appropriate actions in the correct order.

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

To configure an HTTP to HTTPS redirect for an Azure CDN Standard from Microsoft endpoint, you must navigate to the CDN endpoint in the Azure Portal, access the Rules engine under Settings, add a new rule, define a match condition where Request protocol equals HTTP, add a URL redirect action to HTTPS, and finally save the rule.
The correct sequence begins with accessing the endpoint settings and selecting the Rules engine. A new rule must be created and named. To target insecure traffic, a condition matching the HTTP protocol is added. The associated action must be a URL redirect pointing to HTTPS. Finally, saving the rule deploys the configuration to the edge nodes.

Adım Adım Çözüm

1
Navigate to the Rules engine section of the CDN endpoint.
The Rules engine interface loads, allowing you to define global or custom rules.
This is the administrative interface where CDN rules are managed.
2
Add a new rule container.
A blank rule structure is created.
Each rule requires a name before conditions or actions can be appended.
3
Define the match condition for HTTP traffic.
The rule is configured to trigger only when an incoming request uses the HTTP protocol.
This ensures secure HTTPS requests are not evaluated or redirected again.
4
Configure the redirect action.
The rule is set to issue an HTTP redirect to the HTTPS counterpart.
The URL redirect action handles the redirection response directly at the CDN edge.
5
Save the rule configuration.
The rule is saved and begins deployment.
The configuration must propagate to all global edge servers to take effect.

Anahtar Kavram

Configuring transport layer security redirects using the Azure CDN Standard Rules Engine.
Tahmini Süre:1m 30s
Soru 514Soru

You are developing a distributed application on Azure. The application components send telemetry to an Azure Application Insights instance. You need to configure an Azure Monitor Log Search Alert rule to monitor exception rates. The alert must trigger when the number of exceptions in a 15-minute window is greater than 50. When the alert triggers, it must execute a custom remediation API hosted on an Azure Function App. Which two of the following actions should you perform? (Choose two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Create an Action Group containing an Azure Function receiver that is configured to invoke the HTTPS trigger of the remediation API.; Define the Log Search Alert rule condition using a KQL query that filters the exceptions using a time-relative clause, such as `where timestamp > ago(15m)`.

Cevap

Create an Action Group containing an Azure Function receiver that is configured to invoke the HTTPS trigger of the remediation API, and define the Log Search Alert rule condition using a KQL query that filters the exceptions using a time-relative clause.
To invoke a custom remediation API hosted on an Azure Function App when a Log Search Alert triggers, you must create an Action Group that includes an Azure Function receiver pointing to the function's HTTP trigger. Additionally, the Log Search Alert rule's KQL query must evaluate exceptions over the target time window. Including an explicit time-relative filter in the KQL query, such as filtering for timestamps within the last 15 minutes, ensures the query executes efficiently and limits the scanned data.

Adım Adım Çözüm

1
Ensure telemetry is flowing to Application Insights.
Components are configured using the full Connection String.
The instrumentation key alone is deprecated; the connection string is required to ingest telemetry.
2
Formulate the alert KQL query.
The KQL query retrieves exceptions using a time filter such as `where timestamp > ago(15m)`.
An explicit time range filter optimizes the query execution and prevents scanning unnecessary historical data.
3
Configure the Action Group receiver.
An Azure Function receiver is added to the Action Group to trigger the custom remediation API.
Azure Function receivers are natively supported in Action Groups for executing custom API logic.

Anahtar Kavram

Log Search Alert rules rely on optimized KQL queries and use Action Groups with receivers like Azure Functions to execute automated remediation logic.
Soru 515Soru

A developer is configuring an Azure CDN endpoint to distribute web pages for an online learning portal. The portal loads different course pages using a query string, such as `courses.html?courseid=42`. The developer must ensure that the CDN caches a unique version of the page for each individual course ID. Which query string caching behavior should the developer configure on the endpoint?

Cevabı ve açıklamayı göster

Cevap: Cache every unique URL

Cevap

The developer should configure the 'Cache every unique URL' query string caching behavior.
Configuring the CDN to 'Cache every unique URL' forces the CDN to treat each query string variation as a distinct resource. This ensures that a unique version of the page is cached and served for each unique course ID.

Adım Adım Çözüm

1
Identify the requirement to cache unique pages based on query parameters.
The CDN must differentiate requests based on the query parameter value.
Since each course ID displays unique content, caching must be parameter-aware.
2
Compare Azure CDN query string caching behaviors.
Identify that 'Ignore query strings' caches only one version, 'Bypass caching' does not cache anything with query strings, and 'Cache every unique URL' caches a version for each unique query parameter.
Selecting the appropriate setting matches the specific performance and correctness requirements of the application.
3
Select the behavior that caches each version of the page.
The 'Cache every unique URL' behavior is chosen.
This configuration treats every unique URL query combinations as a unique asset, satisfying the requirement.

Anahtar Kavram

Azure CDN query string caching behaviors allow developers to control how requests with query parameters are cached, ensuring dynamic content is either cached per query, bypassed, or cached uniformly.
Soru 516Soru

An organization requires secure delivery of events from an Azure Event Grid system topic to an Azure Service Bus queue. To minimize administration overhead, you need to configure the Event Grid topic with a managed identity whose lifecycle is automatically tied to the Azure resource itself. Which configuration should you apply to the Event Grid system topic?

Cevabı ve açıklamayı göster

Cevap: Configure a system-assigned managed identity.

Cevap

Configure a system-assigned managed identity.
Configuring a system-assigned managed identity enables Azure Event Grid to authenticate and deliver events to the Service Bus queue securely. Because the identity is system-assigned, its lifecycle is managed entirely by Azure and is bound directly to the Event Grid system topic resource itself, meaning it is automatically deleted when the topic is deleted.

Adım Adım Çözüm

1
Identify the lifecycle requirement for the managed identity.
The identity must have its lifecycle tied directly to the Event Grid system topic resource.
This determines whether a system-assigned or user-assigned identity is appropriate.
2
Compare managed identity types.
System-assigned identities are tied to the resource lifecycle, whereas user-assigned identities have independent lifecycles.
To satisfy the constraint that the identity is deleted when the resource is deleted, a system-assigned identity is required.

Anahtar Kavram

Azure Event Grid managed identity authentication
Tahmini Süre:1m 0s
Soru 517Soru

You are troubleshooting a web application hosted on a Windows-based Azure App Service named `webapp1` in a resource group named `rg1`. You need to enable application logging to the local file system with a Verbose level, and then view the logs in real-time as they are generated. Which two Azure CLI commands should you run to meet these requirements?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: az webapp log config --name webapp1 --resource-group rg1 --application-logging true --level verbose; az webapp log tail --name webapp1 --resource-group rg1

Cevap

To resolve the logging requirement, run the command to configure application logging with a verbose level to true, and then use the log tail command to stream the logs in real-time.
The correct actions are to enable application logging to the filesystem with the log config command using the verbose level, and then to stream the logs in real-time by using the log tail command.

Adım Adım Çözüm

1
Configure the App Service to enable filesystem application logging.
Application logging is enabled with the verbosity level set to verbose.
The application must be configured to output logs before they can be streamed.
2
Initiate the log streaming process using the tail command.
A live console stream of application logs is established.
Streaming logs in real-time requires tailing the active log files.

Anahtar Kavram

Enabling and streaming local file system application logs for Azure App Service Web Apps using the Azure CLI.
Soru 518Soru

You need to set up availability monitoring for a public website using Application Insights. The test must periodically send an HTTP GET request to the homepage, verify that it returns an HTTP 200 OK200\text{ OK} response, and run from multiple global geographic locations. You want to accomplish this with minimal configuration effort and without writing or deploying any custom code. Which monitoring configuration should you use?

Cevabı ve açıklamayı göster

Cevap: Configure a Standard availability test in the Application Insights resource.

Cevap

Configure a Standard availability test in the Application Insights resource.
Configuring a Standard availability test allows developers to monitor a single URL endpoint with multi-region testing, custom status codes, and HTTP verbs directly from the Azure portal without any coding or deployment overhead.

Adım Adım Çözüm

1
Identify the requirement to monitor a public HTTP endpoint from multiple locations without code.
Confirming that an out-of-the-box availability test type is required.
Standard availability tests are built-in, codeless tests that check single-page uptime, SSL validation, HTTP verbs, and headers from selected global points.
2
Evaluate the standard test capabilities against the scenario.
A Standard test supports sending a GET request, checking for an HTTP 200 status code, and running across multiple global regions without custom code.
This matches all constraints of the scenario with the minimum administrative effort.

Anahtar Kavram

Application Insights Standard availability tests allow codeless monitoring of public endpoints using HTTP verbs, status code matching, and multi-region testing.
Soru 519Soru

You are implementing an end-to-end monitoring and alerting solution for a new API hosted on Azure. You must configure the API to send telemetry to Application Insights, write an efficient Kusto Query Language (KQL) query to analyze exception trends over the past day, and configure an Azure Monitor Action Group to trigger a webhook that requires an API key stored in Azure Key Vault.

Which combination of configurations should you implement to meet these requirements?

Cevabı ve açıklamayı göster

Cevap: Configure the API environment variable APPLICATIONINSIGHTS_CONNECTION_STRINGAPPLICATIONINSIGHTS\_CONNECTION\_STRING to send telemetry, include where timestamp>ago(24h)\text{where timestamp} > \text{ago}(24\text{h}) in the KQL troubleshooting query, and assign the Key Vault Secrets User role to the Action Group's managed identity.

Cevap

Configure the API environment variable APPLICATIONINSIGHTS_CONNECTION_STRINGAPPLICATIONINSIGHTS\_CONNECTION\_STRING to send telemetry, include where timestamp>ago(24h)\text{where timestamp} > \text{ago}(24\text{h}) in the KQL troubleshooting query, and assign the Key Vault Secrets User role to the Action Group's managed identity.
The correct implementation requires routing API telemetry via the APPLICATIONINSIGHTS_CONNECTION_STRINGAPPLICATIONINSIGHTS\_CONNECTION\_STRING setting, specifying a time range filter (such as where timestamp>ago(24h)\text{where timestamp} > \text{ago}(24\text{h})) to keep the troubleshooting KQL query efficient, and assigning the Key Vault Secrets User role to the Action Group's managed identity so it can securely fetch the webhook API key.

Adım Adım Çözüm

1
Configure the API application settings with the correct connection string.
Telemetry data from the API starts flowing to the configured Application Insights resource.
Azure Monitor requires the connection string to route telemetry correctly; using SDK defaults without a connection string will not send logs.
2
Ensure all diagnostic and troubleshooting KQL queries include a time range filter like where timestamp>ago(24h)\text{where timestamp} > \text{ago}(24\text{h}).
The query scans only the last 2424 hours of logs, running efficiently and avoiding system scan limits.
Omitting a time filter in KQL queries leads to full table scans, resulting in slow query performance.
3
Grant the Action Group's managed identity the Key Vault Secrets User role on the Azure Key Vault.
The Action Group is authorized to retrieve the API key secret from Key Vault.
Without explicit Key Vault access policies or Role-Based Access Control (RBAC) permissions, the Action Group cannot retrieve the secret to authenticate the webhook call.

Anahtar Kavram

Configuring Azure Monitor alerts, telemetry ingestion via connection strings, query optimization, and securing action group webhook receivers with managed identities.
Tahmini Süre:1m 30s
Soru 520Soru

You are developing a C# service that periodically updates a shared configuration file stored as a block blob in Azure Blob Storage. To prevent concurrent writes, another process has acquired an active lease on the blob, and the lease ID is stored in a string variable named `currentLeaseId`. Which of the following code segments must you use to successfully overwrite the blob with new data while respecting the active lease?

Cevabı ve açıklamayı göster

Cevap: var options = new BlobUploadOptions
{
Conditions = new BlobRequestConditions { LeaseId = currentLeaseId }
};
await blobClient.UploadAsync(dataStream, options);

Cevap

Use BlobUploadOptions with its Conditions property set to a new BlobRequestConditions object containing the active LeaseId, and pass it to BlobClient.UploadAsync.
To perform operations on a leased blob, you must provide the active lease ID as part of the request conditions. In the modern Azure.Storage.Blobs SDK (v12) for C#, this is achieved by creating a new `BlobUploadOptions` object, initializing its `Conditions` property with a `BlobRequestConditions` instance, and setting the `LeaseId` property of that instance to the active lease ID. This options object is then passed as the second parameter to `BlobClient.UploadAsync`.

Adım Adım Çözüm

1
Identify the correct options class for configuring upload parameters in the modern Azure.Storage.Blobs SDK.
Determine that `BlobUploadOptions` is used to configure optional settings during a blob upload.
The modern SDK uses structured options objects instead of raw parameters to support cleaner API overloads.
2
Find where request constraints and lease details are stored in the options object.
Locate the `Conditions` property of type `BlobRequestConditions` on the `BlobUploadOptions` class.
Lease IDs and concurrency checks (ETags) are categorized under request conditions.
3
Instantiate the condition object and set the lease identifier.
Set `LeaseId` within `BlobRequestConditions` to the active lease string value.
Providing the lease ID in the request conditions tells Azure Blob Storage that the writer owns the lease.

Anahtar Kavram

Handling active leases when performing write operations on block blobs using the Azure.Storage.Blobs SDK in C#.
Tahmini Süre:1m 30s
ÖncekiSayfa 26 / 49Sonraki
Tüm alıştırma soruları — Microsoft Azure Developer (AZ-204) | Examkin