Exam AZ-204 All QuestionsBrowse all questions from this exam
Question 311

HOTSPOT

-

You develop an image upload service that is exposed using Azure API Management. Images are analyzed after upload for automatic tagging.

Images over 500 KB are processed by a different backend that offers a lower tier of service that costs less money. The lower tier of service is denoted by a header named x-large-request. Images over 500 KB must never be processed by backends for smaller images and must always be charged the lower price.

You need to implement API Management policies to ensure that images are processed correctly.

How should you complete the API Management inbound policy? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

    Correct Answer:

Discussion
kvtborad

I got this question on 6th August 2023. chose given answers. passed with 904. I got Case study: city and Lights. All questions are from ExamTopics.

sphinx0005

Where did you refer case studies. Can you please tell me

1CY1

If the image is small then delete this header. Otherwise set the backend base-url to large-image-host.

CarlosTheBoldest

I got this question on my exam, 2023Dec, go with what I remember was the most voted answer. Score 902, most of the questions were here, slightly different on wording because the Azure Ad <-> Entra Id change. Case was City Power & Light. Good luck! Important tip, you have access to microsoft learn during the exam!

adilkhan

<when condition="@((int)context.Request.Headers.GetValueOrDefault("Content-Length", "0") > 500000)"> <set-header name="x-large-request" exists-action="override"> <value>true</value> </set-header> <set-backend-service base-url="https://backend-large-service.com" /> </when> <otherwise> <set-header name="x-large-request" exists-action="override"> <value>false</value> </set-header> <set-backend-service base-url="https://backend-small-service.com" /> </otherwise> chat gpt

SSR999

In question it is mentioned 'Images over 500kb' in both scenarios, ideally in second place it should be 'Images less than 500KB must never process'

macfuk

Correct, please upvote this comment.

Firo

The given answer looks correct the condition here is for "Images < 500KB" so based on the below reference we need to delete the header. https://learn.microsoft.com/en-us/azure/api-management/set-header-policy#attributes This is also the reference for back end service https://learn.microsoft.com/en-us/azure/api-management/set-backend-service-policy

VarunDashora26

In my opinion, why would there be a need to Delete the header when " The lower tier of service is denoted by a header named x-large-request" .... instead it should be override, set-backend, baseURl

Heighte

question seem broken, it doesn't make any sense to me to have delete and value true below.

damianadalid

Indeed. And if the answer were override (to set it to true), we would need a complementary set-header for x-large-request to false in the otherwise block...

JustHereToLearn

The given answer looks correct https://learn.microsoft.com/en-us/azure/api-management/set-header-policy#attributes https://learn.microsoft.com/en-us/azure/api-management/set-backend-service-policy

daothanhyen

Size < 512 should process. Why is it delete?

NK203

x-large-request should be set on Size>=512.if Size<512kb,remove this header.

IvanIco

it's definitely not delete

ce77bdc

I think it's correct, if size is less than 512k but has header 'x-large' delete otherwise make base url 'large-image-host'....

Veeresh114

Correction : Images below 500 KB are processed by a different backend that offers a lower tier of service that costs less money. The lower tier of service is denoted by a header named x-large-request. Images over 500 KB must never be processed by backends for smaller images and must always be charged the lower price