{"id":188303,"date":"2021-06-25T07:11:00","date_gmt":"2021-06-25T14:11:00","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=188303"},"modified":"2021-06-25T07:16:40","modified_gmt":"2021-06-25T14:16:40","slug":"the-registry-with-the-name-cant-be-deleted-because-its-not-empty-google-cloud","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/the-registry-with-the-name-cant-be-deleted-because-its-not-empty-google-cloud\/","title":{"rendered":"The registry with the name .. can&#8217;t be deleted because it&#8217;s not empty &#8211; Google Cloud"},"content":{"rendered":"<p>When deleting device registry, verify that there are no devices in the registry. Otherwise, Google Cloud API returns an error.<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/download-iot-cloud-tester\/\">IoT Cloud Tester<\/a>&nbsp; application will return this error when trying to delete a registry that has devices.<\/p>\n<p>In the below example, registry &#8216;reg_702539&#8217; has devices, so error message is returned by Google Cloud when trying to delete that registry.<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/delet_registry_error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-188304\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/delet_registry_error.png\" alt=\"\" width=\"848\" height=\"728\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/delet_registry_error.png 848w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/delet_registry_error-300x258.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/delet_registry_error-768x659.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/06\/delet_registry_error-600x515.png 600w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a><\/p>\n<p>Following error message is returned by Google Cloud API.<\/p>\n<p>DELETE https:\/\/cloudiot.googleapis.com\/v1\/projects\/second-inquiry-315605\/locations\/asia-east1\/registries\/reg_702539<\/p>\n<p>{<\/p>\n<p>&#8220;code&#8221; : 400,<\/p>\n<p>&#8220;errors&#8221; : [ {<\/p>\n<p>&#8220;domain&#8221; : &#8220;global&#8221;,<\/p>\n<p>&#8220;message&#8221; : &#8220;The registry with the name &#8216;projects\/second-inquiry-315605\/locations\/asia-east1\/registries\/reg_702539&#8217; can&#8217;t be deleted because it&#8217;s not empty.&#8221;,<\/p>\n<p>&#8220;reason&#8221; : &#8220;failedPrecondition&#8221;<\/p>\n<p>} ],<\/p>\n<p>&#8220;message&#8221; : &#8220;The registry with the name &#8216;projects\/second-inquiry-315605\/locations\/asia-east1\/registries\/reg_702539&#8217; can&#8217;t be deleted because it&#8217;s not empty.&#8221;,<\/p>\n<p>&#8220;status&#8221; : &#8220;FAILED_PRECONDITION&#8221;<\/p>\n<p>}<\/p>\n<h1>To fix this error,<\/h1>\n<ul>\n<li>Delete devices within the registry and then delete the registry.<\/li>\n<\/ul>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" id=\"youTubePlayer\" src=\"https:\/\/www.youtube.com\/embed\/T327ySH1O2E?hd=1\" width=\"750\" height=\"421\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When deleting device registry, verify that there are no devices in the registry. Otherwise, Google Cloud API returns an error. IoT Cloud Tester&nbsp; application will return this error when trying to delete a registry that has devices. In the below &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/the-registry-with-the-name-cant-be-deleted-because-its-not-empty-google-cloud\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"iot_tutorial_template.php","meta":{"footnotes":""},"class_list":["post-188303","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/188303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/comments?post=188303"}],"version-history":[{"count":2,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/188303\/revisions"}],"predecessor-version":[{"id":188307,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/188303\/revisions\/188307"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=188303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}