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
2 changes: 2 additions & 0 deletions src/Storage/Storage.Management/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
* Changed the output of get/set Container/Share/Queue/Table 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
- `Set-AzStorageAccountManagementPolicy`

## Version 2.7.0
* Supported enable/disable/get share soft delete properties on file Service of a Storage account
Expand Down
6 changes: 6 additions & 0 deletions src/Storage/Storage.Management/Models/PSDataPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ public class PSDateAfterModification
{
public int DaysAfterModificationGreaterThan { get; set; }

public PSDateAfterModification()
{ }

public PSDateAfterModification(int daysAfterModificationGreaterThan)
{
this.DaysAfterModificationGreaterThan = daysAfterModificationGreaterThan;
Expand All @@ -285,6 +288,9 @@ public class PSDateAfterCreation
{
public int DaysAfterCreationGreaterThan { get; set; }

public PSDateAfterCreation()
{ }

public PSDateAfterCreation(int daysAfterCreationGreaterThan)
{
this.DaysAfterCreationGreaterThan = daysAfterCreationGreaterThan;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,17 @@ This command first create 2 ManagementPolicy rule objects, then creates or updat
```
PS C:\>Set-AzStorageAccountManagementPolicy -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -Policy (@{
Rules=(@{
Enabled="true";
Enabled=$true;
Name="Test";
Definition=(@{
Actions=(@{
BaseBlob=(@{
TierToCool=30;
TierToArchive=50;
Delete=100;
TierToCool=@{DaysAfterModificationGreaterThan=30};
TierToArchive=@{DaysAfterModificationGreaterThan=50};
Delete=@{DaysAfterModificationGreaterThan=100};
});
Snapshot=(@{
Delete=100
Delete=@{DaysAfterCreationGreaterThan=100};
});
});
Filters=(@{
Expand All @@ -161,12 +161,12 @@ PS C:\>Set-AzStorageAccountManagementPolicy -ResourceGroupName "myresourcegroup"
})
},
@{
Enabled="false";
Enabled=$false;
Name="Test2";
Definition=(@{
Actions=(@{
BaseBlob=(@{
TierToCool=80;
TierToCool=@{DaysAfterModificationGreaterThan=80};
});
});
Filters=(@{
Expand Down Expand Up @@ -217,7 +217,7 @@ Rules : [
}
},
{
"Enabled": true,
"Enabled": false,
"Name": "Test2",
"Definition": {
"Actions": {
Expand Down