Remove-AzRmStorageContainerImmutabilityPolicy
Removes ImmutabilityPolicy of a Storage blob container with an unlocked policy
Syntax
Remove-AzRmStorageContainerImmutabilityPolicy
[-ResourceGroupName] <String>
[-StorageAccountName] <String>
-ContainerName <String>
-Etag <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzRmStorageContainerImmutabilityPolicy
-ContainerName <String>
-StorageAccount <PSStorageAccount>
-Etag <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzRmStorageContainerImmutabilityPolicy
-Container <PSContainer>
-Etag <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzRmStorageContainerImmutabilityPolicy
[-InputObject] <PSImmutabilityPolicy>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzRmStorageContainerImmutabilityPolicy cmdlet removes ImmutabilityPolicy of a Storage blob container with an unlocked policy.
Examples
Example 1: Remove unlocked ImmutabilityPolicy of a Storage blob container with Storage account name and container name
$policy = Get-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer"
Remove-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" -Etag $policy.Etag
This command removes unlocked ImmutabilityPolicy of a Storage blob container with Storage account name and container name.
Example 2: Remove unlocked ImmutabilityPolicy of a Storage blob container, with Storage account object
$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount"
$policy = Get-AzRmStorageContainerImmutabilityPolicy -StorageAccount $accountObject -ContainerName "myContainer"
Remove-AzRmStorageContainerImmutabilityPolicy -StorageAccount $accountObject -ContainerName "myContainer" -Etag $policy.Etag
This command removes unlocked ImmutabilityPolicy of a Storage blob container, with Storage account object.
Example 3: Remove unlocked ImmutabilityPolicy of a Storage blob container, with container object
$containerObject = Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -Name "myContainer"
$policy = Get-AzRmStorageContainerImmutabilityPolicy -Container $containerObject
Remove-AzRmStorageContainerImmutabilityPolicy -Container $containerObject -Etag $policy.Etag
This command removes unlocked ImmutabilityPolicy of a Storage blob container with Storage container object.
Example 4: Remove unlocked ImmutabilityPolicy of a Storage blob container, with ImmutabilityPolicy object
Get-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" | Remove-AzRmStorageContainerImmutabilityPolicy
This command removes unlocked ImmutabilityPolicy of a Storage blob container, with ImmutabilityPolicy object.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Container
Storage container object
Type: | PSContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ContainerName
Container Name
Type: | String |
Aliases: | N |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Etag
Immutability policy etag.
Type: | String |
Aliases: | IfMatch |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Unlocked ImmutabilityPolicy Object to Remove
Type: | PSImmutabilityPolicy |
Aliases: | ImmutabilityPolicy |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageAccount
Storage account object
Type: | PSStorageAccount |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageAccountName
Storage Account Name.
Type: | String |
Aliases: | AccountName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Azure PowerShell