exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 6 question 22 discussion

Actual exam question from Microsoft's AZ-400
Question #: 22
Topic #: 6
[All AZ-400 Questions]

You are designing a YAML template for use with Azure Pipelines. The template will include the outputfile parameter.
Which two methods can you use to reference the parameter? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

  • A. ${{parameters.outputfile}}
  • B. $(parameters['outputfile'])
  • C. $(parameters.outputfile)
  • D. $(parameters[outputfile])
  • E. ${{parameters['outputfile']}}
Show Suggested Answer Hide Answer
Suggested Answer: AE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
pdk88
Highly Voted 2 years, 8 months ago
Selected Answer: AE
${{ parameters['solution'] }} # index syntax ${{ parameters.solution }} # property dereference syntax https://learn.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#template-expressions
upvoted 11 times
...
Miten94
Most Recent 11 months ago
Came in Exam June 23, 2024
upvoted 1 times
...
ozbonny
1 year, 2 months ago
Selected Answer: AE
To reference the outputfile parameter in a YAML template for Azure Pipelines, you can use the ${{ parameters.outputfile }} syntax or the ${{ parameters['outputfile'] }} syntax. Both of these methods are valid and commonly used. So, the correct options are: A. ${{parameters.outputfile}} E. ${{parameters['outputfile']}}
upvoted 1 times
...
vsvaid
1 year, 5 months ago
Selected Answer: AE
Agree with answer
upvoted 1 times
...
zellck
1 year, 11 months ago
Selected Answer: AE
AE is the answer. https://learn.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script Parameters are only available at template parsing time. Parameters are expanded just before the pipeline runs so that values surrounded by ${{ }} are replaced with parameter values. Use variables if you need your values to be more widely available during your pipeline run.
upvoted 4 times
...
AlexeyG
2 years, 2 months ago
got this in 02 March 2023 exams. scored 870 marks.
upvoted 4 times
...
lugia4000
2 years, 3 months ago
double curly brackets double curly brackets is the correct
upvoted 2 times
...
Darkeh
2 years, 8 months ago
Selected Answer: AE
Mohammad is correct - read his comment.
upvoted 3 times
...
sieira
2 years, 8 months ago
AE https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#template-expressions
upvoted 3 times
...
MohmmadFayez
2 years, 8 months ago
Selected Answer: AE
Answer correct A & B Parameters can be referenced with Template expressions. Template Expression there is 2 forms of syntax : ${{ parameters['solution'] }} # index syntax & ${{ parameters.solution }} # property dereference syntax https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#template-expressions Regarding to C : this is Macro syntax and can be used to reference variables at runtime cant use it with parameters https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#runtime-expression-syntax
upvoted 4 times
...
hebertpena88
2 years, 8 months ago
Selected Answer: AC
I always use ${{parameters.foo}} and sometimes maybe you will use it with IF then you can use: ${{ if eq(length(parameters.foo), 0) }}: Thus, only A and C fit in.
upvoted 1 times
...
syu31svc
2 years, 8 months ago
Selected Answer: AC
From what is seen from the link, I would take A and C
upvoted 1 times
...
KozaL
2 years, 8 months ago
Should be A,C
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago