Microsoft certification · Exam AI-200

AI-200 Mock Exam Page 5

Developing AI Cloud Solutions on Azure

Free AI-200 mock exam questions 41–42, each with the answer and an explanation.

20 questions · 40 minutes · free, no sign-up

Free AI-200 questions

41–42 of 42 free
Question 41
You are using the Python SDK to develop a containerized AI application that retrieves the value of a runtime setting stored in an Azure App Configuration resource. The application will run in Azure in the security context of a managed identity.
The application must work in a local development environment without any code changes.
You need to complete the code that implements the retrieval.
How should you complete the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.
Show answerHide answer

Explanation



Explanation

DefaultAzureCredential: The application must work both in a local development environment and in Azure using a managed identity, all without code changes. DefaultAzureCredential is designed specifically for this scenario. It automatically attempts a chain of authentication methods: locally, it will use your developer credentials (like Azure CLI or Visual Studio), and when deployed to Azure, it will automatically detect and use the assigned Managed Identity.

get_configuration_setting: The goal is to retrieve the value of a specific runtime setting ("FeatureX" with the label "production"). The get_configuration_setting method is the correct SDK method to fetch a single key-value pair. It takes the key and optional keyword arguments (like label) and returns the specific configuration setting.

Why the Other Options Are Incorrect

ClientSecretCredential / ManagedIdentityCredential:

ClientSecretCredential: Requires hardcoding or passing a client secret, which breaks the requirement to run locally without code changes (since local wouldn't have the Azure Managed Identity) and is less secure.

ManagedIdentityCredential: Strictly enforces managed identity authentication. It will fail in a local development environment because managed identities only exist within Azure resources.

list_labels / list_configuration_settings: These methods are used to list multiple items. list_labels returns the available labels in the App Configuration store, and list_configuration_settings returns a collection of settings. Neither is used to retrieve the value of a single specific key like "FeatureX".

References

Microsoft Learn: DefaultAzureCredential overview
Question 42
You are developing a microservices-based application that uses Azure Container Apps. The application consists of several containerized services that handle tasks, such as processing orders, managing inventory, and generating reports.
Report generation must be implemented as follows:
Process reports every Sunday at midnight.
Minimize app resources during report generation.
Record metrics in the same location as other containers.
Use the same virtual network as other containers.
Show answerHide answer

Explanation



Explanation

job (and create): The requirement states the process must run every Sunday at midnight and minimize app resources when not running. In Azure Container Apps, Jobs are designed for exactly this type of run-to-completion, task-based workload. Unlike standard Container Apps (which run continuously), Jobs spin up a container, perform the task, and then deallocate resources, saving costs. The command az containerapp job create is used to create this resource.

Schedule (trigger type): Because the report generation must run at a specific, recurring time (every Sunday at midnight), you must use a scheduled trigger. The --trigger-type Schedule parameter configures the Container App Job to run based on a CRON expression.

Note on the requirements: Using a Container App Job automatically satisfies the other requirements—it will be deployed into the same environment (virtual network) and sends logs/metrics to the same Log Analytics workspace as the other container apps by default.

Why the Other Options Are Incorrect

env (and its related command): This is used to create or manage a Container Apps Environment (the secure boundary around your apps and jobs), not the scheduled report generation workload itself.

Event: An Event trigger is used when the job should run in response to an event, such as a message arriving in a queue (like Azure Storage Queue or Kafka). It is not for time-based schedules.

Manual: A Manual trigger requires an external caller or script to explicitly start the job. It will not run automatically every Sunday at midnight.

References

Microsoft Learn: Jobs in Azure Container Apps (Explains the difference between apps and jobs, and trigger types).

That's the last free question

You've seen the free 30% (42 of 142 questions). Full access unlocks every question and full-length AI-200 mock exams (60 questions, 120 minutes), a different mock on every attempt.

Unlock full mock exam
Full mock exam

Sit the AI-200 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real AI-200 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full AI-200 mock exam
  • 60questions per mock
  • 120 mintime limit
  • 142questions in the bank
  • Newmock on every attempt