mediummultiple choiceObjective-mapped

Exhibit

Container group configuration:
- Name: cg-nightly-import
- Container image: contoso.azurecr.io/importer:1.2
- Job behavior: the process imports files, exits with code 0 on success, and should not run again until the next scheduled deployment
- Requirement: do not restart the container after successful completion

Based on the exhibit, which restart policy should be configured for the container group?

Question 1mediummultiple choice
Full question →

Based on the exhibit, which restart policy should be configured for the container group?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Always

Always would restart the container even after successful completion, which conflicts with the one-time job requirement.

B

Distractor review

OnFailure

OnFailure restarts when the container exits with an error, but the job should not restart after success either.

C

Best answer

Never

Never is the correct restart policy for a one-time task that should stop after finishing successfully. The exhibit describes a batch-style import job, not a long-running service. Using Never ensures the container exits and stays stopped until the next deployment or scheduled run. That behavior matches operational expectations for a completed import process.

D

Distractor review

UnlessStopped

UnlessStopped is not the right ACI behavior for a completed one-time task and would imply continued restart behavior.

Common exam trap

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Technical deep dive

How to think about this question

This question should be treated as a scenario, not a definition check. Identify the problem, the constraint and the best action. Then compare each option against those facts.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.
  • Use explanations to understand the rule behind the answer.

TExam Day Tips

  • Underline the problem statement mentally.
  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Related practice questions

Related AZ-104 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Read the scenario before looking for a memorised answer.

What is the correct answer to this question?

The correct answer is: Never — For a container that performs a one-time import and should stop after a successful exit, the restart policy should be Never. That setting prevents Azure Container Instances from starting the container again after it completes normally. The job is not a service that should stay available, so automatic restarts would be incorrect and could rerun the import unnecessarily. This is a common choice for batch or scheduled processing workloads. Why others are wrong: Always and OnFailure both introduce restart behavior that the scenario explicitly rejects after successful completion. UnlessStopped is not the appropriate ACI policy for a one-shot task and would not match the requested behavior.

What should I do if I get this AZ-104 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.