Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace Microsoft.Azure.Commands.Management.Storage
/// <summary>
/// Modify Azure Storage service properties
/// </summary>
[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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace Microsoft.Azure.Commands.Management.Storage
/// <summary>
/// Modify Azure Storage service properties
/// </summary>
[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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace Microsoft.Azure.Commands.Management.Storage
/// <summary>
/// Modify Azure Storage service properties
/// </summary>
[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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace Microsoft.Azure.Commands.Management.Storage
/// <summary>
/// Modify Azure Storage service properties
/// </summary>
[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
{
Expand Down
12 changes: 11 additions & 1 deletion src/Storage/Storage.Management/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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()
Expand All @@ -172,7 +171,6 @@ public PSRestorePolicy(RestorePolicyProperties policy)
{
this.Enabled = policy.Enabled;
this.Days = policy.Days;
this.LastEnabledTime = policy.LastEnabledTime;
this.MinRestoreTime = policy.MinRestoreTime;

}
Expand Down
12 changes: 8 additions & 4 deletions src/Storage/Storage.Management/Models/PSDataPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,12 @@ public ManagementPolicySnapShot ParseManagementPolicySnapShot()
/// </summary>
public class PSDateAfterModification
{
public int DaysAfterModificationGreaterThan { get; set; }
public int? DaysAfterModificationGreaterThan { get; set; }

public PSDateAfterModification()
{ }
{
this.DaysAfterModificationGreaterThan = null;
}

public PSDateAfterModification(int daysAfterModificationGreaterThan)
{
Expand All @@ -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);
}
}

Expand All @@ -289,7 +291,9 @@ public class PSDateAfterCreation
public int DaysAfterCreationGreaterThan { get; set; }

public PSDateAfterCreation()
{ }
{
this.DaysAfterCreationGreaterThan = 0;
}

public PSDateAfterCreation(int daysAfterCreationGreaterThan)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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'."
"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'."