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

Question 13 — AZ-104 Practice Exam 7

For each statement below, indicate whether the answer is True or False

Response matrix
ItemTrue False
An Azure Policy rule is composed of an if block (conditions) and a then block (effect). □□
The utcNow() function in Azure Policy can only appear in a parameter’s defaultValue. □□
The current() function can be used anywhere in a policy rule to read the current array member. □□
The Field() function returns the value of a property from the resource being evaluated and is commonly used with auditIfNotExists/deployIfNotExists. □□

Correct answers

  1. An Azure Policy rule is composed of an if block (conditions) and a then block (effect). → True
  2. The utcNow() function in Azure Policy can only appear in a parameter’s defaultValue. → False
  3. The current() function can be used anywhere in a policy rule to read the current array member. → False
  4. The Field() function returns the value of a property from the resource being evaluated and is commonly used with auditIfNotExists/deployIfNotExists. → True

Explanations

True: An Azure Policy rule always has if (conditions) and then (effect) sections.
False: In Azure Policy, utcNow() may be used outside defaultValue and returns an ISO 8601 timestamp string.
False: current() is restricted to use inside count expressions to reference the array member under evaluation.
True: Field(fieldName) retrieves a property from the evaluated resource and is frequently used with auditIfNotExists and deployIfNotExists.

An Azure Policy rule is composed of an if block (conditions) and a then block (effect).

The utcNow() function in Azure Policy can only appear in a parameter’s defaultValue.

The current() function can be used anywhere in a policy rule to read the current array member.

The Field() function returns the value of a property from the resource being evaluated and is commonly used with auditIfNotExists/deployIfNotExists.