AZ-204 Exam QuestionsBrowse all questions from this exam

AZ-204 Exam - Question 288


HOTSPOT -

You are working for Contoso, Ltd.

You define an API Policy object by using the following XML markup:

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Hot Area:

Show Answer
Correct Answer:

Box 1: Yes -

Use the set-backend-service policy to redirect an incoming request to a different backend than the one specified in the API settings for that operation. Syntax:

Box 2: No -

The condition is on 512k, not on 256k.

Box 3: No -

The set-backend-service policy changes the backend service base URL of the incoming request to the one specified in the policy.

Reference:

https://docs.microsoft.com/en-us/azure/api-management/api-management-transformation-policies

Discussion

9 comments
Sign in to comment
paru123456789
Mar 2, 2021

Answer: Yes No No

clarionprogrammer
Apr 16, 2021

This is correct.

KingChuang
Dec 27, 2022

On my exam 2022-12-26. Chose:Y/N/N

TonyMel
Mar 25, 2023

correct, in 2023Mar24, score: 904/1000.

Cornholioz
Dec 23, 2020

It's doing nothing in the When condition. So if msg is <512, it does nothing. The otherwise gets executed only for >512 ??? So it will set backend service only for msgs >512? Question doesn't talk about this case. Also, like someone said in the other discussion for this question: technically >256k can be >512k Poorly framed question!!!

MiraA
Oct 1, 2021

I think that no action in <when> means nothing needs to be changed (for requests with body < 512000) so the back-end service URL remains as specified in the policy. And only large requests (> 512000) will be redirected to API 9.1 using <set-backend-service> in <otherwise> branch. https://docs.microsoft.com/en-us/azure/api-management/api-management-transformation-policies#SetBackendService

Knightie
Aug 27, 2022

not framed, just tricked.. if body > 512k wther you use 1024 base of 1000 base, nevermind, it just change the base URL and use /put instead.. it does not give an error, that's what otherwise for.

Araneus
Nov 25, 2020

I would say "it depends" for the third question. Since the set-backend-service policy is in the otherwise block, it would only rewrite the URL for requests with a body size of >=512000. Or am I missing a clue here?

Cornholioz
Nov 28, 2020

I think Araneus is right. Easy to miss. Looks like a basic WHEN / OTHERWISE condition to me. If bodysize limit is not hit, it will never reach the OTHERWISE scope and hence will not retain a higher version. I think.

Zidimirite
Apr 9, 2021

You mean will retain a higher version, right? Since the OTHERWISE scope doesn't get executed hence the set-backend-service isn't set to 9.1? 9.1 is the lower version.

ahadjithoma
Dec 9, 2020

Use the set-backend-service policy to redirect an incoming request to a different backend than the one specified in the API settings for that operation. This policy changes the backend service base URL of the incoming request to the one specified in the policy. Ref: https://docs.microsoft.com/en-us/azure/api-management/api-management-transformation-policies So it looks like why don't even care if any of the WHEN / OTHERWISE conditions are met, since the 9.2 is not specified anywhere in the given code snippet

deborahQ
Oct 26, 2022

to my understanding, if the body size is less then 512K, it could use higher version (if it has and requested, which is not mentioned here).

iiiihhhh
Dec 14, 2020

There is another discussion for the question: https://www.examtopics.com/discussions/microsoft/view/23300-exam-az-204-topic-5-question-8-discussion/

NightshadeRC
Jul 26, 2023

Had this question in today's exam: 2023-07-26

lugospod
Jan 19, 2022

Got this one 01/2022. Went with yes no no

AlexeyG
Feb 16, 2023

Got this in 16/02/2023

Pomphard
Apr 11, 2021

For statements 2 & 3, I think they try to emphasize whether something will happen or may happen >256K may be larger than 512K, so it may happen but there's no guarantee as the size might be in between these values The base URL may be retained if the condition is met, but there's no guarantee as it might be rewritten So I'll go with yes, no, no

edengoforit
Jan 21, 2022

I think the first question should be backend instead of inbound? Backend service: <!-- statements to be applied before the request is forwarded to the backend service go here -->

mattvasc
Mar 1, 2022

Makes sense and if we check the set-var docs on Microsoft we can see that it can be used under inbound, outbound or backend scope: https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-mutual-certificates#configure-an-api-to-use-client-certificate-for-gateway-authentication

gabavo
Mar 24, 2022

rewrite-uri policy can appear only in inbound scope, so the answer is correct https://docs.microsoft.com/en-us/azure/api-management/api-management-transformation-policies#usage-8

1CY1
Jul 12, 2024

Y : Segment is an inbound policy. N : Whatever the size no error will occur. N : The lower version will be used if the bodysize is greater than 512k.