Question 420
A team has a Linux container listening on port 8080 but App Service's health probes attempt a different port. A production App Service points to an ACR repository but still starts an old image after a new tagged build was pushed. Which response best addresses these needs?
- Rebuild for a compatible Linux runtime or use an appropriate supported Windows container host; update the configured image reference to the newly approved version and redeploy.
- Update the configured image reference to the newly approved version and redeploy; do not configure App Service's container port settings to match the application's listening port.
- Configure App Service's container port settings to match the application's listening port; update the configured image reference to the newly approved version and redeploy.
- Configure App Service's container port settings to match the application's listening port; Rebuild for a compatible Linux runtime or use an appropriate supported Windows container host.
Explanation
Correct Answer
C:The platform's ingress must target the port exposed by the running application. hosting configuration must reference the intended image rather than assuming every pushed image is deployed.
Incorrect Answers
A:Configure App Service's container port settings to match the application's listening port.
B:Update the configured image reference to the newly approved version and redeploy; do not configure App Service's container port settings to match the application's listening port: hosting configuration must reference the intended image rather than assuming every pushed image is deployed; requirement 1 requires: configuring App Service's container port settings to match the application's listening port.
D:Operating-system dependencies must match the selected container hosting environment; requirement 2 requires: updating the configured image reference to the newly approved version and redeploy.
Question 421
A bursty inference webhook has long idle periods and the team wants consumption-based execution instead of permanent VMs. A Function repeatedly exceeds its chosen hosting plan's maximum execution duration while generating large reports. What is the most appropriate plan for this situation?
- Select a supported consumption-oriented Azure Functions hosting plan appropriate to its runtime; evaluate an appropriate Functions hosting plan with prewarmed or always-ready capacity.
- Split the job into durable asynchronous work or choose supported longer-running hosting; do not select a supported consumption-oriented Azure Functions hosting plan appropriate to its runtime.
- Select a supported consumption-oriented Azure Functions hosting plan appropriate to its runtime; Split the job into durable asynchronous work or choose supported longer-running hosting.
- Evaluate an appropriate Functions hosting plan with prewarmed or always-ready capacity; Split the job into durable asynchronous work or choose supported longer-running hosting.
Explanation
Correct Answer
C:Serverless plans allocate function capacity based on executions and configured scaling behavior. runtime timeout limits cannot be overcome by only increasing HTTP client timeouts.
Incorrect Answers
A:Keeping capacity warm reduces initialization latency at an ongoing resource cost; Requirement 2 requires: split the job into durable asynchronous work or choose supported longer-running hosting.
B:Split the job into durable asynchronous work or choose supported longer-running hosting; do not select a supported consumption-oriented Azure Functions hosting plan appropriate to its runtime: runtime timeout limits cannot be overcome by only increasing HTTP client timeouts; requirement 1 requires: selecting a supported consumption-oriented Azure Functions hosting plan appropriate to its runtime.
D:Select a supported consumption-oriented Azure Functions hosting plan appropriate to its runtime.
Question 422
A message publisher retries after a network timeout and accidentally queues the same embedding job twice. A queue's duplicate-detection feature rejects intended follow-up jobs because every new job uses the same fixed MessageId. Which course of action addresses the stated issues?
- Enable Service Bus duplicate detection and reuse a stable MessageId during retry; assign a unique stable identifier per logical operation, not a constant value.
- Assign a unique stable identifier per logical operation, not a constant value; do not enable Service Bus duplicate detection and reuse a stable MessageId during retry.
- Make the consumer idempotent using a durable business-operation key; assign a unique stable identifier per logical operation, not a constant value.
- Enable Service Bus duplicate detection and reuse a stable MessageId during retry; Make the consumer idempotent using a durable business-operation key.
Explanation
Correct Answer
A:Duplicate detection compares message identifiers within the configured history window. identifier reuse makes distinct operations look like duplicate submissions.
Incorrect Answers
B:Assign a unique stable identifier per logical operation, not a constant value; do not enable Service Bus duplicate detection and reuse a stable MessageId during retry: identifier reuse makes distinct operations look like duplicate submissions; Requirement 1 requires: enable Service Bus duplicate detection and reuse a stable MessageId during retry.
C:Enable Service Bus duplicate detection and reuse a stable MessageId during retry.
D:Send-side duplicate detection cannot prevent reprocessing caused by receive and settlement failures; requirement 2 requires: assigning a unique stable identifier per logical operation, not a constant value.
Question 423
An Azure deployment log accidentally prints a Key Vault secret value during a failed release. A developer commits an App Configuration access key to a public repository and then deletes the commit from the latest branch. Which response best addresses these needs?
- Revoke or rotate the exposed App Configuration credential and update clients; do not Rotate the disclosed secret and remove sensitive values from diagnostic output.
- Use a managed identity and narrowly scoped Blob Data Reader rights; Revoke or rotate the exposed App Configuration credential and update clients.
- Rotate the disclosed secret and remove sensitive values from diagnostic output; use a managed identity and narrowly scoped Blob Data Reader rights.
- Rotate the disclosed secret and remove sensitive values from diagnostic output; Revoke or rotate the exposed App Configuration credential and update clients.
Explanation
Correct Answer
D:Suppressing the log after exposure does not invalidate a secret that may already be copied. a credential can remain disclosed through history or external copies after deletion from current code.
Incorrect Answers
A:Revoke or rotate the exposed App Configuration credential and update clients; do not Rotate the disclosed secret and remove sensitive values from diagnostic output: a credential can remain disclosed through history or external copies after deletion from current code; Requirement 1 requires: rotate the disclosed secret and remove sensitive values from diagnostic output.
B:Rotate the disclosed secret and remove sensitive values from diagnostic output.
C:Data-plane role assignment reduces access beyond the required blob operations; Requirement 2 requires: revoke or rotate the exposed App Configuration credential and update clients.
Question 424
A Function invocation fails in Azure but local execution succeeded, and operators cannot tell which exception was raised. A Function App reports no discovered Python functions after a deployment that changed how handlers are registered. What is the most appropriate plan for this situation?
- Check function_app.py decorator discovery and runtime configuration for the Python model; do not inspect Function logs and Application Insights traces for the failing invocation.
- Inspect Function logs and Application Insights traces for the failing invocation; check function_app.py decorator discovery and runtime configuration for the Python model.
- Tune host concurrency and scale limits to protect the dependent API; check function_app.py decorator discovery and runtime configuration for the Python model.
- Inspect Function logs and Application Insights traces for the failing invocation; Tune host concurrency and scale limits to protect the dependent API.
Explanation
Correct Answer
B:Correlated telemetry identifies invocation errors and dependencies in the deployed environment. unsupported function registration prevents the runtime from indexing trigger definitions.
Incorrect Answers
A:Check function_app.py decorator discovery and runtime configuration for the Python model; do not inspect Function logs and Application Insights traces for the failing invocation: unsupported function registration prevents the runtime from indexing trigger definitions; requirement 1 requires: inspecting Function logs and Application Insights traces for the failing invocation.
C:Inspect Function logs and Application Insights traces for the failing invocation.
D:Function trigger throughput must account for downstream capacity and retry behavior; requirement 2 requires: checking function_app.py decorator discovery and runtime configuration for the Python model.
Question 425
Two assistants read the same Cosmos DB record and overwrite each other's edits with unconditional replacements. A chat service needs to perform two writes atomically within the same logical partition. Which course of action addresses the stated issues?
- Use a Cosmos DB transactional batch scoped to one partition key; do not use ETag-based conditional writes with If-Match concurrency control.
- Use ETag-based conditional writes with If-Match concurrency control; use a Cosmos DB transactional batch scoped to one partition key.
- Use ETag-based conditional writes with If-Match concurrency control; use a suitable Cosmos DB partial document patch operation.
- Use a suitable Cosmos DB partial document patch operation; use a Cosmos DB transactional batch scoped to one partition key.
Explanation
Correct Answer
B:Conditional writes reject an update when another writer has changed the observed version. transactional batch offers atomic execution for operations sharing the partition-key scope.
Incorrect Answers
A:Use a Cosmos DB transactional batch scoped to one partition key; do not use ETag-based conditional writes with If-Match concurrency control: transactional batch offers atomic execution for operations sharing the partition-key scope; requirement 1 requires: using ETag-based conditional writes with If-Match concurrency control.
C:Targeted patching changes selected fields without resubmitting the full document body; requirement 2 requires: using a Cosmos DB transactional batch scoped to one partition key.
D:Use ETag-based conditional writes with If-Match concurrency control.
Question 426
One document indexing job takes longer than the initial Service Bus message lock and is sometimes processed twice. A handler catches MessageLockLost and nevertheless records the message as successfully settled. Which response best addresses these needs?
- Configure automatic lock renewal within limits and keep the handler idempotent; Lower prefetch to match processing concurrency and lock duration.
- Treat lost-lock settlement as uncertain and rely on idempotent retry semantics; do not configure automatic lock renewal within limits and keep the handler idempotent.
- Lower prefetch to match processing concurrency and lock duration; Treat lost-lock settlement as uncertain and rely on idempotent retry semantics.
- Configure automatic lock renewal within limits and keep the handler idempotent; Treat lost-lock settlement as uncertain and rely on idempotent retry semantics.
Explanation
Correct Answer
D:Renewed locks extend a valid processing window; idempotence protects against unavoidable redelivery. a stale lock token cannot prove that the broker accepted completion.
Incorrect Answers
A:Prefetched messages may already be locked before the application begins handling them; Requirement 2 requires: treat lost-lock settlement as uncertain and rely on idempotent retry semantics.
B:Treat lost-lock settlement as uncertain and rely on idempotent retry semantics; do not configure automatic lock renewal within limits and keep the handler idempotent: a stale lock token cannot prove that the broker accepted completion; requirement 1 requires: configuring automatic lock renewal within limits and keep the handler idempotent.
C:Configure automatic lock renewal within limits and keep the handler idempotent.
Question 427
An Event Grid subscriber should receive only model-build completion events, not all storage and import events from the topic. An integration requires filtering Event Grid events by a custom payload property such as approved tenant tier. What is the most appropriate plan for this situation?
- Add a supported advanced filter for the payload property; do not add an Event Grid event-type filter to the event subscription.
- Configure an appropriate Event Grid subject-begins-with filter; add a supported advanced filter for the payload property.
- Add an Event Grid event-type filter to the event subscription; add a supported advanced filter for the payload property.
- Add an Event Grid event-type filter to the event subscription; configure an appropriate Event Grid subject-begins-with filter.
Explanation
Correct Answer
C:Type filtering reduces unwanted delivery before the handler receives an event. advanced filters evaluate selected event fields beyond simple event type or subject prefixes.
Incorrect Answers
A:Add a supported advanced filter for the payload property; do not add an Event Grid event-type filter to the event subscription: advanced filters evaluate selected event fields beyond simple event type or subject prefixes; Requirement 1 requires: add an Event Grid event-type filter to the event subscription.
B:Add an Event Grid event-type filter to the event subscription.
D:Subject filters target resource paths without requiring the endpoint to discard unrelated notifications; Requirement 2 requires: add a supported advanced filter for the payload property.
Question 428
A multitenant retrieval API constructs Cosmos SQL with direct string concatenation from user-supplied query text. An AI search pipeline requests a query page but ignores continuation tokens, silently omitting most results. Which course of action addresses the stated issues?
- Project the required fields in its SQL SELECT instead of returning full documents; Consume the query iterator's continuation tokens until the intended result set is complete.
- Use parameterized Cosmos DB SQL queries for untrusted values; Project the required fields in its SQL SELECT instead of returning full documents.
- Use parameterized Cosmos DB SQL queries for untrusted values; Consume the query iterator's continuation tokens until the intended result set is complete.
- Consume the query iterator's continuation tokens until the intended result set is complete; do not use parameterized Cosmos DB SQL queries for untrusted values.
Explanation
Correct Answer
C:Query parameters separate caller input from query syntax and improve correctness and safety. cosmos query results are paged, so one response may not contain every matching item.
Incorrect Answers
A:Use parameterized Cosmos DB SQL queries for untrusted values.
B:Narrow projections reduce transfer and deserialization work for metadata-only reads; Requirement 2 requires: consume the query iterator's continuation tokens until the intended result set is complete.
D:Consume the query iterator's continuation tokens until the intended result set is complete; do not use parameterized Cosmos DB SQL queries for untrusted values: cosmos query results are paged, so one response may not contain every matching item; requirement 1 requires: using parameterized Cosmos DB SQL queries for untrusted values.
Question 429
An AI similarity query becomes slow after adding a metadata predicate, and the team assumes the vector index is being used. The database chooses an unexpectedly expensive plan because table and index statistics have become stale after a bulk import. Which response best addresses these needs?
- Inspect EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs; add a suitable B-tree index on the high-selectivity tenant filter where justified.
- Add a suitable B-tree index on the high-selectivity tenant filter where justified; Refresh planner statistics with the approved ANALYZE maintenance process.
- Inspect EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs; Refresh planner statistics with the approved ANALYZE maintenance process.
- Refresh planner statistics with the approved ANALYZE maintenance process; do not inspect EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs.
Explanation
Correct Answer
C:A measured plan shows whether the query uses its expected index or incurs expensive filtering. updated statistics help PostgreSQL choose between available scan and join methods.
Incorrect Answers
A:Conventional relational predicates can benefit from ordinary indexes independent of vector search; Requirement 2 requires: refresh planner statistics with the approved ANALYZE maintenance process.
B:Inspect EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs.
D:Refresh planner statistics with the approved ANALYZE maintenance process; do not inspect EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs: updated statistics help PostgreSQL choose between available scan and join methods; requirement 1 requires: inspecting EXPLAIN ANALYZE with BUFFERS to identify the actual scan and filter costs.
Question 430
A diagnostic event includes a dynamic array of attempted model endpoints and the engineer wants to examine each attempt separately. An incident dashboard uses distinct user counts from logs but service accounts are repeated across requests and it shows request counts instead. What is the most appropriate plan for this situation?
- Use an appropriate KQL mv-expand on the parsed dynamic array; use a KQL distinct-count aggregation for the intended identity dimension.
- Use a KQL distinct-count aggregation for the intended identity dimension; do not use an appropriate KQL mv-expand on the parsed dynamic array.
- Use an appropriate KQL mv-expand on the parsed dynamic array; Convert the latency field to a numeric KQL type before comparisons.
- Convert the latency field to a numeric KQL type before comparisons; use a KQL distinct-count aggregation for the intended identity dimension.
Explanation
Correct Answer
A:Expanding array elements exposes each attempt as a separate row for analysis. The second works because a distinct-count expression measures unique identities rather than total event rows. Both parts are needed to meet the stated constraints.
Incorrect Answers
B:Use a KQL distinct-count aggregation for the intended identity dimension; do not use an appropriate KQL mv-expand on the parsed dynamic array: a distinct-count expression measures unique identities rather than total event rows; requirement 1 requires: using an appropriate KQL mv-expand on the parsed dynamic array.
C:Numeric conversion avoids treating '100' as less than '20' in string ordering; requirement 2 requires: using a KQL distinct-count aggregation for the intended identity dimension.
D:Use an appropriate KQL mv-expand on the parsed dynamic array.
Developing AI Cloud Solutions on Azure (AI-200) Practice Tests