exam questions

Exam AZ-500 All Questions

View all questions & answers for the AZ-500 exam

Exam AZ-500 topic 4 question 95 discussion

Actual exam question from Microsoft's AZ-500
Question #: 95
Topic #: 4
[All AZ-500 Questions]

HOTSPOT
-

You have an Azure subscription named Sub1 that contains the resource groups shown in the following table.



You create the Azure Policy definition shown in the following exhibit.



You assign the policy to Sub1.

You plan to create the resources shown in the following table.



For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
BooMz
Highly Voted 1 year, 5 months ago
https://learn.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#conditions The condition states "While match and notMatch are case-sensitive, all other conditions that evaluate a stringValue are case-insensitive. Case-insensitive alternatives are available in matchInsensitively and notMatchInsensitively." This shows that the "notContains" as a string comparison is actually case-INSENSITIVE. The other thing we have to look at is if (not same region of RG). This sums up, if we look at another perspective, is if (RG same region AND contains "obj") -> accept else -> deny Therefore the answer should be Y N Y
upvoted 12 times
achechen
7 months, 2 weeks ago
AND=allof OR= anyof So, yyy
upvoted 2 times
...
hb0011
1 year, 1 month ago
This is the one
upvoted 1 times
...
...
Yesvanth1
Highly Voted 1 year, 7 months ago
Tested in lab. All are yes. Policy says: If anyof meaning condition 1 or 2. If 1 or 2 satisfied policy will block. 1) Location of resource must be same as RG. 2) Name of resource must contains obj/OBJ. If any of these are not satisifed the policy will block. For option 1, 3 - Location is same as RG and name contains obj/OBJ. so Yes. For option 2 - policy can't evaluate location for resource group so the policy is not valid and will not evaluate for name too. so even you put name as obj/OBJ or anything like "test" you can create RG. so Yes. Answer: YYY
upvoted 11 times
...
Nhadipour
Most Recent 1 day, 22 hours ago
Y, Y, Y Policy assigned on Sub1 level. obj1 is a Resource Group itself, not a resource inside another RG --> Not Applicable LOCATION: West US (matches the Sub1 scope) NAME: "obj1" (contains "obj") None of the conditions of LOCATION OR NAME are met. All allowed
upvoted 1 times
...
scottyboy23
7 months ago
exam 20240715
upvoted 1 times
...
YNY (Answer is correct) 1 & 3 : IpObject1 contains obj and is located in the same region than the RG. Same for OBJ3 (plus contains is case insensitive) 2. We can create obj1 because there isn't any RG to check the location.
upvoted 1 times
...
_punky_
1 year, 4 months ago
notContains: The notcontains comparison in Azure Policy is case-insensitive YNY
upvoted 2 times
...
[Removed]
1 year, 4 months ago
Tested in the lab its YNN
upvoted 1 times
[Removed]
1 year, 1 month ago
Apologies tested again all 3 are yes
upvoted 2 times
...
...
AbdallaAM
1 year, 5 months ago
Azure Policy is generally case-insensitive, including the notContains operator. This means that, in most situations, the policy will evaluate without considering the case of the characters.
upvoted 3 times
...
vcloudpmp
1 year, 5 months ago
https://learn.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure The mode determines which resource types are evaluated for a policy definition. The supported modes are: all: evaluate resource groups, subscriptions, and all resource types indexed: only evaluate resource types that support tags and location For example, resource Microsoft.Network/routeTables supports tags and location and is evaluated in both modes. However, resource Microsoft.Network/routeTables/routes can't be tagged and isn't evaluated in Indexed mode. We recommend that you set mode to all in most cases.
upvoted 1 times
...
heatfan900
1 year, 6 months ago
THE QUESTION STATES IF IT DOES NOT CONTAIN EITHER OBJ OR A RG GROUP THEN DENY. ONLY #2 MATCHES THAT RULE. Y,N,Y
upvoted 2 times
...
Ofenomeno
1 year, 6 months ago
- The question has notContains and NOT Contains - "if anyof" so only one of the conditions needs to be matched on to deny 1 and 3 are in the same location as the RGs they are in and contain obj so Y 2 is not in the same location as the RG so even if it contains obj it will be N YNY
upvoted 3 times
...
tsaad
1 year, 8 months ago
All are No. Simply because Field names are case-insensitive so OBJ is obj is IPobject and since anyof the condition matchs, all are No.
upvoted 1 times
ITTesters
1 year, 8 months ago
only the match selectors are casesensitive; https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azpolicyassignment?view=azps-10.0.0#example-1-policy-assignment-at-subscription-level
upvoted 1 times
...
...
rudyydmitrij
1 year, 8 months ago
all of objects contain "obj", so if policy will be applied on Sub1 level - it's all "No"
upvoted 1 times
...
Alexbz
1 year, 8 months ago
Answer is correct. The mode is set to "All," which suggests that the rule applies to all cases. The first condition checks the value of the "location" field and compares it to the location of the resource group. If the two values are not equal, the condition is satisfied. The second condition checks the value of the "name" field and verifies that it does not contain the substring "obj." If either of these conditions is met, the action specified in the "then" block will be executed which means the action will be denied. IProject1 > East US , RG2 > East US then the condition is not satisfied means "Yes" to IProject1. obj1 >> contains obj >> second condition satisfied means "NO" to obj1 OBJ3 and RG1 both are in West US, none of the conditions are satisfied. Means "Yes" to OBJ3
upvoted 2 times
rudyydmitrij
1 year, 8 months ago
It's IPobject, not IProject, so it contains obj
upvoted 1 times
Alexbz
1 year, 7 months ago
You're right! My bad. Then the answer should be NO,NO,Yes.
upvoted 2 times
BooMz
1 year, 7 months ago
Shouldn't IPobject1 be yes since it contains "obj"?
upvoted 1 times
...
...
...
...
billo79152718
1 year, 8 months ago
Not, sure about this one!
upvoted 2 times
billo79152718
1 year, 8 months ago
IPobject1 is a Public IP address and OBJ3 is a Virtual Network. In that case it makes sense. So i will go for the given answers is correct.
upvoted 3 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago