Chapter 1 · AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services
Azure API Management
20 practice questions · 5 marks weightage
Practice questions
- Question 1Q-715C95See the answer and solution
An API is published through Azure API Management with subscription enforcement enabled. Which HTTP header should a client normally send to authenticate its subscription when calling the API?
- A.Ocp-Apim-Subscription-Key
- B.Ocp-Apim-Backend-Key
- C.X-Azure-Resource-Token
- D.Authorization-Subscription
- Question 2Q-15388DSee the answer and solution
An API Management administrator wants to allow each subscription to make at most 100 calls every 60 seconds. Calls exceeding the limit should be rejected by the gateway. Which inbound policy statement meets this requirement?
- A.<rate-limit-by-key calls="100" renewal-period="60" counter-key="@(context.Subscription.Id)" />
- B.<quota-by-key calls="100" renewal-period="60" counter-key="@(context.Subscription.Id)" />
- C.<validate-jwt header-name="Authorization" failed-validation-httpcode="429" />
- D.<set-header name="X-Rate-Limit" exists-action="override"><value>100</value></set-header>
- Question 3Q-7BE7E9See the answer and solution
A company exposes a customer API through Azure API Management. The company must introduce a breaking contract change while continuing to support existing clients that use version 1. Which API Management design is most appropriate?
- A.Create version 2 in the same API version set, select a versioning scheme such as URL path, and keep version 1 available.
- B.Create a revision of version 1 and publish only the latest revision as the replacement for all clients.
- C.Create a separate product for version 2 and rely on the product name to route requests to the new contract.
- D.Change the backend URL for version 1 so that it points to the implementation of version 2.
- Question 4Q-09FDB3See the answer and solution
An Azure API Management API has a backend service configured at https://api.contoso.com. One operation must instead send requests to https://orders.contoso.com/v2/orders without changing the backend used by other operations. Which policy should be added to that operation's inbound processing?
- A.set-backend-service with the service-url set to https://orders.contoso.com/v2
- B.rewrite-uri with the template set to https://orders.contoso.com/v2
- C.set-header with the header name Host and value orders.contoso.com
- D.set-method with the method set to POST
- Question 5Q-3B2064See the answer and solution
An API Management policy must add a payment-provider secret to an outbound request. The secret must not be stored as plaintext in the policy or exposed to API developers. Which approach best meets this requirement?
- A.Store the secret in an Azure Key Vault-backed named value and reference it in the policy as {{payment-provider-secret}}
- B.Store the secret in a URL query parameter and mark the API operation as internal
- C.Store the secret in the API description and obfuscate the value with Base64
- D.Store the secret in a request header policy as a literal value and restrict access to the developer portal
15 more questions on Azure API Management
Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.
Start practising freeFree to start · No credit card needed