Tüm alıştırma soruları

972 soru

Soru 61Soru

An organization is designing an Azure Resource Manager (ARM) template to deploy a multi-container group to Azure Container Instances (ACI). The deployment must satisfy the following requirements:
- The container group must pull a custom web application image from a private Azure Container Registry (ACR) named `myregistry.azurecr.io`.
- Both containers in the group must retrieve database connection strings from Azure Key Vault at startup without using hardcoded credentials.
- The deployment must utilize managed identities to authenticate against both the ACR and the Key Vault, adhering to the principle of least privilege.

Which configuration strategy should you implement in the template and Azure roles?

Cevabı ve açıklamayı göster

Cevap: Configure the container group with a user-assigned managed identity. Assign the AcrPull role to this identity on the ACR, and the Key Vault Secrets User role on the Key Vault. In the template, reference this user-assigned managed identity's resource ID in both the identity block and the identity property of the imageRegistryCredentials block.

Cevap

The correct strategy is to configure the container group with a user-assigned managed identity, assign the required roles on the Azure Container Registry (ACR) and Azure Key Vault, and reference the identity's resource ID in both the identity block and the imageRegistryCredentials block.
To pull an image from a private ACR using a managed identity during ACI deployment, a user-assigned managed identity must be used. A system-assigned managed identity is not created until after the container group is deployed, so it cannot be used to authenticate the initial image pull. The user-assigned identity must be assigned the AcrPull role on the ACR and the Key Vault Secrets User role (or equivalent access policy) on the Key Vault. Furthermore, the template must explicitly list the identity in the identity block and refer to its resource ID in the imageRegistryCredentials block.

Adım Adım Çözüm

1
Determine the resource lifecycle requirement for pulling images from a private Azure Container Registry during provisioning.
Identify that ACI requires an identity to exist prior to container group deployment to authenticate the image pull. A system-assigned managed identity cannot be used because it is created only after the deployment completes.
This rules out any option relying on system-assigned managed identity for the image pull credentials.
2
Identify the authentication mechanism required for the private registry pull.
Determine that the template must explicitly contain an 'imageRegistryCredentials' block referencing the user-assigned identity's resource ID.
Implicit authentication is not supported by ACI for private ACR repositories, even if the ACI container group is assigned the user-assigned identity.
3
Determine the authorization requirements for the container group to access Key Vault secrets.
The identity assigned to the container group must be explicitly granted the 'Key Vault Secrets User' RBAC role or have an access policy configured in the Key Vault.
Without explicit permissions in Key Vault, the application code running inside ACI will receive an Access Denied error when requesting database connection strings at startup.

Anahtar Kavram

Using a user-assigned managed identity to authenticate both private ACR image pulls and Azure Key Vault secret access in Azure Container Instances.
Tahmini Süre:3m 0s
Soru 62Soru

You are planning a serverless processing solution using Azure Functions. You need to configure the hosting plans and execution patterns for your function app. Which of the following statements are correct? (Select TWO)

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

Cevabı ve açıklamayı göster

Cevap: The Premium plan provides pre-warmed instances to avoid cold-start latency and supports virtual network integration.; To implement a stateful workflow where multiple functions run in a sequence (function chaining), you should use Durable Functions.

Cevap

The Premium plan provides pre-warmed instances and VNet integration, and Durable Functions should be used to implement stateful workflows such as function chaining.
The Premium plan is correct because it offers pre-warmed instances to eliminate cold start and supports VNet integration. Durable Functions is correct because it is specifically designed to manage state and coordinate workflows like function chaining.

Adım Adım Çözüm

1
Evaluate the execution timeout requirements of the application.
Identify that the Consumption plan is limited to a maximum execution duration of 10 minutes, making it incorrect for 30-minute workloads.
Ensures the correct hosting plan is selected based on workload runtime constraints.
2
Analyze how stateful workflows should be implemented in Azure Functions.
Determine that direct chaining of stateless functions via HTTP triggers is an anti-pattern, whereas Durable Functions provides first-class support for stateful orchestration.
Ensures proper design patterns are followed for sequence processing.
3
Assess the capabilities of the Premium hosting plan.
Verify that the Premium plan offers pre-warmed instances to prevent cold starts and allows virtual network integration.
Confirms the Premium plan satisfies the performance and network isolation requirements.

Anahtar Kavram

Azure Functions hosting plans and stateful orchestration using Durable Functions
Soru 63Soru

An organization deploys an Azure App Service web app named `app-retail` with a production slot and a deployment slot named `staging`. Each slot is configured with a system-assigned managed identity. You have two Azure Key Vaults:

* `kv-retail-prod` containing a secret named `DbConn`. The Key Vault access policy grants GET permissions to the production slot's system-assigned managed identity.
* `kv-retail-stage` containing a secret named `DbConn`. The Key Vault access policy grants GET permissions to the staging slot's system-assigned managed identity.

You configure the following application setting in both slots (without marking it as a deployment slot setting):

* Production slot: `DbConnectionString = @Microsoft.KeyVault(SecretUri=https://kv-retail-prod.vault.azure.net/secrets/DbConn/)`
* Staging slot: `DbConnectionString = @Microsoft.KeyVault(SecretUri=https://kv-retail-stage.vault.azure.net/secrets/DbConn/)`

You perform a standard deployment slot swap between the `staging` slot and the production slot. Immediately after the swap completes, you observe that the web app fails to connect to the database in both slots because the Key Vault references cannot be resolved.

Which of the following actions will resolve the Key Vault reference resolution failures while adhering to the principle of least privilege?

Cevabı ve açıklamayı göster

Cevap: Configure the DbConnectionString application setting as a deployment slot setting (sticky to slot) in both slots.

Cevap

Configure the DbConnectionString application setting as a deployment slot setting (sticky to slot) in both slots.
The correct answer is to configure the DbConnectionString application setting as a deployment slot setting (sticky to slot) in both slots. When a setting is marked as a deployment slot setting, its value remains on its original slot and is not swapped during a slot swap operation. This allows the production slot to continue using the reference to the production Key Vault (which its system-assigned managed identity is authorized to access) and the staging slot to continue using the reference to the staging Key Vault (which its system-assigned managed identity is authorized to access), resolving the resolution failures without changing access policies.

Adım Adım Çözüm

1
Analyze the cause of the Key Vault reference resolution failures.
When the slots are swapped, the non-sticky DbConnectionString settings are swapped between slots. The production slot now has the staging Key Vault reference (kv-retail-stage), and the staging slot has the production Key Vault reference (kv-retail-prod). However, their system-assigned managed identities do not swap.
System-assigned managed identities are bound to the slot resource. The production slot's identity attempts to read from kv-retail-stage, and the staging slot's identity attempts to read from kv-retail-prod, both of which lack the required Key Vault access policies.
2
Determine how to keep slot-specific settings from being swapped.
By marking the DbConnectionString setting as a deployment slot setting (also known as a sticky setting) in both slots, Azure prevents the setting value from being exchanged during a swap operation.
This keeps the production Key Vault reference on the production slot (which uses the production identity) and the staging Key Vault reference on the staging slot (which uses the staging identity).
3
Verify compliance with the principle of least privilege.
No identity is granted access to secrets it does not need. The staging slot's identity only has access to kv-retail-stage, and the production slot's identity only has access to kv-retail-prod.
This satisfies the requirement to resolve the failures while adhering to the principle of least privilege.

Anahtar Kavram

Understanding the behavior of system-assigned managed identities and slot-sticky application settings during Azure App Service deployment slot swaps.
Soru 64Soru

You are configuring an Azure App Service web app to securely retrieve database credentials from an Azure Key Vault. The solution must use a system-assigned managed identity to access the Key Vault without storing any credentials in the application code or settings.

Which two configuration steps should you perform?

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

Cevabı ve açıklamayı göster

Cevap: Enable a system-assigned managed identity for the App Service web app.; Create an access policy in the Key Vault that grants the web app's identity Secret Get permissions.

Cevap

Enable a system-assigned managed identity for the App Service web app, and create an access policy in the Key Vault that grants the web app's identity Secret Get permissions.
To retrieve secrets securely, you must first enable a system-assigned managed identity on the App Service web app so it can authenticate to Azure resources. Second, you must authorize this identity in the Key Vault by creating an access policy that grants it Get permissions on secrets.

Adım Adım Çözüm

1
Enable the system-assigned managed identity on the web app.
The web app is registered in Microsoft Entra ID and gets a service principal identity.
This establishes a secure identity that the web app can use to authenticate with Key Vault without credentials.
2
Configure permissions on the Key Vault.
The managed identity is granted Get permissions on Key Vault secrets.
This authorizes the web app's identity to retrieve the specific secret values from Key Vault.

Anahtar Kavram

Configuring Azure App Service to securely access Key Vault secrets using managed identities
Soru 65Soru

You are configuring a self-hosted runner on an Azure Virtual Machine to build and push container images to an Azure Container Registry (ACR) named devregistry2026. You want to use a user-assigned managed identity to authenticate the Virtual Machine runner to the registry. Which two actions should you perform?

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

Cevabı ve açıklamayı göster

Cevap: Assign the AcrPush role to the user-assigned managed identity.; Run the az login --identity command on the Virtual Machine.

Cevap

Assign the AcrPush role to the user-assigned managed identity and run the az login --identity command on the Virtual Machine.
To push container images to Azure Container Registry using a user-assigned managed identity, you must assign the AcrPush role to the identity to grant the necessary write permissions. Additionally, you must run the az login --identity command to authenticate the CLI context on the Virtual Machine using the associated managed identity.

Adım Adım Çözüm

1
Assign the AcrPush role to the user-assigned managed identity for the target Azure Container Registry resource.
The identity is granted write/push permissions to the registry.
Permissions must be explicitly granted using Azure Role-Based Access Control (RBAC) to allow the identity to push images.
2
Run the az login --identity command on the Virtual Machine runner.
The Azure CLI session is authenticated using the managed identity credentials.
This establishes the security context so that subsequent registry interactions are authenticated.

Anahtar Kavram

Azure Container Registry authentication using user-assigned managed identities and Azure RBAC roles.
Soru 66Soru

You are designing a serverless solution that uses Azure Functions V4 to process messages from an Azure Service Bus queue. The architecture must comply with the following operational and security requirements:
1. The Service Bus namespace is configured with a private endpoint, and all public network access is disabled.
2. The Function App must scale dynamically (including scaling to zero instances) based on the volume of messages in the queue.
3. No connection strings or secrets can be stored in the Function App settings or in Azure Key Vault.
4. The Function App must authenticate to the Service Bus namespace using a user-assigned managed identity named func-identity.

Which combination of hosting plan and application settings should you configure for the Function App?

Cevabı ve açıklamayı göster

Cevap: Hosting Plan: Premium (Elastic Premium)
Application Settings:
- WEBSITE_RUNTIME_SCALE_MONITORING_ENABLED = 1
- ServiceBusConnection__fullyQualifiedNamespace = sb-namespace.servicebus.windows.net
- ServiceBusConnection__credential = managedidentity
- ServiceBusConnection__clientId = <client-id-of-func-identity>

Cevap

Hosting Plan: Premium (Elastic Premium) with settings: WEBSITE_RUNTIME_SCALE_MONITORING_ENABLED = 1, ServiceBusConnection__fullyQualifiedNamespace = sb-namespace.servicebus.windows.net, ServiceBusConnection__credential = managedidentity, and ServiceBusConnection__clientId = <client-id-of-func-identity>
The correct configuration utilizes the Premium (Elastic Premium) hosting plan to enable outbound Virtual Network (VNet) integration, allowing access to the Service Bus namespace via its private endpoint. To scale dynamically, the runtime scale monitoring setting (WEBSITE_RUNTIME_SCALE_MONITORING_ENABLED) must be set to 1, enabling the Functions scale controller to probe the queue over the VNet. Furthermore, the identity-based connection for a user-assigned managed identity is correctly declared with properties specifying the fully qualified namespace, setting the credential type to 'managedidentity', and supplying the client ID of the identity.

Adım Adım Çözüm

1
Select the Elastic Premium hosting plan.
The Elastic Premium plan supports outbound Virtual Network integration.
Required because the Service Bus namespace is behind a private endpoint and cannot be accessed via the public internet.
2
Enable runtime scale monitoring.
WEBSITE_RUNTIME_SCALE_MONITORING_ENABLED is set to 1 in application settings.
Required so the Azure Functions scale controller can access queue metrics to scale the app dynamically when resources are secured inside a VNet.
3
Configure the identity-based connection to Service Bus.
Define ServiceBusConnection__fullyQualifiedNamespace, ServiceBusConnection__credential, and ServiceBusConnection__clientId settings.
Enables the Function App to authenticate using the user-assigned managed identity without any connection strings or secrets.

Anahtar Kavram

Identity-based connections and virtual network trigger scaling configuration for Azure Functions.
Soru 67Soru

Your organization uses an Azure Virtual Machine to run continuous deployment tasks. You need to configure the VM to push a locally built container image named `webapp:v1` to an Azure Container Registry (ACR) named `corpacr`.

To comply with security guidelines, you must not use admin credentials or service principal keys. Instead, you have configured the following:
- A system-assigned managed identity on the VM, which has only the `Reader` role on the resource group containing the ACR.
- A user-assigned managed identity named `cicd-identity` (Client ID: `11111111-2222-3333-4444-555555555555`), which has the `AcrPush` role on `corpacr`.

Which of the following command sequences should you execute on the Azure Virtual Machine to successfully authenticate and push the image to the registry?

Cevabı ve açıklamayı göster

Cevap: az login --identity --username 11111111-2222-3333-4444-555555555555
az acr login --name corpacr
docker tag webapp:v1 corpacr.azurecr.io/webapp:v1
docker push corpacr.azurecr.io/webapp:v1

Cevap

Use the sequence that starts by logging in to Azure with the user-assigned managed identity using its client ID, logs in to the container registry using az acr login, and then tags and pushes the image.
The correct command sequence first logs in to the Azure CLI using the user-assigned managed identity by specifying its client ID (11111111-2222-3333-4444-555555555555). It then calls the az acr login command to retrieve an OAuth2 access token for the registry and log in the local Docker daemon. Finally, it tags the local image with the registry's fully qualified login server domain (corpacr.azurecr.io) and pushes the image.

Adım Adım Çözüm

1
Authenticate the Azure CLI session using the user-assigned managed identity.
The CLI is authenticated as the user-assigned managed identity (Client ID: 11111111-2222-3333-4444-555555555555).
This identity has the AcrPush role required to upload images to the registry, whereas the system-assigned identity only has Reader permissions.
2
Call the az acr login command.
The Docker daemon is authenticated to the corpacr.azurecr.io login server.
This command uses the active Azure CLI credentials to acquire an access token for the registry and configures the local Docker context.
3
Tag the local image with the registry's login server path.
The image is tagged as corpacr.azurecr.io/webapp:v1.
Docker requires images to be tagged with the registry's fully qualified domain name (FQDN) to know where to route the push request.
4
Push the image to the registry.
The image webapp:v1 is successfully uploaded to corpacr.
The authenticated Docker daemon pushes the tagged image to the private registry.

Anahtar Kavram

Azure Container Registry authentication using user-assigned managed identities via Azure CLI
Tahmini Süre:2m 30s
Soru 68Soru

An organization is deploying an Azure Function App on a Consumption plan to process messages from an Azure Queue Storage queue. To avoid overwhelming a downstream legacy database, you must implement the following constraints:

1. Restrict the maximum scale-out of the function app instances to a specific limit.
2. Control the maximum number of messages that a single instance can process concurrently.

Which two configurations should you apply to meet these requirements?

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

Cevabı ve açıklamayı göster

Cevap: Configure the batchSize property inside the queues section of the host.json file.; Add the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting and set it to the maximum instance limit.

Cevap

Configure the batchSize property inside the queues section of the host.json file, and add the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting set to the maximum instance limit.
To limit scaling and concurrency, you must configure two separate levels: the overall instance count and the concurrency per instance. The setting for the overall instance count on dynamic plans (Consumption/Premium) is the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting. The concurrency per instance for Queue Storage triggers is controlled by configuring the batchSize setting within the queues configuration of host.json.

Adım Adım Çözüm

1
Identify the mechanism to limit instance scale-out for a Consumption plan function app.
The WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting controls the maximum scale-out limit for dynamic hosting plans.
By default, Consumption plans can scale out to many instances, which might overwhelm downstream systems. Setting WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT limits this scale-out behavior.
2
Identify the configuration file and property for managing queue trigger concurrency on a single instance.
The queues extension in the host.json file contains the batchSize property, which controls how many messages are retrieved and processed concurrently per instance.
Queue trigger concurrency is managed globally for the function app via the host.json configuration file under the extensions/queues path.

Anahtar Kavram

Azure Functions scaling limits and queue trigger concurrency configuration.
Soru 69Soru

A developer needs to push a locally built container image to a private Azure Container Registry (ACR) named contosoacr. The developer is already authenticated to their Azure subscription using the Azure CLI on their local workstation. Which command should the developer run on their workstation to authenticate the local Docker CLI to the registry using their active Azure CLI session?

Cevabı ve açıklamayı göster

Cevap: az acr login --name contosoacr

Cevap

az acr login --name contosoacr
The command starting with 'az acr login' with the '--name' parameter is correct because it uses the credentials of the logged-in Azure CLI user to obtain an access token and automatically configure the local Docker client to access the Azure Container Registry.

Adım Adım Çözüm

1
Ensure the Azure CLI is logged in and Docker daemon is running locally.
The local CLI session is authenticated to Azure and Docker commands can be executed.
Authenticating Docker to ACR requires both an active Azure session and a running Docker daemon.
2
Execute the login command targeting the registry name.
The local Docker config.json file is updated with credentials obtained via Azure OAuth token.
This bridges Azure CLI authentication with Docker daemon configuration.

Anahtar Kavram

Azure Container Registry CLI Authentication
Soru 70Soru

An administrator has created an Azure Container Registry named `contosoregistry`. On your local machine, you have a Docker image named `webapp:v1` that is tagged as `contosoregistry.azurecr.io/webapp:v1`. You have successfully run `az acr login --name contosoregistry` to authenticate. Which command must you run to upload this image to your registry?

Cevabı ve açıklamayı göster

Cevap: docker push contosoregistry.azurecr.io/webapp:v1

Cevap

docker push contosoregistry.azurecr.io/webapp:v1
To push an image to Azure Container Registry, you must tag the image with the registry's login server domain name (such as contosoregistry.azurecr.io) and then invoke the standard docker push command. The docker push command uses the registry domain name to locate the registry endpoint and upload the image layers.

Adım Adım Çözüm

1
Ensure the local image is tagged with the fully qualified login server address of the Azure Container Registry.
The image is named contosoregistry.azurecr.io/webapp:v1.
Docker CLI uses the host portion of the tag to route the image upload to the correct registry endpoint.
2
Execute the push command using the Docker CLI.
The image layers are uploaded and stored in the Azure Container Registry repository.
Once authenticated, the local Docker daemon handles image registry communications directly.

Anahtar Kavram

Using the Docker CLI to push container images to an authenticated Azure Container Registry
Soru 71Soru

You are configuring an Azure App Service web app named `prod-webapp` to retrieve a database connection string from an Azure Key Vault named `prod-vault`. The secret in the Key Vault is named `DbConnectionString`. The web app must retrieve the secret using a user-assigned managed identity named `app-identity` (resource ID: `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/app-identity`). No system-assigned identity is enabled on the web app. Which two of the following configurations are required to ensure the web app can successfully retrieve the secret? (Select TWO.)

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

Cevabı ve açıklamayı göster

Cevap: Set the `DbConnectionString` application setting to `@Microsoft.KeyVault(SecretUri=https://prod-vault.vault.azure.net/secrets/DbConnectionString/)`; Configure the web app's `keyVaultReferenceIdentity` property to the resource ID of the `app-identity` user-assigned managed identity.

Cevap

To retrieve the secret successfully, you must configure the application setting using the correct Key Vault reference syntax `@Microsoft.KeyVault(SecretUri=...)` and configure the web app's `keyVaultReferenceIdentity` property to the resource ID of the user-assigned managed identity.
To retrieve a secret using a Key Vault reference in Azure App Service with a user-assigned managed identity, you must perform two main configurations: first, format the application setting value using the correct Key Vault reference syntax (e.g., using `@Microsoft.KeyVault(SecretUri=...)` or `@Microsoft.KeyVault(VaultName=...;SecretName=...)`). Second, configure the web app's `keyVaultReferenceIdentity` property to point to the resource ID of the user-assigned identity. This instructs the App Service to use that specific user-assigned identity to authenticate against the Key Vault.

Adım Adım Çözüm

1
Define the Application Setting `DbConnectionString` using the standard Key Vault reference format.
The setting references the secret URL `https://prod-vault.vault.azure.net/secrets/DbConnectionString/`.
This tells the App Service runtime to resolve the value from Key Vault rather than storing it in plain text.
2
Configure the App Service Web App to use the user-assigned identity for resolving Key Vault references.
The web app's `keyVaultReferenceIdentity` configuration is set to the resource ID of `app-identity`.
Since a user-assigned managed identity is used, App Service needs to know which identity to present when fetching Key Vault references.

Anahtar Kavram

Configuring Key Vault references in Azure App Service using user-assigned managed identities.
Tahmini Süre:2m 0s
Soru 72Soru

You are configuring an Azure App Service web app named `app-billing-prod` to retrieve database credentials from an Azure Key Vault named `kv-billing-prod` using a user-assigned managed identity named `id-billing-prod`.

Which two of the following actions must you perform to configure the web app to resolve Key Vault references using the user-assigned managed identity?

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

Cevabı ve açıklamayı göster

Cevap: Set the Key Vault reference identity configuration of the web app to the resource ID of `id-billing-prod`.; Create a Key Vault access policy in `kv-billing-prod` that grants the Secret Get permission to `id-billing-prod`.

Cevap

To configure the web app to resolve Key Vault references using a user-assigned managed identity, you must set the web app's Key Vault reference identity configuration to the resource ID of the user-assigned identity, and create an access policy in the Key Vault that grants the Secret Get permission to the user-assigned managed identity.
To resolve Key Vault references using a user-assigned managed identity, the App Service needs to know which identity to use, and that identity must have read access to the secrets. This is accomplished by setting the Key Vault reference identity configuration of the web app to the user-assigned identity's resource ID, and creating a Key Vault access policy that grants the Secret Get permission to that user-assigned identity.

Adım Adım Çözüm

1
Assign the user-assigned managed identity to the Web App and configure the Key Vault reference identity setting.
The App Service's keyVaultReferenceIdentity property is set to the resource ID of the user-assigned managed identity.
By default, App Service attempts to resolve Key Vault references using its system-assigned identity. Specifying the keyVaultReferenceIdentity setting tells App Service to use the user-assigned identity instead.
2
Grant the user-assigned managed identity permissions in the Key Vault.
An access policy (or RBAC assignment) is created granting the Secret Get permission to the user-assigned managed identity.
The configured identity must have access rights to retrieve secrets from the target Key Vault for reference resolution to succeed.

Anahtar Kavram

Configuring Key Vault references with user-assigned managed identity in Azure App Service
Soru 73Soru

A financial services company is deploying an event-driven application using Azure Functions V4. The application includes a function that processes incoming queue messages from an Azure Service Bus namespace. The security architecture mandates that the Function App must connect to the Service Bus namespace using its system-assigned managed identity, completely eliminating the use of connection strings, shared access signature (SAS) keys, or secrets. The Service Bus trigger in the function code is configured with Connection = "ServiceBusConnection". Which of the following configuration steps must be implemented to establish this identity-based connection? (Select TWO)

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

Cevabı ve açıklamayı göster

Cevap: Assign the Azure Service Bus Data Receiver role to the system-assigned managed identity of the Function App.; Add an application setting named ServiceBusConnection__fullyQualifiedNamespace and set its value to the fully qualified domain name of the Service Bus namespace.

Cevap

To establish the identity-based connection, you must assign the Azure Service Bus Data Receiver role to the system-assigned managed identity of the Function App and add an application setting named ServiceBusConnection__fullyQualifiedNamespace set to the fully qualified domain name of the Service Bus namespace.
Establishing an identity-based connection requires configuring both the application host configuration and data-plane access. Specifying the ServiceBusConnection__fullyQualifiedNamespace setting directs the Function App to target the correct namespace without requiring secrets. Assigning the Azure Service Bus Data Receiver role ensures that the system-assigned managed identity has the necessary permission to consume messages from the queues within the namespace.

Adım Adım Çözüm

1
Assign the data-plane access role to the managed identity.
The system-assigned managed identity is granted the Azure Service Bus Data Receiver role on the Service Bus namespace level.
Azure Functions triggers require data-plane access to retrieve and process queue messages. Management-plane roles like Contributor are insufficient.
2
Configure the Connection setting using the fullyQualifiedNamespace suffix in the app settings.
The application setting ServiceBusConnection__fullyQualifiedNamespace is added with the value of the Service Bus namespace host name (e.g., mysbnamespace.servicebus.windows.net).
Azure Functions V4 uses the __fullyQualifiedNamespace suffix on the connection name prefix to resolve the endpoint when using an identity-based connection instead of a connection string.

Anahtar Kavram

Identity-based connections in Azure Functions V4
Soru 74Soru

A developer is configuring an application setting in an Azure App Service web app to reference a secret stored in an Azure Key Vault named kv-prod. The secret is named db-conn-string. The web app has a system-assigned managed identity configured with appropriate permissions. Which syntax should the developer use as the value for the application setting to retrieve the latest version of the secret?

Cevabı ve açıklamayı göster

Cevap: @Microsoft.KeyVault(VaultName=kv-prod;SecretName=db-conn-string)

Cevap

The correct syntax to reference the Key Vault secret is @Microsoft.KeyVault(VaultName=kv-prod;SecretName=db-conn-string)
The syntax @Microsoft.KeyVault(VaultName=kv-prod;SecretName=db-conn-string) is correct because it uses the fully qualified namespace and the correct property keys (VaultName and SecretName) to dynamically fetch the latest version of the secret from Key Vault.

Adım Adım Çözüm

1
Identify the required components of an Azure Key Vault reference in App Service.
The reference must begin with the @Microsoft.KeyVault prefix followed by parentheses containing key-value pairs.
This signature informs the App Service runtime to resolve the value from Key Vault rather than treating it as a literal string.
2
Select the correct properties to reference the secret by name without specifying a version.
Use VaultName and SecretName properties.
Using VaultName and SecretName instructs App Service to fetch the latest version of the secret dynamically.
3
Verify property names and format correctness.
The correct format is VaultName=kv-prod;SecretName=db-conn-string separated by a semicolon.
Azure App Service expects exact key names (VaultName and SecretName) and will fail to resolve the secret if keys like Vault or Secret are used.

Anahtar Kavram

Key Vault References in App Service Application Settings
Soru 75Soru

A developer needs to deploy an Azure Function that processes incoming sensor telemetry from a queue. The telemetry data arrives sporadically throughout the day. Each function execution takes less than 10 seconds to complete. The primary goal is to minimize costs by ensuring that billing occurs only when the function is actively running.

Which hosting plan should the developer select?

Cevabı ve açıklamayı göster

Cevap: Consumption plan

Cevap

Consumption plan
The Consumption plan is the default hosting option that automatically scales resources based on the number of incoming events. With this plan, billing is calculated based on execution time and execution count, scaling down to zero when no executions are taking place. This fits the requirement of minimizing costs for sporadic workloads.

Adım Adım Çözüm

1
Analyze the workload requirements: sporadic execution throughout the day, execution time under 10 seconds, and the absolute requirement to minimize costs by paying only when executing.
Identified that the function executes occasionally, runs quickly, and has no requirements for VNet integration or pre-warmed instances.
This helps determine the scaling and cost structure required by the hosting plan.
2
Evaluate the cost and execution characteristics of the available Azure Functions hosting plans.
The Consumption plan billing is based on execution count and resource consumption (gigabyte-seconds), scaling to zero when idle. The Premium and Dedicated plans charge continuously for allocated instances.
Comparing plan properties highlights which one fits the zero-cost-when-idle requirement.
3
Select the hosting plan that matches the criteria.
The Consumption plan is the correct fit since it allows zero billing when the function is not running.
This fulfills all requirements of the scenario.

Anahtar Kavram

Azure Functions hosting plans and their billing/scaling characteristics.
Soru 76Soru

You are deploying a multi-container group to Azure Container Instances (ACI) using a YAML deployment file. The deployment consists of an application container and a logging sidecar container. The container images are hosted in a private Azure Container Registry (ACR). The application requires persistent storage provided by an Azure File share, and must authenticate to ACR using a user-assigned managed identity to avoid storing credentials in the YAML file. Which two of the following configuration blocks must you include in the YAML deployment definition to satisfy these requirements? (Select two.)

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

Cevabı ve açıklamayı göster

Cevap: An 'identity' block at the container group root level with type 'UserAssigned' containing the managed identity's resource ID, and an 'imageRegistryCredentials' block specifying the ACR server and the identity's resource ID.; A 'volumes' block at the container group root level specifying the 'azureFile' details (shareName, storageAccountName, and storageAccountKey), and a 'volumeMounts' block inside the container definitions specifying the volume name and mountPath.

Cevap

To deploy the multi-container group with secure registry authentication and persistent storage, the YAML definition must contain a root-level identity block with the user-assigned identity resource ID coupled with an image registry credentials block pointing to that identity. Additionally, the Azure File share must be declared in a volumes block at the root and mapped to a volumeMounts block within the containers.
To pull container images from a private ACR using a user-assigned managed identity, the container group must have the identity enabled at the root level and referenced in the registry credentials block. To mount an Azure File share, the volume must be defined at the container group root level with the required storage account credentials and referenced in the container definitions under volume mounts.

Adım Adım Çözüm

1
Define the user-assigned managed identity under the root-level 'identity' property of the container group.
The identity is successfully associated with the ACI deployment.
Enables ACI to use the managed identity for interactions with other Azure resources.
2
Configure the 'imageRegistryCredentials' section in the YAML to reference the ACR server and map the 'identity' field to the user-assigned managed identity's resource ID.
ACI can authenticate with ACR during the container creation phase.
Allows ACI to pull the private container images securely without embedding registry passwords in the YAML file.
3
Define the volume using the 'azureFile' driver under the root-level 'volumes' array of the container group.
The volume representing the Azure File share is defined for the container group.
Provides the backend storage credentials and share configuration necessary for mounting.
4
Add a 'volumeMounts' block to the containers that need access to the persistent storage, linking them to the defined volume name and directory path.
The container filesystem accesses the persistent share at the specified path.
Exposes the mounted volume to the container runtimes.

Anahtar Kavram

Multi-container group configuration in ACI involving secure registry authentication via managed identity and persistent volume mounts.
Soru 77Soru

You are deploying an Azure Function App using the Azure Functions V4 runtime and a .NET isolated worker model on an Elastic Premium hosting plan. The function app is configured with a Service Bus queue trigger.

The Service Bus namespace is secured within a virtual network using a private endpoint, and public network access is disabled. The Function App has regional virtual network integration enabled on the same virtual network.

You need to configure the connection using the Function App's system-assigned managed identity instead of connection strings. Additionally, the Function App must scale out dynamically when the Service Bus queue length increases.

Which two configuration settings should you apply to the Function App?

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

Cevabı ve açıklamayı göster

Cevap: Create an application setting named ServiceBusConnection__fullyQualifiedNamespace and set its value to the fully qualified domain name of the Service Bus namespace.; Create an application setting named WEBSITE_RUNTIME_SCALE_MONITORING and set its value to 1.

Cevap

Create an application setting named ServiceBusConnection__fullyQualifiedNamespace set to the fully qualified domain name of the Service Bus namespace, and create an application setting named WEBSITE_RUNTIME_SCALE_MONITORING set to 1.
The correct configurations involve using ServiceBusConnection__fullyQualifiedNamespace to configure an identity-based trigger with the system-assigned managed identity, and setting WEBSITE_RUNTIME_SCALE_MONITORING to 1 to allow the Elastic Premium scale controller to access the VNet-isolated Service Bus namespace.

Adım Adım Çözüm

1
Configure the identity-based connection prefix for the Service Bus trigger.
Create the ServiceBusConnection__fullyQualifiedNamespace app setting.
Azure Functions V4 uses the __fullyQualifiedNamespace suffix on the connection prefix to initiate an identity-based connection using the system-assigned managed identity by default.
2
Enable the scale controller to monitor queue metrics inside the virtual network.
Set the WEBSITE_RUNTIME_SCALE_MONITORING app setting to 1.
Since the Service Bus namespace restricts public access and uses a private endpoint, the scale controller (which runs outside the customer VNet) requires runtime scale monitoring to query queue length metrics through the Function App's VNet integration.

Anahtar Kavram

Configuring identity-based connections and runtime scale monitoring for VNet-integrated Azure Functions V4 triggers.
Tahmini Süre:3m 0s
Soru 78Soru

You need to deploy a containerized application to Azure Container Instances (ACI) using the Azure CLI and verify that it has started successfully. Arrange the steps in the correct sequence to achieve this goal.

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

Cevabı ve açıklamayı göster

Cevap

The correct order of steps is to first create the Azure resource group, then deploy the container instance to that resource group, and finally query the properties of the container group to verify its status.
In Azure, resources cannot exist without a parent resource group. Therefore, the resource group must be created first. Once the resource group is active, the container instance can be provisioned. Finally, the container show command is run to inspect the state and ensure it has successfully transitioned to running.

Adım Adım Çözüm

1
Execute the command to create an Azure resource group.
A resource group is provisioned in the specified region.
Azure Container Instances require an existing resource group to host the deployment.
2
Execute the command to deploy the container instance.
The ACI resource starts provisioning and pulling the specified container image.
This command creates the container group resource within the resource group prepared in the first step.
3
Execute the command to retrieve the container instance details.
The CLI outputs the JSON configuration containing the current provisioning state and IP address.
This is necessary to verify that the container state is 'Running' and to retrieve connectivity details.

Anahtar Kavram

Azure Container Instances deployment workflow via Azure CLI
Soru 79Soru

You are designing an Azure Cosmos DB container to store telemetry data from millions of IoT devices. The workload has a high-write throughput profile (10,00010,000 writes per second) and reads are scoped to individual devices. You need to ensure that transactions are restricted to a single device's data, and that storage and Request Units (RUs) are distributed evenly to avoid hot partitions. Which property should you select as the partition key?

Cevabı ve açıklamayı göster

Cevap: deviceId

Cevap

The deviceId property should be selected as the partition key.
The correct partition key is the device identifier. Selecting a partition key with high cardinality, such as the device identifier, ensures that storage and request throughput are distributed evenly across logical and physical partitions. Since transactions are restricted to a single device's data, grouping by the device identifier satisfies the transactional scope.

Adım Adım Çözüm

1
Analyze the workload requirements, throughput profile, and transaction boundaries.
The workload requires 10,00010,000 writes per second, reads scoped to individual devices, and transactions restricted to a single device's data.
This identifies the key criteria: high cardinality for write distribution and grouping by device for reads and transactions.
2
Evaluate the cardinality of the candidate partition keys.
The deviceId property has millions of unique values (high cardinality), whereas status, factoryLocation, and deviceType have low cardinality.
Azure Cosmos DB partitions work best when the partition key has a wide range of values to distribute storage and throughput evenly.
3
Select the key that satisfies both transaction boundaries and even distribution.
The deviceId property keeps a single device's data within the same logical partition for transactions while distributing the workload evenly.
This avoids hot partitions and meets the query and transactional requirements of the application.

Anahtar Kavram

Partition key selection in Azure Cosmos DB requires choosing a property with high cardinality to distribute throughput and storage evenly, while aligning with the query patterns and transactional boundaries of the application.
Soru 80Soru

You are configuring an Azure Function App (V4) to retrieve messages from an Azure Service Bus queue using an identity-based connection. The Function App is configured with a user-assigned managed identity that has been granted the Azure Service Bus Data Receiver role on the Service Bus namespace. The trigger connection in the function code is named ServiceBusConnection. To ensure the Function App can successfully authenticate and connect using the user-assigned managed identity, which group of application settings must you configure?

Cevabı ve açıklamayı göster

Cevap: ServiceBusConnection__fullyQualifiedNamespace set to the namespace URL, ServiceBusConnection__credential set to managedidentity, and ServiceBusConnection__clientId set to the client ID of the user-assigned managed identity.

Cevap

Configure ServiceBusConnection__fullyQualifiedNamespace with the namespace URL, ServiceBusConnection__credential with managedidentity, and ServiceBusConnection__clientId with the client ID of the user-assigned managed identity.
The correct answer specifies ServiceBusConnection__fullyQualifiedNamespace, ServiceBusConnection__credential set to managedidentity, and ServiceBusConnection__clientId set to the client ID of the user-assigned managed identity. This aligns with the Azure Functions programming model for configuring user-assigned managed identities for external service triggers.

Adım Adım Çözüm

1
Define the connection endpoint.
Create the ServiceBusConnection__fullyQualifiedNamespace application setting and set it to the FQDN of the Service Bus namespace (e.g., namespace.servicebus.windows.net).
Identity-based connections in Azure Functions require specifying the fully qualified namespace endpoint rather than a complete connection string.
2
Specify the credential type.
Create the ServiceBusConnection__credential application setting and set its value to managedidentity.
This tells the Azure SDK to authenticate using a managed identity instead of trying to look for a client secret or other authentication mechanisms.
3
Associate the specific user-assigned identity.
Create the ServiceBusConnection__clientId application setting and set its value to the client ID of the user-assigned managed identity.
Since a user-assigned managed identity is used, the Function App needs the client ID of that identity to distinguish it from other identities or a system-assigned identity.

Anahtar Kavram

Azure Functions identity-based connections allow secure resource access without secrets by configuring FQDN and managed identity properties in the application settings.
ÖncekiSayfa 4 / 49Sonraki
Tüm alıştırma soruları — Microsoft Azure Developer (AZ-204) | Examkin