Courseiva
Design and implement build and release pipelinesmediumMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

Your build pipeline uses a YAML template to define steps. You want to pass a parameter to the template to conditionally run a task. What syntax should you use in the template?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

parameters:

The 'parameters' key in a YAML template is used to define parameters that can be passed to the template, allowing conditional execution based on the parameter value. Option B is incorrect: 'arguments' is not a standard YAML key for passing parameters to templates; it is used for specifying script arguments. Option C is incorrect: 'inputs' is used for task inputs within a step, not for template parameters. Option D is incorrect: 'variables' are used to define pipeline variables, not for passing parameters to templates.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • parameters:

    Why this is correct

    Template parameters are defined under the `parameters:` key at the top of a YAML template file, allowing values to be passed from the calling pipeline via `${{ parameters.paramName }}` syntax. This makes templates reusable and configurable at compile time, before the pipeline runs.

  • arguments:

    Why it's wrong here

    `arguments:` is not a valid YAML key for defining template parameters; instead, template parameters are declared with `parameters:`. The term 'arguments' appears in other contexts, like script/task arguments or pipeline resource trigger parameters, but not for template parameter definitions.

  • inputs:

    Why it's wrong here

    `inputs:` is used in task definitions, such as custom tasks, to describe the input metadata that a task accepts, not for template parameters. Template parameters live under `parameters:` and are resolved at template expansion time, not as task inputs.

  • variables:

    Why it's wrong here

    `variables:` defines pipeline variables, which are runtime values that can be used across stages, jobs, and steps, and are stored in `variables['name']` or `$(name)`. Unlike template parameters, variables are not compile-time parameters and cannot be used for template-level conditional logic.

About these practice questions

Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.