Practice Test

True/False: Resource locks are used in Azure to prevent accidental deletion or modification of resources.

  • True
  • False

Answer: True

Explanation: Resource locks provide a way for administrators to lock down Azure resources to prevent accidental deletion or modification.

Which of the following is NOT a purpose of resource locks in Azure?

  • A) To prevent accidental deletion
  • B) To prevent unauthorized access
  • C) To prevent modification
  • D) To monitor resource usage

Answer: D) To monitor resource usage

Explanation: Resource locks do not have the function to monitor resource usage. They are designed to prevent accidental or malicious deletion or modification.

How many levels of resource locks does Azure support?

  • A) One
  • B) Two
  • C) Three
  • D) Four

Answer: B) Two

Explanation: Azure supports two levels of resource locks, namely ‘CanNotDelete’ and ‘ReadOnly’.

True/False: A ‘ReadOnly’ lock on a resource will prevent the resource from being deleted.

  • True
  • False

Answer: False

Explanation: A ‘ReadOnly’ lock does not prevent the deletion of a resource. It only prevents the resource from being edited.

Which of the following Azure roles can assign resource locks?

  • A) Owner
  • B) Contributor
  • C) Reader

Answer: A) Owner

Explanation: Only the ‘Owner’ role can assign resource locks. Contributors and Readers cannot assign resource locks.

True/False: A resource lock prevents users from deleting a resource, regardless of their permissions.

  • True
  • False

Answer: True

Explanation: Resource locks help prevent accidental deletion of resources, regardless of the permission level of the user.

Multiple select: Which of the following can you apply a lock to in Azure?

  • A) Subscription
  • B) Resource group
  • C) Individual resources

Answer: A) Subscription, B) Resource group, C) Individual resources

Explanation: You can apply Azure resource locks at different levels such as the subscription level, the resource group level, or the individual resource level.

True/False: You can apply multiple locks to a single resource in Azure.

  • True
  • False

Answer: True

Explanation: You can indeed apply multiple locks to a single resource.

Which of the following Azure roles can remove or modify Resource Locks?

  • A) Owner
  • B) Contributor
  • C) Reader

Answer: A) Owner

Explanation: Only the ‘Owner’ role can remove or modify Resource Locks.

True/False: If a parent resource group has a ‘CanNotDelete’ lock, it will prevent deletion of resources within that group.

  • True
  • False

Answer: True

Explanation: A ‘CanNotDelete’ lock on a parent resource group will apply to all child resources, preventing their deletion.

Single select: The ‘CanNotDelete’ lock in Azure allows:

  • A) Modification but not deletion of a resource
  • B) Deletion but not modification of a resource
  • C) Neither deletion nor modification of a resource

Answer: A) Modification but not deletion of a resource

Explanation: The ‘CanNotDelete’ lock allows resources to be modified but prevents them from being deleted.

True/False: You can apply a resource lock to a resource that is being deleted.

  • True
  • False

Answer: False

Explanation: You cannot apply a resource lock to a resource that is being deleted.

Single select: What happens if you try to delete a locked resource?

  • A) Azure will prompt for confirmation before deletion
  • B) Azure will outright refuse deletion
  • C) Azure will delete the resource but send an alert

Answer: B) Azure will outright refuse deletion

Explanation: Azure will refuse deletion if a resource is locked, thus ensuring protection against accidental deletion.

Multiple select: Who cannot delete resources that have been locked with ‘CanNotDelete’ lock in Azure?

  • A) Owner
  • B) Contributor
  • C) Reader

Answer: B) Contributor, C) Reader

Explanation: ‘CanNotDelete’ lock prevents resources from being deleted even by Contributors and Reader roles.

True/false: Resource locks prevent malicious activity.

  • True
  • False

Answer: False

Explanation: Although resource locks can provide an additional layer of protection, they are primarily designed to prevent accidental changes, not malicious activity.

Interview Questions

What is the main purpose of resource locks in Microsoft Azure?

The main purpose of resource locks in Microsoft Azure is to protect resources from accidental deletion or modification.

What are the two types of resource locks in Azure?

The two types of resource locks in Azure are Delete locks and Read-Only locks.

What does a Delete lock do in Azure?

A Delete lock in Azure prevents the resource from being deleted.

What does a Read-Only lock do in Azure?

A Read-Only lock in Azure prevents the resource from being modified.

Can you apply resource locks at different levels in Azure?

Yes, you can apply resource locks at different levels such as subscription level, resource group level or resource level.

Is it possible to delete a resource in Azure that has a Delete lock?

No, a resource with a Delete lock cannot be deleted until the lock is removed.

Is it possible to modify a resource in Azure that has a Read-Only lock?

No, a resource with a Read-Only lock cannot be modified until the lock is removed.

Who can apply a resource lock in Azure?

Only users with Owner or User Access Administrator roles can apply a resource lock in Azure.

Who can remove a resource lock in Azure?

Only users with Owner or User Access Administrator roles can remove a resource lock in Azure.

When should a Delete lock be used in Azure?

A Delete lock should be used when you want to ensure a resource is not accidentally deleted.

When should a Read-Only lock be used in Azure?

A Read-Only lock should be used when you want to prevent a resource from being modified but allow it to be deleted.

How are resource locks beneficial for an organization using Azure?

Resource locks are beneficial as they provide an additional layer of protection to prevent accidental deletion or modification of critical resources in Azure.

What happens to the resource locks if a subscription is moved to a new Azure account?

The resource locks stay with the subscription during the move to a new Azure account.

Can resource locks be inherited from parent resources in Azure?

Yes, if a resource lock is applied at the resource group or subscription level, it will apply to all resources within the resource group or subscription.

Can you apply multiple locks to a single resource in Azure?

Yes, you can apply both Read-Only and Delete lock to a single resource but the strongest lock takes precedence.

Leave a Reply

Your email address will not be published. Required fields are marked *