Skip to content

Commit aa6a038

Browse files
authored
[Storage] Add RestorePolicy.LastEnabledTime to cmdlet output (#11665)
1 parent 450374b commit aa6a038

File tree

8 files changed

+24
-7
lines changed

8 files changed

+24
-7
lines changed

src/EventGrid/EventGrid.Test/EventGrid.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageReference Include="Microsoft.Azure.Management.EventHub" Version="2.5.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.Relay" Version="2.0.2" />
1717
<PackageReference Include="Microsoft.Azure.Management.ServiceBus" Version="2.1.0" />
18-
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="15.0.0" />
18+
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="16.0.0" />
1919
</ItemGroup>
2020

2121
</Project>

src/Storage/Storage.Management.Test/Storage.Management.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ItemGroup>
1414
<PackageReference Include="Azure.Storage.Blobs" Version="12.4.0" />
1515
<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.0.0" />
16-
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="15.0.0" />
16+
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="16.0.0" />
1717
</ItemGroup>
1818

1919
</Project>

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Add RestorePolicy.LastEnabledTime to cmdlet output
22+
- `Get-AzStorageBlobServiceProperty`
23+
- `Enable-AzStorageBlobRestorePolicy`
2124
* Fixed #9880: Change NetWorkRule DefaultAction value defination to align with swagger.
2225
- Update-AzStorageAccountNetworkRuleSet
2326
- Get-AzStorageAccountNetworkRuleSet

src/Storage/Storage.Management/File/NewAzureStorageShare.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ public override void ExecuteCmdlet()
111111
this.ResourceGroupName,
112112
this.StorageAccountName,
113113
this.Name,
114-
MetadataDictionary,
115-
shareQuota);
114+
new FileShare(
115+
metadata: MetadataDictionary,
116+
shareQuota: shareQuota));
116117

117118
WriteObject(new PSShare(share));
118119
}

src/Storage/Storage.Management/File/UpdateAzureStorageShare.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ public override void ExecuteCmdlet()
151151
this.ResourceGroupName,
152152
this.StorageAccountName,
153153
this.Name,
154-
MetadataDictionary,
155-
shareQuota);
154+
new FileShare(
155+
metadata: MetadataDictionary,
156+
shareQuota: shareQuota));
156157

157158
WriteObject(new PSShare(Share));
158159
}

src/Storage/Storage.Management/Models/PSBlobServiceProperties.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class PSBlobServiceProperties
4141
public PSDeleteRetentionPolicy DeleteRetentionPolicy { get; set; }
4242
[Ps1Xml(Label = "RestorePolicy.Enabled", Target = ViewControl.Table, ScriptBlock = "$_.RestorePolicy.Enabled", Position = 5)]
4343
[Ps1Xml(Label = "RestorePolicy.Days", Target = ViewControl.Table, ScriptBlock = "$_.RestorePolicy.Days", Position = 6)]
44+
[Ps1Xml(Label = "RestorePolicy.LastEnabledTime", Target = ViewControl.Table, ScriptBlock = "$_.RestorePolicy.LastEnabledTime", Position = 7)]
4445
public PSRestorePolicy RestorePolicy { get; set; }
4546
public PSCorsRules Cors { get; set; }
4647

@@ -157,6 +158,7 @@ public class PSRestorePolicy
157158
{
158159
public bool? Enabled { get; set; }
159160
public int? Days { get; set; }
161+
public DateTime? LastEnabledTime { get; set; }
160162

161163
public PSRestorePolicy()
162164
{
@@ -166,6 +168,8 @@ public PSRestorePolicy(RestorePolicyProperties policy)
166168
{
167169
this.Enabled = policy.Enabled;
168170
this.Days = policy.Days;
171+
this.LastEnabledTime = policy.LastEnabledTime;
172+
169173
}
170174
public RestorePolicyProperties ParseRestorePolicy()
171175
{

src/Storage/Storage.Management/Storage.Management.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<RootNamespace>$(LegacyAssemblyPrefix)$(PsModuleName)</RootNamespace>
1515
</PropertyGroup>
1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="15.0.0" />
17+
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="16.0.0" />
1818
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.1.1" />
1919
<PackageReference Include="Microsoft.Azure.Storage.File" Version="11.1.1" />
2020
<PackageReference Include="Microsoft.Azure.Storage.Queue" Version="11.1.1" />

src/Storage/Storage.Management/Storage.Management.format.ps1xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@
312312
<Alignment>Left</Alignment>
313313
<Label>RestorePolicy.Days</Label>
314314
</TableColumnHeader>
315+
<TableColumnHeader>
316+
<Alignment>Left</Alignment>
317+
<Label>RestorePolicy.LastEnabledTime</Label>
318+
</TableColumnHeader>
315319
<TableColumnHeader>
316320
<Alignment>Left</Alignment>
317321
<Label>ChangeFeed</Label>
@@ -348,6 +352,10 @@
348352
<Alignment>Left</Alignment>
349353
<ScriptBlock>$_.RestorePolicy.Days</ScriptBlock>
350354
</TableColumnItem>
355+
<TableColumnItem>
356+
<Alignment>Left</Alignment>
357+
<ScriptBlock>$_.RestorePolicy.LastEnabledTime</ScriptBlock>
358+
</TableColumnItem>
351359
<TableColumnItem>
352360
<Alignment>Left</Alignment>
353361
<ScriptBlock>$_.ChangeFeed.Enabled</ScriptBlock>

0 commit comments

Comments
 (0)