{"id":13107,"date":"2020-07-23T09:40:57","date_gmt":"2020-07-23T09:40:57","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=13107"},"modified":"2020-08-28T04:32:05","modified_gmt":"2020-08-28T04:32:05","slug":"learn-using-resource-locks","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/","title":{"rendered":"Learn using Resource Locks"},"content":{"rendered":"\n<p class=\"has-text-align-right\"><strong><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-az-104-microsoft-azure-administrator-associate\/\" target=\"_blank\" rel=\"noreferrer noopener\">Return to AZ-104 Tutorial<\/a><\/strong><\/p>\n\n\n\n<p>If you an administrator, then there is a need to either lock a subscription, resource group, or resource. Resource Locks prevent other users in the organization from accidentally deleting or modifying critical resources. We can set the lock level to <strong>CanNotDelete <\/strong>or <strong>ReadOnly<\/strong>. <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>CanNotDelete <\/strong>&#8211; This lock authorizes users to still read and modify a resource, but they can&#8217;t delete the resource.<\/li><li><strong>ReadOnly <\/strong>&#8211; This lock authorizes users to read a resource, but they can&#8217;t delete or update the resource. By applying this lock we restrict all authorized users to the permissions granted by the Reader role.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Process of Applying Resource Locks<\/strong><\/h3>\n\n\n\n<p>When we apply a lock at a parent scope, then all the resources within that scope inherit the same lock features. Moreover, the resources that we add later inherit the lock from the parent. Such that the most restrictive lock in the inheritance takes precedence.<\/p>\n\n\n\n<p>Primarily we use management locks to apply a restriction across all users and roles. Also, the Resource Manager locks apply only to operations that occur in the management plane, which consists of operations sent to https:\/\/management.azure.com. <\/p>\n\n\n\n<p>Resource locks do not restrict the performance of the functions of the resource. This indicates that the resource changes are restricted, but resource operations are not restricted. Note, data transactions are permitted since those operations are not sent to https:\/\/management.azure.com.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Features of Resource Lock<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>A read-only lock on a\u00a0<strong>storage account<\/strong>\u00a0prevents all users from listing the keys. <\/li><li>A read-only lock on an\u00a0<strong>App Service<\/strong>\u00a0resource prevents Visual Studio Server Explorer from displaying files for the resource because that interaction requires to write access.<\/li><li>A read-only lock on a\u00a0<strong>resource group<\/strong>\u00a0that contains a\u00a0<strong>virtual machine<\/strong>\u00a0prevents all users from starting or restarting the virtual machine. These operations require a POST request.<\/li><li>A cannot-delete lock on a\u00a0<strong>resource group<\/strong>\u00a0prevents Azure Resource Manager from\u00a0automatically deleting deployments\u00a0in the history.<\/li><li>A cannot-delete lock on the\u00a0<strong>resource group<\/strong>\u00a0created by\u00a0<strong>Azure Backup Service<\/strong>\u00a0causes backups to fail. <\/li><li>A read-only lock on a\u00a0<strong>subscription<\/strong>\u00a0prevents\u00a0<strong>Azure Advisor<\/strong>\u00a0from working correctly. <\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/www.testpreptraining.ai\/microsoft-azure-administrator-associate-az-104-free-practice-test\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/06\/practice-test-2.png\" alt=\"Practice Test for AZ-104\"\/><\/a><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Prerequisites to create or Delete locks<\/strong><\/h5>\n\n\n\n<p>In order to create or delete management locks, it is important that you have access to  &#8211;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Microsoft.Authorization\/* or <\/li><li>Microsoft.Authorization\/locks\/* actions. <\/li><\/ul>\n\n\n\n<p>Such that of the built-in roles, only Owner and User Access Administrator are granted those actions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Steps to apply Resource Locks (Portal)<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/en-us\/azure\/includes\/media\/resource-manager-lock-resources\/select-lock.png\" alt=\"Apply Resource Locks (Portal)\"\/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>In the Settings blade for the resource, resource group, or subscription that you wish to lock, select&nbsp;<strong>Locks<\/strong><\/li><li>To add a lock, select&nbsp;<strong>Add<\/strong>. If you want to create a lock at a parent level, select the parent. The currently selected resource inherits the lock from the parent.&nbsp;<\/li><li>Give the lock a name and lock level. Optionally, you can add notes that describe the lock.<\/li><li>To delete the lock, select the ellipsis and&nbsp;<strong>Delete<\/strong>&nbsp;from the available options.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Resource Locks Templates<\/strong><\/h3>\n\n\n\n<p>While using a Resource Manager template to deploy a lock, we use different values for the name and type depending on the scope of the lock. So when applying a lock to a resource, we use the given formats &#8211;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>name &#8211; {resourceName}\/Microsoft.Authorization\/{lockName}<\/li><li>type &#8211; {resourceProviderNamespace}\/{resourceType}\/providers\/locks<\/li><\/ul>\n\n\n\n<p>Also while applying a lock to a resource group or subscription, we should use the given formats:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>name &#8211; {lockName}<\/li><li>type &#8211; Microsoft.Authorization\/locks<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.testpreptraining.ai\/microsoft-azure-administrator-associate-az-104-online-course\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/07\/testpreptraining.ai-2-1-750x117.png\" alt=\"Microsoft AZ-104 Free Practice Test\" class=\"wp-image-12856\"\/><\/a><\/figure><\/div>\n\n\n\n<p class=\"has-text-align-right\"><strong>Reference: <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-resource-manager\/management\/lock-resources\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Documentation<\/a><\/strong><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-az-104-microsoft-azure-administrator-associate\/\" target=\"_blank\" rel=\"noreferrer noopener\">Return to AZ-104 Tutorial<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Return to AZ-104 Tutorial If you an administrator, then there is a need to either lock a subscription, resource group, or resource. Resource Locks prevent other users in the organization from accidentally deleting or modifying critical resources. We can set the lock level to CanNotDelete or ReadOnly. CanNotDelete &#8211; This lock authorizes users to still&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-13107","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn using Resource Locks - Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Learn and upgrade to learn using Resource locks and their features. Start preparing for Microsoft AZ-104 with Online courses and Free Test Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn using Resource Locks - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Learn and upgrade to learn using Resource locks and their features. Start preparing for Microsoft AZ-104 with Online courses and Free Test Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-28T04:32:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/06\/practice-test-2.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/\",\"name\":\"Learn using Resource Locks - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2020-07-23T09:40:57+00:00\",\"dateModified\":\"2020-08-28T04:32:05+00:00\",\"description\":\"Learn and upgrade to learn using Resource locks and their features. Start preparing for Microsoft AZ-104 with Online courses and Free Test Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn using Resource Locks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn using Resource Locks - Testprep Training Tutorials","description":"Learn and upgrade to learn using Resource locks and their features. Start preparing for Microsoft AZ-104 with Online courses and Free Test Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/","og_locale":"en_US","og_type":"article","og_title":"Learn using Resource Locks - Testprep Training Tutorials","og_description":"Learn and upgrade to learn using Resource locks and their features. Start preparing for Microsoft AZ-104 with Online courses and Free Test Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2020-08-28T04:32:05+00:00","og_image":[{"url":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/06\/practice-test-2.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/","name":"Learn using Resource Locks - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2020-07-23T09:40:57+00:00","dateModified":"2020-08-28T04:32:05+00:00","description":"Learn and upgrade to learn using Resource locks and their features. Start preparing for Microsoft AZ-104 with Online courses and Free Test Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/learn-using-resource-locks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Learn using Resource Locks"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/13107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=13107"}],"version-history":[{"count":3,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/13107\/revisions"}],"predecessor-version":[{"id":18361,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/13107\/revisions\/18361"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=13107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=13107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=13107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}