Exam AZ-204 All QuestionsBrowse all questions from this 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:

    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
paru123456789

Answer: Yes No No

clarionprogrammer

This is correct.

KingChuang

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

TonyMel

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

Cornholioz

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

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

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

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

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

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

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

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

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

NightshadeRC

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

lugospod

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

AlexeyG

Got this in 16/02/2023

edengoforit

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

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

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

Pomphard

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

1CY1

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.