Question 320
A Key Vault transient outage causes every API request to fail because the application fetches the same unchanging secret on each call. A service retries Key Vault 429 responses in a tight loop and further exhausts available request capacity. Which course of action addresses the stated issues?
- Use bounded exponential backoff and honor service retry guidance; do not Cache the secret securely for a bounded interval with safe refresh handling.
- Cache the secret securely for a bounded interval with safe refresh handling; Fail closed on missing secrets and alert without logging sensitive values.
- Fail closed on missing secrets and alert without logging sensitive values; use bounded exponential backoff and honor service retry guidance.
- Cache the secret securely for a bounded interval with safe refresh handling; use bounded exponential backoff and honor service retry guidance.
Explanation
Correct Answer
D:Bounded caching limits vault dependency on every request without retaining stale values forever. controlled retries reduce pressure during throttling and preserve capacity for recovery.
Incorrect Answers
A:Controlled retries reduce pressure during throttling and preserve capacity for recovery; Requirement 1 requires: cache the secret securely for a bounded interval with safe refresh handling.
B:Use bounded exponential backoff and honor service retry guidance.
C:Missing authentication material must not silently downgrade the application security boundary; Requirement 1 requires: cache the secret securely for a bounded interval with safe refresh handling.
Question 321
A Python retrieval service stores a Cosmos DB account key in source control to open a NoSQL client. One long-running Python API process repeatedly instantiates a new CosmosClient for every request and suffers unnecessary connection overhead. Which response best addresses these needs?
- Reuse a properly configured CosmosClient instance across requests; do not use an Azure identity credential with supported Cosmos DB data-plane role authorization.
- Use a point read with the document id and partition key; Reuse a properly configured CosmosClient instance across requests.
- Use an Azure identity credential with supported Cosmos DB data-plane role authorization; Reuse a properly configured CosmosClient instance across requests.
- Use an Azure identity credential with supported Cosmos DB data-plane role authorization; use a point read with the document id and partition key.
Explanation
Correct Answer
C:Managed token authentication avoids shipping a long-lived account key with the application. long-lived client objects reuse connection resources instead of creating them for every operation.
Incorrect Answers
A:Long-lived client objects reuse connection resources instead of creating them for every operation; requirement 1 requires: using an Azure identity credential with supported Cosmos DB data-plane role authorization.
B:Point reads avoid the RU cost of a general query when both the id and partition key are known; requirement 1 requires: using an Azure identity credential with supported Cosmos DB data-plane role authorization.
D:Reuse a properly configured CosmosClient instance across requests.
Question 322
An Event Grid webhook responds with transient 503 errors during model maintenance, and notifications must be retried automatically. A webhook remains unavailable beyond Event Grid retry limits, but failed business events must be preserved for reconciliation. What is the most appropriate plan for this situation?
- Configure a suitable Event Grid retry policy on the subscription; configure a dead-letter destination for undeliverable Event Grid events.
- Configure a suitable Event Grid retry policy on the subscription; Make event processing idempotent using the event identifier and business key.
- Make event processing idempotent using the event identifier and business key; configure a dead-letter destination for undeliverable Event Grid events.
- Configure a dead-letter destination for undeliverable Event Grid events; do not configure a suitable Event Grid retry policy on the subscription.
Explanation
Correct Answer
A:The delivery system retries eligible failures within its configured attempts and lifetime. dead-letter storage preserves events that could not be delivered within policy limits.
Incorrect Answers
B:Configure a dead-letter destination for undeliverable Event Grid events.
C:Event delivery may be retried, so duplicate notifications must not create duplicate side effects; requirement 1 requires: configuring a suitable Event Grid retry policy on the subscription.
D:Dead-letter storage preserves events that could not be delivered within policy limits; requirement 1 requires: configuring a suitable Event Grid retry policy on the subscription.
Question 323
A background Container App processes Service Bus messages but has no HTTP callers; its ingress is unnecessarily public. A Container App HTTP service responds only when called inside its environment, but partners require a public HTTPS endpoint. Which course of action addresses the stated issues?
- Disable ingress for the worker and use its event-based scale trigger; enable and secure supported external ingress for the intended container port.
- Add the appropriate application authentication and authorization control in addition to ingress restrictions; enable and secure supported external ingress for the intended container port.
- Disable ingress for the worker and use its event-based scale trigger; add the appropriate application authentication and authorization control in addition to ingress restrictions.
- Enable and secure supported external ingress for the intended container port; do not Disable ingress for the worker and use its event-based scale trigger.
Explanation
Correct Answer
A:An event consumer need not expose an inbound web endpoint to process queued work. external ingress provides the routed public endpoint while the configured port targets the app listener.
Incorrect Answers
B:Network reachability alone does not decide which user or application can invoke protected operations; Requirement 1 requires: disable ingress for the worker and use its event-based scale trigger.
C:Enable and secure supported external ingress for the intended container port.
D:External ingress provides the routed public endpoint while the configured port targets the app listener; Requirement 1 requires: disable ingress for the worker and use its event-based scale trigger.
Question 324
A new Azure Container Apps image needs a canary serving 10 percent of traffic while the prior revision handles the rest. A Container App deployment retains several active revisions although policy allows only the newest version to receive traffic. Which response best addresses these needs?
- Reactivate the known-good retained revision and redirect traffic through the supported revision controls; use single revision mode for the app after verifying the rollout policy.
- Use single revision mode for the app after verifying the rollout policy; do not enable multiple active revisions and configure weighted traffic splitting.
- Enable multiple active revisions and configure weighted traffic splitting; use single revision mode for the app after verifying the rollout policy.
- Enable multiple active revisions and configure weighted traffic splitting; Reactivate the known-good retained revision and redirect traffic through the supported revision controls.
Explanation
Correct Answer
C:Multiple revision mode supports controlled percentage-based routing across active revisions. single revision mode retires the old active revision as the new one becomes ready.
Incorrect Answers
A:Revision snapshots allow a previous version to be returned to service without altering its immutable configuration; Requirement 1 requires: enable multiple active revisions and configure weighted traffic splitting.
B:Single revision mode retires the old active revision as the new one becomes ready; Requirement 1 requires: enable multiple active revisions and configure weighted traffic splitting.
D:Use single revision mode for the app after verifying the rollout policy.
Question 325
A Cosmos DB NoSQL retrieval API sorts document vectors by similarity but returns far too many candidates and runs expensive queries. A legal RAG system retrieves semantically similar text but includes documents belonging to other tenants. What is the most appropriate plan for this situation?
- Use a bounded TOP clause with VectorDistance ordering; Order the top-k retrieval by the intended VectorDistance expression.
- Apply the tenant authorization filter in the vector query and enforce access on returned documents; do not use a bounded TOP clause with VectorDistance ordering.
- Use a bounded TOP clause with VectorDistance ordering; apply the tenant authorization filter in the vector query and enforce access on returned documents.
- Order the top-k retrieval by the intended VectorDistance expression; apply the tenant authorization filter in the vector query and enforce access on returned documents.
Explanation
Correct Answer
C:Limiting nearest-neighbor results controls work and delivers a predictable retrieval candidate count. semantic similarity alone does not impose tenant security boundaries.
Incorrect Answers
A:Apply the tenant authorization filter in the vector query and enforce access on returned documents.
B:Semantic similarity alone does not impose tenant security boundaries; requirement 1 requires: using a bounded TOP clause with VectorDistance ordering.
D:A distance ranking is necessary to return nearest neighbors instead of chronological results; requirement 1 requires: using a bounded TOP clause with VectorDistance ordering.
Question 326
A Python inference image includes compilers and development dependencies that are unnecessary at runtime and increase exposure. An API token supplied as a Docker build argument appears in image history during a release audit. Which course of action addresses the stated issues?
- Use a multi-stage Docker build with a lean runtime stage; use supported ephemeral build secrets rather than embedding sensitive values in image layers.
- Configure the image and runtime to use a dedicated non-root identity; use supported ephemeral build secrets rather than embedding sensitive values in image layers.
- Use a multi-stage Docker build with a lean runtime stage; configure the image and runtime to use a dedicated non-root identity.
- Use supported ephemeral build secrets rather than embedding sensitive values in image layers; do not use a multi-stage Docker build with a lean runtime stage.
Explanation
Correct Answer
A:The runtime image need not inherit build tools and temporary artifacts from its builder stage. layer and build metadata can retain argument values; ephemeral secret mounts avoid persisting them in artifacts.
Incorrect Answers
B:Reduced container privileges limit the damage of a compromised application process; requirement 1 requires: using a multi-stage Docker build with a lean runtime stage.
C:Use supported ephemeral build secrets rather than embedding sensitive values in image layers.
D:Layer and build metadata can retain argument values; ephemeral secret mounts avoid persisting them in artifacts; requirement 1 requires: using a multi-stage Docker build with a lean runtime stage.
Question 327
A multitenant Cosmos container receives heavy writes and a partition key based on one constant value throttles all tenants together. A chat application queries one tenant's conversation records constantly but partitions documents only by creation month. Which response best addresses these needs?
- Choose a higher-cardinality partition key aligned with workload access patterns; Include the tenant partition-key value in SDK queries or requests.
- Choose a higher-cardinality partition key aligned with workload access patterns; Partition by an appropriate tenant or tenant-session key to localize frequent reads.
- Partition by an appropriate tenant or tenant-session key to localize frequent reads; do not choose a higher-cardinality partition key aligned with workload access patterns.
- Include the tenant partition-key value in SDK queries or requests; Partition by an appropriate tenant or tenant-session key to localize frequent reads.
Explanation
Correct Answer
B:A constant partition key concentrates data and throughput into a hot logical partition. partition-key choice should match high-volume query predicates and distribute traffic.
Incorrect Answers
A:Partition by an appropriate tenant or tenant-session key to localize frequent reads.
C:Partition-key choice should match high-volume query predicates and distribute traffic; requirement 1 requires: choosing a higher-cardinality partition key aligned with workload access patterns.
D:Supplying the partition key narrows execution instead of fanning queries across partitions; requirement 1 requires: choosing a higher-cardinality partition key aligned with workload access patterns.
Question 328
Two microservices must communicate privately inside a Container Apps environment while only the gateway is internet-facing. Container Apps workloads have no central log destination, preventing engineers from correlating failed revision starts. What is the most appropriate plan for this situation?
- Configure internal ingress for the backend app and external ingress only for the gateway; deploy the Container Apps environment with the supported virtual-network configuration and routes.
- Deploy the Container Apps environment with the supported virtual-network configuration and routes; connect the Container Apps environment to a suitable Log Analytics workspace.
- Configure internal ingress for the backend app and external ingress only for the gateway; connect the Container Apps environment to a suitable Log Analytics workspace.
- Connect the Container Apps environment to a suitable Log Analytics workspace; do not configure internal ingress for the backend app and external ingress only for the gateway.
Explanation
Correct Answer
C:Internal ingress limits direct public exposure while allowing approved environment-level routing. environment logging makes platform and console events available for centralized investigation.
Incorrect Answers
A:Connect the Container Apps environment to a suitable Log Analytics workspace.
B:Environment-level network integration determines permitted workload paths beyond application code; requirement 1 requires: configuring internal ingress for the backend app and external ingress only for the gateway.
D:Environment logging makes platform and console events available for centralized investigation; requirement 1 requires: configuring internal ingress for the backend app and external ingress only for the gateway.
Question 329
Developers can manage all Key Vault access policies although their application needs only to retrieve one secret. A service has Reader on the Key Vault resource in Azure Resource Manager but cannot retrieve secret values. Which course of action addresses the stated issues?
- Assign a narrowly scoped Key Vault secrets access role rather than vault administration; grant the appropriate Key Vault data-plane permission rather than only management-plane Reader.
- Grant the appropriate Key Vault data-plane permission rather than only management-plane Reader; do not assign a narrowly scoped Key Vault secrets access role rather than vault administration.
- Split environment identities and restrict each to its required Key Vault scope; grant the appropriate Key Vault data-plane permission rather than only management-plane Reader.
- Assign a narrowly scoped Key Vault secrets access role rather than vault administration; Split environment identities and restrict each to its required Key Vault scope.
Explanation
Correct Answer
A:Separating secret consumption from access management limits privilege escalation. aRM resource visibility and access to vault secret values are different authorization planes.
Incorrect Answers
B:ARM resource visibility and access to vault secret values are different authorization planes; requirement 1 requires: assigning a narrowly scoped Key Vault secrets access role rather than vault administration.
C:Identity separation prevents test compromises from exposing production credentials; requirement 1 requires: assigning a narrowly scoped Key Vault secrets access role rather than vault administration.
D:Grant the appropriate Key Vault data-plane permission rather than only management-plane Reader.
Question 330
Developers update a Dockerfile in a source repository but image builds begin only when someone remembers to run a local command. An approved base image receives security updates while dependent application images remain unchanged for months. Which response best addresses these needs?
- Set an ACR Task source-commit trigger for the image build; configure an ACR Task base-image update trigger for the dependent image.
- Configure a scheduled ACR Task to build the test image; configure an ACR Task base-image update trigger for the dependent image.
- Configure an ACR Task base-image update trigger for the dependent image; do not Set an ACR Task source-commit trigger for the image build.
- Set an ACR Task source-commit trigger for the image build; configure a scheduled ACR Task to build the test image.
Explanation
Correct Answer
A:A source trigger starts registry-hosted builds when tracked code changes occur. base-image triggers can rebuild supported dependent images after upstream image changes.
Incorrect Answers
B:Scheduled registry tasks produce images at a controlled cadence without a local build host; Requirement 1 requires: set an ACR Task source-commit trigger for the image build.
C:Base-image triggers can rebuild supported dependent images after upstream image changes; Requirement 1 requires: set an ACR Task source-commit trigger for the image build.
D:Configure an ACR Task base-image update trigger for the dependent image.
Developing AI Cloud Solutions on Azure (AI-200) Practice Tests