Question 126 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure
Question
HOTSPOT - You are working for Contoso, Ltd.
You define an API Policy object by using the following XML markup:
![<set-variable name= “bodySize” value="@ (context Request .Headers[“Content-Length”] [0])”/>
<choose>
<when condition= “@(int.Parse (context.Variables.GetValueOrDefault<string> (“bodySize”) )<512000)”>
</when>
<otherwise>
<rewrite-uri template= ‘/put”/>
<set-backend-service base-url= “http://contoso.com/api/9.1/"/>
</otherwise>
</choose>](https://eaeastus2.blob.core.windows.net/optimizedimages/static/images/Developing-Solutions-for-Microsoft-Azure-(AZ-204)/question/img0042800001.png)
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:
/question/img0042800002.png)
Explanations
/answer/img0042900001.png)
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: &lt;set-backend-service base-url="base URL of the backend service" /&gt; 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.
https://docs.microsoft.com/en-us/azure/api-management/api-management-transformation-policies