Skip to main content
  1. Public practice questions
  2. AZ-104 Practice Exams | Azure Administrator Associate
  3. AZ-104 Case Study Set

Question 38 — AZ-104 Case Study Set

Paideffort needs a policy-rule function that returns the value of a property on the resource currently being evaluated, particularly for scenarios involving auditIfNotExists or deployIfNotExists. The appropriate function is [Gap 1].

  1. field
  2. requestContext
  3. policy
  4. addDays
  5. current

Correct answers

  1. Gap 1: field

Explanations

Correct Answer:

field

Explanation:

Paideffort's related-resource policies may need information from the resource that triggered evaluation. The field() policy function retrieves the value of a specified field from the evaluated resource and is particularly useful with auditIfNotExists and deployIfNotExists.

Wrong Answers:

policy

policy() returns information about the policy evaluation context, such as assignment and definition identifiers. It does not retrieve the evaluated resource property Paideffort needs.

current

current() is used inside count expressions to access the array member currently being evaluated. It is not the general function for retrieving a resource field.

addDays

addDays() performs date arithmetic and does not retrieve properties from Paideffort's evaluated resource.

requestContext

requestContext().apiVersion returns the API version associated with the policy evaluation request. It does not return an arbitrary resource property.