diff --git a/src/Storage/Storage.Management/Blob/DisableAzureStorageBlobRestorePolicy.cs b/src/Storage/Storage.Management/Blob/DisableAzureStorageBlobRestorePolicy.cs
index 8a4ad86f9bbb..38b85e274f9c 100644
--- a/src/Storage/Storage.Management/Blob/DisableAzureStorageBlobRestorePolicy.cs
+++ b/src/Storage/Storage.Management/Blob/DisableAzureStorageBlobRestorePolicy.cs
@@ -27,7 +27,6 @@ namespace Microsoft.Azure.Commands.Management.Storage
///
/// Modify Azure Storage service properties
///
- [CmdletOutputBreakingChange(typeof(PSRestorePolicy), ChangeDescription = "The deprecated property LastEnabledTime will be removed in a future release.")]
[Cmdlet("Disable", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + StorageBlobRestorePolicy, SupportsShouldProcess = true, DefaultParameterSetName = AccountNameParameterSet), OutputType(typeof(PSRestorePolicy))]
public class DisableAzStorageBlobRestorePolicyCommand : StorageBlobBaseCmdlet
{
diff --git a/src/Storage/Storage.Management/Blob/EnableAzureStorageBlobRestorePolicy.cs b/src/Storage/Storage.Management/Blob/EnableAzureStorageBlobRestorePolicy.cs
index 1dff60b2da9a..dd9c61e2ae95 100644
--- a/src/Storage/Storage.Management/Blob/EnableAzureStorageBlobRestorePolicy.cs
+++ b/src/Storage/Storage.Management/Blob/EnableAzureStorageBlobRestorePolicy.cs
@@ -27,7 +27,6 @@ namespace Microsoft.Azure.Commands.Management.Storage
///
/// Modify Azure Storage service properties
///
- [CmdletOutputBreakingChange(typeof(PSRestorePolicy), ChangeDescription = "The deprecated property LastEnabledTime will be removed in a future release.")]
[Cmdlet("Enable", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + StorageBlobRestorePolicy, DefaultParameterSetName = AccountNameParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSRestorePolicy))]
public class EnableAzStorageBlobRestorePolicyCommand : StorageBlobBaseCmdlet
{
diff --git a/src/Storage/Storage.Management/Blob/GetAzureStorageBlobServiceProperties.cs b/src/Storage/Storage.Management/Blob/GetAzureStorageBlobServiceProperties.cs
index e22d4400b584..698139ad8f48 100644
--- a/src/Storage/Storage.Management/Blob/GetAzureStorageBlobServiceProperties.cs
+++ b/src/Storage/Storage.Management/Blob/GetAzureStorageBlobServiceProperties.cs
@@ -27,7 +27,6 @@ namespace Microsoft.Azure.Commands.Management.Storage
///
/// Modify Azure Storage service properties
///
- [CmdletOutputBreakingChange(typeof(PSBlobServiceProperties), ChangeDescription = "The deprecated property RestorePolicy.LastEnabledTime will be removed in a future release.")]
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + StorageBlobServiceProperty, DefaultParameterSetName = AccountNameParameterSet), OutputType(typeof(PSBlobServiceProperties))]
public class GetAzStorageBlobServicePropertyCommand : StorageBlobBaseCmdlet
{
diff --git a/src/Storage/Storage.Management/Blob/UpdateAzureStorageBlobServiceProperties.cs b/src/Storage/Storage.Management/Blob/UpdateAzureStorageBlobServiceProperties.cs
index 9034423ee85f..a4d25b54efee 100644
--- a/src/Storage/Storage.Management/Blob/UpdateAzureStorageBlobServiceProperties.cs
+++ b/src/Storage/Storage.Management/Blob/UpdateAzureStorageBlobServiceProperties.cs
@@ -27,7 +27,6 @@ namespace Microsoft.Azure.Commands.Management.Storage
///
/// Modify Azure Storage service properties
///
- [CmdletOutputBreakingChange(typeof(PSBlobServiceProperties), ChangeDescription = "The deprecated property RestorePolicy.LastEnabledTime will be removed in a future release.")]
[Cmdlet("Update", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + StorageBlobServiceProperty, SupportsShouldProcess = true, DefaultParameterSetName = AccountNameParameterSet), OutputType(typeof(PSBlobServiceProperties))]
public class UpdateAzStorageBlobServicePropertyCommand : StorageBlobBaseCmdlet
{
diff --git a/src/Storage/Storage.Management/ChangeLog.md b/src/Storage/Storage.Management/ChangeLog.md
index 338958ac7fae..e36da543006a 100644
--- a/src/Storage/Storage.Management/ChangeLog.md
+++ b/src/Storage/Storage.Management/ChangeLog.md
@@ -18,6 +18,16 @@
- Additional information about change #1
-->
## Upcoming Release
+* Removed obsolete property RestorePolicy.LastEnabledTime
+ - `Enable-AzStorageBlobRestorePolicy`
+ - `Disable-AzStorageBlobRestorePolicy`
+ - `Get-AzStorageBlobServiceProperty`
+ - `Update-AzStorageBlobServiceProperty`
+* Change Type of DaysAfterModificationGreaterThan from int to int?
+ - `Set-AzStorageAccountManagementPolicy`
+ - `Get-AzStorageAccountManagementPolicy`
+ - `Add-AzStorageAccountManagementPolicyAction`
+ - `New-AzStorageAccountManagementPolicyRule`
* Supported create/update file share with access tier
- `New-AzRmStorageShare`
- `Update-AzRmStorageShare`
@@ -28,7 +38,7 @@
* Supported Container access policy with new permission x,t
- `New-AzStorageContainerStoredAccessPolicy`
- `Set-AzStorageContainerStoredAccessPolicy`
-* Changed the output of get/set Container/Share/Queue/Table access policy cmdlet, by change the child property Permission type from enum to String
+* Changed the output of get/set Container access policy cmdlet, by change the child property Permission type from enum to String
- `Get-AzStorageContainerStoredAccessPolicy`
- `Set-AzStorageContainerStoredAccessPolicy`
* Fixed a sample script issue of set management policy with json
diff --git a/src/Storage/Storage.Management/Models/PSBlobServiceProperties.cs b/src/Storage/Storage.Management/Models/PSBlobServiceProperties.cs
index 7caaa727ffc5..9b59a36c8ee9 100644
--- a/src/Storage/Storage.Management/Models/PSBlobServiceProperties.cs
+++ b/src/Storage/Storage.Management/Models/PSBlobServiceProperties.cs
@@ -41,7 +41,7 @@ public class PSBlobServiceProperties
public PSDeleteRetentionPolicy DeleteRetentionPolicy { get; set; }
[Ps1Xml(Label = "RestorePolicy.Enabled", Target = ViewControl.Table, ScriptBlock = "$_.RestorePolicy.Enabled", Position = 5)]
[Ps1Xml(Label = "RestorePolicy.Days", Target = ViewControl.Table, ScriptBlock = "$_.RestorePolicy.Days", Position = 6)]
- [Ps1Xml(Label = "RestorePolicy.LastEnabledTime", Target = ViewControl.Table, ScriptBlock = "$_.RestorePolicy.LastEnabledTime", Position = 7)]
+ [Ps1Xml(Label = "RestorePolicy.MinRestoreTime", Target = ViewControl.Table, ScriptBlock = "$_.RestorePolicy.MinRestoreTime", Position = 7)]
public PSRestorePolicy RestorePolicy { get; set; }
public PSCorsRules Cors { get; set; }
public bool? IsVersioningEnabled { get; set; }
@@ -161,7 +161,6 @@ public class PSRestorePolicy
{
public bool? Enabled { get; set; }
public int? Days { get; set; }
- public DateTime? LastEnabledTime { get; set; }
public DateTime? MinRestoreTime { get; set; }
public PSRestorePolicy()
@@ -172,7 +171,6 @@ public PSRestorePolicy(RestorePolicyProperties policy)
{
this.Enabled = policy.Enabled;
this.Days = policy.Days;
- this.LastEnabledTime = policy.LastEnabledTime;
this.MinRestoreTime = policy.MinRestoreTime;
}
diff --git a/src/Storage/Storage.Management/Models/PSDataPolicy.cs b/src/Storage/Storage.Management/Models/PSDataPolicy.cs
index 578fac125113..f09c13b086b2 100644
--- a/src/Storage/Storage.Management/Models/PSDataPolicy.cs
+++ b/src/Storage/Storage.Management/Models/PSDataPolicy.cs
@@ -261,10 +261,12 @@ public ManagementPolicySnapShot ParseManagementPolicySnapShot()
///
public class PSDateAfterModification
{
- public int DaysAfterModificationGreaterThan { get; set; }
+ public int? DaysAfterModificationGreaterThan { get; set; }
public PSDateAfterModification()
- { }
+ {
+ this.DaysAfterModificationGreaterThan = null;
+ }
public PSDateAfterModification(int daysAfterModificationGreaterThan)
{
@@ -277,7 +279,7 @@ public PSDateAfterModification(DateAfterModification data)
}
public DateAfterModification ParseDateAfterModification()
{
- return new DateAfterModification(this.DaysAfterModificationGreaterThan);
+ return this.DaysAfterModificationGreaterThan is null? new DateAfterModification() : new DateAfterModification(this.DaysAfterModificationGreaterThan.Value);
}
}
@@ -289,7 +291,9 @@ public class PSDateAfterCreation
public int DaysAfterCreationGreaterThan { get; set; }
public PSDateAfterCreation()
- { }
+ {
+ this.DaysAfterCreationGreaterThan = 0;
+ }
public PSDateAfterCreation(int daysAfterCreationGreaterThan)
{
diff --git a/src/Storage/Storage.Management/StorageAccount/AddAzureStorageAccountManagementPolicyAction.cs b/src/Storage/Storage.Management/StorageAccount/AddAzureStorageAccountManagementPolicyAction.cs
index fbf1b13d06df..38c32561a2ce 100644
--- a/src/Storage/Storage.Management/StorageAccount/AddAzureStorageAccountManagementPolicyAction.cs
+++ b/src/Storage/Storage.Management/StorageAccount/AddAzureStorageAccountManagementPolicyAction.cs
@@ -22,7 +22,6 @@
namespace Microsoft.Azure.Commands.Management.Storage
{
- [CmdletOutputBreakingChange(typeof(PSManagementPolicyActionGroup), ChangeDescription = "The type of sub child property DaysAfterModificationGreaterThan will change from int to int? in a future release.")]
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "StorageAccountManagementPolicyAction", DefaultParameterSetName = BaseBlobParameterSet), OutputType(typeof(PSManagementPolicyActionGroup))]
public class AddAzureStorageAccountManagementPolicyActionCommand : StorageAccountBaseCmdlet
{
diff --git a/src/Storage/Storage.Management/StorageAccount/GetAzureStorageAccountManagementPolicy.cs b/src/Storage/Storage.Management/StorageAccount/GetAzureStorageAccountManagementPolicy.cs
index 2b31f5d1a160..3a733089ac2d 100644
--- a/src/Storage/Storage.Management/StorageAccount/GetAzureStorageAccountManagementPolicy.cs
+++ b/src/Storage/Storage.Management/StorageAccount/GetAzureStorageAccountManagementPolicy.cs
@@ -22,7 +22,6 @@
namespace Microsoft.Azure.Commands.Management.Storage
{
- [CmdletOutputBreakingChange(typeof(PSManagementPolicyActionGroup), ChangeDescription = "The type of sub child property DaysAfterModificationGreaterThan will change from int to int? in a future release.")]
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "StorageAccountManagementPolicy", DefaultParameterSetName = AccountNameParameterSet), OutputType(typeof(PSManagementPolicy))]
public class GetAzureStorageAccountManagementPolicyCommand : StorageAccountBaseCmdlet
{
diff --git a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccountManagementPolicyRule.cs b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccountManagementPolicyRule.cs
index d40d90d9f27d..1ec8df9d86a9 100644
--- a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccountManagementPolicyRule.cs
+++ b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccountManagementPolicyRule.cs
@@ -21,7 +21,6 @@
namespace Microsoft.Azure.Commands.Management.Storage
{
- [CmdletOutputBreakingChange(typeof(PSManagementPolicyActionGroup), ChangeDescription = "The type of sub child property DaysAfterModificationGreaterThan will change from int to int? in a future release.")]
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "StorageAccountManagementPolicyRule"), OutputType(typeof(PSManagementPolicyRule))]
public class NewAzureStorageAccountManagementPolicyRuleCommand : StorageAccountBaseCmdlet
{
diff --git a/src/Storage/Storage.Management/StorageAccount/SetAzureStorageAccountManagementPolicy.cs b/src/Storage/Storage.Management/StorageAccount/SetAzureStorageAccountManagementPolicy.cs
index 40da12d5470f..28ef1b36de10 100644
--- a/src/Storage/Storage.Management/StorageAccount/SetAzureStorageAccountManagementPolicy.cs
+++ b/src/Storage/Storage.Management/StorageAccount/SetAzureStorageAccountManagementPolicy.cs
@@ -25,7 +25,6 @@
namespace Microsoft.Azure.Commands.Management.Storage
{
- [CmdletOutputBreakingChange(typeof(PSManagementPolicyActionGroup), ChangeDescription = "The type of sub child property DaysAfterModificationGreaterThan will change from int to int? in a future release.")]
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "StorageAccountManagementPolicy", SupportsShouldProcess = true, DefaultParameterSetName = AccountNamePolicyRuleParameterSet), OutputType(typeof(PSManagementPolicy))]
public class SetAzureStorageAccountManagementPolicyCommand : StorageAccountBaseCmdlet
{
diff --git a/tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv
index 359f1564ee53..f84598f4e20c 100644
--- a/tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv
+++ b/tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv
@@ -1,4 +1,8 @@
"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.GetAzureStorageShareCommand","Get-AzRmStorageShare","0","1050","The parameter set 'AccountObject' for cmdlet 'Get-AzRmStorageShare' has been removed.","Add parameter set 'AccountObject' back to cmdlet 'Get-AzRmStorageShare'."
"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.GetAzureStorageShareCommand","Get-AzRmStorageShare","0","1050","The parameter set 'ShareResourceId' for cmdlet 'Get-AzRmStorageShare' has been removed.","Add parameter set 'ShareResourceId' back to cmdlet 'Get-AzRmStorageShare'."
"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.GetAzureStorageShareCommand","Get-AzRmStorageShare","0","1050","The parameter set '__AllParameterSets' for cmdlet 'Get-AzRmStorageShare' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'Get-AzRmStorageShare'."
-"Microsoft.Azure.PowerShell.Cmdlets.Storage.dll","Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageContainerStoredAccessPolicyCommand","Get-AzStorageContainerStoredAccessPolicy","0","1020","The cmdlet 'Get-AzStorageContainerStoredAccessPolicy' no longer has output type 'Microsoft.Azure.Storage.Blob.SharedAccessBlobPolicy'.","Make cmdlet 'Get-AzStorageContainerStoredAccessPolicy' return type 'Microsoft.Azure.Storage.Blob.SharedAccessBlobPolicy'."
\ No newline at end of file
+"Microsoft.Azure.PowerShell.Cmdlets.Storage.dll","Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageContainerStoredAccessPolicyCommand","Get-AzStorageContainerStoredAccessPolicy","0","1020","The cmdlet 'Get-AzStorageContainerStoredAccessPolicy' no longer has output type 'Microsoft.Azure.Storage.Blob.SharedAccessBlobPolicy'.","Make cmdlet 'Get-AzStorageContainerStoredAccessPolicy' return type 'Microsoft.Azure.Storage.Blob.SharedAccessBlobPolicy'."
+"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.DisableAzStorageBlobRestorePolicyCommand","Disable-AzStorageBlobRestorePolicy","0","3010","The property 'LastEnabledTime' of type 'Microsoft.Azure.Commands.Management.Storage.Models.PSRestorePolicy' has been removed.","Add the property 'LastEnabledTime' back to type 'Microsoft.Azure.Commands.Management.Storage.Models.PSRestorePolicy'."
+"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.EnableAzStorageBlobDeleteRetentionPolicyCommand","Enable-AzStorageBlobDeleteRetentionPolicy","0","3010","The property 'LastEnabledTime' of type 'Microsoft.Azure.Commands.Management.Storage.Models.PSRestorePolicy' has been removed.","Add the property 'LastEnabledTime' back to type 'Microsoft.Azure.Commands.Management.Storage.Models.PSRestorePolicy'."
+"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.EnableAzStorageBlobRestorePolicyCommand","Enable-AzStorageBlobRestorePolicy","0","3010","The property 'LastEnabledTime' of type 'Microsoft.Azure.Commands.Management.Storage.Models.PSRestorePolicy' has been removed.","Add the property 'LastEnabledTime' back to type 'Microsoft.Azure.Commands.Management.Storage.Models.PSRestorePolicy'."
+"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.AddAzureStorageAccountManagementPolicyActionCommand","Add-AzStorageAccountManagementPolicyAction","0","3000","The type of property 'DaysAfterModificationGreaterThan' of type 'Microsoft.Azure.Commands.Management.Storage.Models.PSDateAfterModification' has changed from 'System.Int32' to 'System.Nullable`1[System.Int32]'.","Change the type of property 'DaysAfterModificationGreaterThan' back to 'System.Int32'."
\ No newline at end of file