Update-AzStorageBlobServiceProperty
Modifies the service properties for the Azure Storage Blob service.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Update-AzStorageBlobServiceProperty
[-ResourceGroupName] <String>
[-StorageAccountName] <String>
[-DefaultServiceVersion <String>]
[-EnableChangeFeed <Boolean>]
[-ChangeFeedRetentionInDays <Int32>]
[-IsVersioningEnabled <Boolean>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzStorageBlobServiceProperty
-StorageAccount <PSStorageAccount>
[-DefaultServiceVersion <String>]
[-EnableChangeFeed <Boolean>]
[-ChangeFeedRetentionInDays <Int32>]
[-IsVersioningEnabled <Boolean>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzStorageBlobServiceProperty
[-ResourceId] <String>
[-DefaultServiceVersion <String>]
[-EnableChangeFeed <Boolean>]
[-ChangeFeedRetentionInDays <Int32>]
[-IsVersioningEnabled <Boolean>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-AzStorageBlobServiceProperty cmdlet modifies the service properties for the Azure Storage Blob service.
Examples
Example 1: Set Blob service DefaultServiceVersion to 2018-03-28
C:\PS> Update-AzStorageBlobServiceProperty -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -DefaultServiceVersion 2018-03-28
StorageAccountName : mystorageaccount
ResourceGroupName : myresourcegroup
DefaultServiceVersion : 2018-03-28
DeleteRetentionPolicy.Enabled : False
DeleteRetentionPolicy.Days :
RestorePolicy.Enabled :
RestorePolicy.Days :
ChangeFeed.Enabled :
ChangeFeed.RetentionInDays :
IsVersioningEnabled :
This command sets the DefaultServiceVersion of Blob Service to 2018-03-28.
Example 2: Enable Changefeed on Blob service of a Storage account with ChangeFeedRetentionInDays as 5 days
C:\PS> Update-AzStorageBlobServiceProperty -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -EnableChangeFeed $true -ChangeFeedRetentionInDays 5
StorageAccountName : mystorageaccount
ResourceGroupName : myresourcegroup
DefaultServiceVersion :
DeleteRetentionPolicy.Enabled : False
DeleteRetentionPolicy.Days :
RestorePolicy.Enabled :
RestorePolicy.Days :
ChangeFeed.Enabled : True
ChangeFeed.RetentionInDays : 5
IsVersioningEnabled :
This command enables Changefeed on Blob service of a Storage account with ChangeFeedRetentionInDays as 5 days. Change feed support in Azure Blob Storage works by listening to a GPv2 or Blob storage account for any blob level creation, modification, or deletion events. It then outputs an ordered log of events for the blobs stored in the $blobchangefeed container within the storage account. The serialized changes are persisted as an Apache Avro file and can be processed asynchronously and incrementally. If not specify ChangeFeedRetentionInDays, will get null value in service properties, indicates an infinite retention of the change feed.
Example 3: Enable Versioning on Blob service of a Storage account
C:\PS> Update-AzStorageBlobServiceProperty -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -IsVersioningEnabled $true
StorageAccountName : mystorageaccount
ResourceGroupName : myresourcegroup
DefaultServiceVersion :
DeleteRetentionPolicy.Enabled : False
DeleteRetentionPolicy.Days :
RestorePolicy.Enabled :
RestorePolicy.Days :
ChangeFeed :
ChangeFeed.RetentionInDays :
IsVersioningEnabled : True
This command enables Versioning on Blob service of a Storage account
Parameters
Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is 146000 days (400 years). Never specify it when enabled changeFeed will get null value in service properties, indicates an infinite retention of the change feed.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Default Service Version to Set
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Enable Change Feed logging for the storage account by set to $true, disable Change Feed logging by set to $false.
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets versioning is enabled if set to true.
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Resource Group Name.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Input a Storage account Resource Id, or a Blob service properties Resource Id.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Storage account object
| Type: | PSStorageAccount |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Storage Account Name.
| Type: | String |
| Aliases: | AccountName, Name |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |