You are designing a YAML template for Azure Pipelines that includes a parameter named outputfile. Which two syntaxes can be used to reference this parameter in the template? (Select two.)
Choose an answer
Tap an option to check your answer.
Correct answer: ${{parameters.outputfile}}, ${{parameters['outputfile']}}.
Why this is the answer
Azure Pipelines YAML templates use specific syntax for referencing parameters. The parameters object is accessed using either dot notation or bracket notation within an expression. The ${{}} syntax denotes a template expression, which is evaluated at compile time before the pipeline runs. Therefore, both ${{parameters.outputfile}} and ${{parameters['outputfile']}} are valid ways to reference a parameter named outputfile. The options using $() syntax, such as $(parameters.outputfile) or $(parameters['outputfile']), represent runtime expressions, which are evaluated during pipeline execution. Parameters, however, are typically resolved at compile time for template processing.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed