user6264
user6264

Reputation: 185

How to Detach shared image gallery from DevTest lab in azure

We have a requirement to detach the shared image gallery from DevTest Lab in Azure. We tried the below code API snippet to attach.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/sharedgalleries/{name}?api-version= 2018-10-15-preview
Body: 
{
    "properties":{
        "galleryId": "[Shared Image Gallery resource Id]",
        "allowAllImages": "Enabled"
    }
}

We can enable shared image gallery to DevTest lab . Can we detach shared image gallery with API or ARM template

Upvotes: 0

Views: 95

Answers (1)

Joy Wang
Joy Wang

Reputation: 42123

Yes, you can, just use the REST API like below.

DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/sharedgalleries/{name}?api-version= 2018-10-15-preview

enter image description here

Upvotes: 0

Related Questions