What permissions do I need to make Azure Storage analytics logs immutable?

1k views Asked by At

I have Owner permissions on a storage account in Azure. To make a blob container immutable I can use this command in PowerShell:

Set-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName 'xxxxx' -StorageAccountName 'xxxxx' -ContainerName 'TestContainer' -ImmutabilityPeriod 1 #1 day

When I try this on the analytics logs container ("$logs"), I get this error:

Set-AzRmStorageContainerImmutabilityPolicy : The account being accessed 
does not have sufficient permissions to execute this operation.

What permissions do I need to do this?

1

There are 1 answers

0
Gaurav Mantri On BEST ANSWER

Considering $logs container is a system defined blob container, I don't think you can change the immutability policy for that container. You can't even delete that blob container.

If you're trying to set the blobs in this blob container to auto-expire after a certain period of time, you may want to try Blob Lifecycle Management. You can read more about it here: https://learn.microsoft.com/en-us/azure/storage/blobs/storage-lifecycle-management-concepts.