Skip to content

Commit 8d9f4db

Browse files
authored
Merge pull request #26296 from yifanz7/mergepreview
[Storage][Do Not Squash] Merge recent chanegs from main to Az.Storage-preview
2 parents 68a4cfb + ebacce1 commit 8d9f4db

File tree

94 files changed

+1654
-291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1654
-291
lines changed

.azure-pipelines/powershell-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ variables:
77
LinuxAgentPoolVMImage: ''
88
MacOSName: macOS
99
MacOSAgentPoolName: 'Azure Pipelines'
10-
MacOSAgentPoolVMImage: macOS-latest
10+
MacOSAgentPoolVMImage: macOS-13
1111
TestFramework: net6.0
1212
TestTarget: Test
1313
Configuration: Debug

.github/policies/resourceManagement.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3983,6 +3983,22 @@ configuration:
39833983
- azureSQLGitHub
39843984
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
39853985
assignMentionees: False
3986+
- if:
3987+
- or:
3988+
- labelAdded:
3989+
label: Service Attention
3990+
- labelAdded:
3991+
label: SSH
3992+
- hasLabel:
3993+
label: Service Attention
3994+
- hasLabel:
3995+
label: SSH
3996+
then:
3997+
- mentionUsers:
3998+
mentionees:
3999+
- vthiebaut10
4000+
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
4001+
assignMentionees: False
39864002
- if:
39874003
- or:
39884004
- labelAdded:
@@ -4153,6 +4169,22 @@ configuration:
41534169
- Shipra1Mishra
41544170
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
41554171
assignMentionees: False
4172+
- if:
4173+
- or:
4174+
- labelAdded:
4175+
label: Service Attention
4176+
- labelAdded:
4177+
label: Traffic Collector
4178+
- hasLabel:
4179+
label: Service Attention
4180+
- hasLabel:
4181+
label: Traffic Collector
4182+
then:
4183+
- mentionUsers:
4184+
mentionees:
4185+
- rmodh
4186+
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
4187+
assignMentionees: False
41564188
- if:
41574189
- or:
41584190
- labelAdded:

ChangeLog.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@
6363
#### Az.RecoveryServices 7.2.0
6464
* Fixed bug for making RecoveryAzureStorageAccountId parameter optional in 'New-ASRReplicationProtectedItem' cmdlet of H2A.
6565

66-
#### Az.RedisEnterpriseCache 1.3.0
67-
* Added support for using Microsoft Entra token-based authentication.
68-
* Added the new properties of Cluster: highAvailability and redundancyMode.
69-
* Added new product SKUs.
70-
* Added the new properties of Database: accessKeysAuthentication.
71-
* Added Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup to force link geo replicated caches.
72-
* Added Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion to upgrade the redis database version directly.
73-
7466
#### Az.Resources 7.5.0
7567
* Added 'ResourceSelector' and 'Override' parameters to 'New/Update-AzPolicyAssignment'.
7668
* Added 'ResourceSelector' parameter to 'New/Update-AzPolicyExemption'.

documentation/SyntaxChangeLog/SyntaxChangeLog-Az12.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
* Modified cmdlet `Set-AzNetworkWatcherFlowLog`
4141
- Added parameters `-EnabledFilteringCriteria`, `-UserAssignedIdentityId`
4242
* Added cmdlet `Get-AzBastionShareableLink`, `New-AzBastionShareableLink`, `Remove-AzBastionShareableLink`
43-
#### Az.RedisEnterpriseCache 1.3.0
44-
* Modified cmdlet `Update-AzRedisEnterpriseCache`
45-
- Added parameter `-HighAvailability`
46-
* Added cmdlet `Get-AzRedisEnterpriseCacheAccessPolicyAssignment`, `Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup`, `New-AzRedisEnterpriseCacheAccessPolicyAssignment`, `Remove-AzRedisEnterpriseCacheAccessPolicyAssignment`, `Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion`
4743
#### Az.Resources 7.5.0
4844
* Modified cmdlet `New-AzPolicyAssignment`
4945
- Added parameters `-Override`, `-ResourceSelector`

documentation/azure-powershell-modules.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
| ElasticSan on Azure | `Az.ElasticSan` | [![ElasticSan]][ElasticSanGallery] | [Changelog][ElasticSanChangeLog] |
8181
| Event Grid | `Az.EventGrid` | [![EventGrid]][EventGridGallery] | [Changelog][EventGridChangeLog] |
8282
| Event Hubs | `Az.EventHub` | [![EventHub]][EventHubGallery] | [Changelog][EventHubChangeLog] |
83+
| Fabric | `Fabric` | [![Fabric]][FabricGallery] | [Changelog][FabricChangeLog] |
8384
| FirmwareAnalysis | `FirmwareAnalysis` | [![FirmwareAnalysis]][FirmwareAnalysisGallery] | [Changelog][FirmwareAnalysisChangeLog] |
8485
| Fleet | `Az.Fleet` | [![Fleet]][FleetGallery] | [Changelog][FleetChangeLog] |
8586
| Fluid Relay | `Az.FluidRelay` | [![FluidRelay]][FluidRelayGallery] | [Changelog][FluidRelayChangeLog] |
@@ -99,6 +100,7 @@
99100
| IoT Hub | `Az.IotHub` | [![IotHub]][IotHubGallery] | [Changelog][IotHubChangeLog] |
100101
| Key Vault | `Az.KeyVault` | [![KeyVault]][KeyVaultGallery] | [Changelog][KeyVaultChangeLog] |
101102
| Kubernetes Configuration | `Az.KubernetesConfiguration` | [![KubernetesConfiguration]][KubernetesConfigurationGallery] | [Changelog][KubernetesConfigurationChangeLog] |
103+
| Kubernetes Runtime | `Az.KubernetesRuntime` | [![KubernetesRuntime]][KubernetesRuntimeGallery] | [Changelog][KubernetesRuntimeChangeLog] |
102104
| Kusto | `Az.Kusto` | [![Kusto]][KustoGallery] | [Changelog][KustoChangeLog] |
103105
| Lab Services | `Az.LabServices` | [![LabServices]][LabServicesGallery] | [Changelog][LabServicesChangeLog] |
104106
| Load Testing | `Az.LoadTesting` | [![LoadTesting]][LoadTestingGallery] | [Changelog][LoadTestingChangeLog] |
@@ -176,6 +178,7 @@
176178
| Synapse Analytics | `Az.Synapse` | [![Synapse]][SynapseGallery] | [Changelog][SynapseChangeLog] |
177179
| Time Series Insights | `Az.TimeSeriesInsights` | [![TimeSeriesInsights]][TimeSeriesInsightsGallery] | [Changelog][TimeSeriesInsightsChangeLog] |
178180
| Traffic Manager | `Az.TrafficManager` | [![TrafficManager]][TrafficManagerGallery] | [Changelog][TrafficManagerChangeLog] |
181+
| Terraform | `Az.Terraform` | [![Terraform]][TerraformGallery] | [Changelog][TerraformChangeLog] |
179182
| Azure VMware Solution | `Az.VMware` | [![VMware]][VMwareGallery] | [Changelog][VMwareChangeLog] |
180183
| Voice Services | `Az.VoiceServices` | [![VoiceServices]][VMwareGallery] | [Changelog][VoiceServicesChangeLog] |
181184
| Web App Service | `Az.Websites` | [![Websites]][WebsitesGallery] | [Changelog][WebsitesChangeLog] |
@@ -258,6 +261,7 @@
258261
[ElasticSan]: https://img.shields.io/powershellgallery/v/Az.ElasticSan.svg?style=flat-square&label=Az.ElasticSan
259262
[EventGrid]: https://img.shields.io/powershellgallery/v/Az.EventGrid.svg?style=flat-square&label=Az.EventGrid
260263
[EventHub]: https://img.shields.io/powershellgallery/v/Az.EventHub.svg?style=flat-square&label=Az.EventHub
264+
[Fabric]: https://img.shields.io/powershellgallery/v/Az.Fabric.svg?style=flat-square&label=Az.Fabric
261265
[FirmwareAnalysis]: https://img.shields.io/powershellgallery/v/Az.FirmwareAnalysis.svg?style=flat-square&label=Az.FirmwareAnalysis
262266
[Fleet]: https://img.shields.io/powershellgallery/v/Az.Fleet.svg?style=flat-square&label=Az.Fleet
263267
[FluidRelay]: https://img.shields.io/powershellgallery/v/Az.FluidRelay.svg?style=flat-square&label=Az.FluidRelay
@@ -277,6 +281,7 @@
277281
[IotHub]: https://img.shields.io/powershellgallery/v/Az.IotHub.svg?style=flat-square&label=Az.IotHub
278282
[KeyVault]: https://img.shields.io/powershellgallery/v/Az.KeyVault.svg?style=flat-square&label=Az.KeyVault
279283
[KubernetesConfiguration]: https://img.shields.io/powershellgallery/v/Az.KubernetesConfiguration.svg?style=flat-square&label=Az.KubernetesConfiguration
284+
[KubernetesRuntime]: https://img.shields.io/powershellgallery/v/Az.KubernetesRuntime.svg?style=flat-square&label=Az.KubernetesRuntime
280285
[Kusto]: https://img.shields.io/powershellgallery/v/Az.Kusto.svg?style=flat-square&label=Az.Kusto
281286
[LabServices]: https://img.shields.io/powershellgallery/v/Az.LabServices.svg?style=flat-square&label=Az.LabServices
282287
[LoadTesting]: https://img.shields.io/powershellgallery/v/Az.LoadTesting.svg?style=flat-square&label=Az.LoadTesting
@@ -354,6 +359,7 @@
354359
[Synapse]: https://img.shields.io/powershellgallery/v/Az.Synapse.svg?style=flat-square&label=Az.Synapse
355360
[TimeSeriesInsights]: https://img.shields.io/powershellgallery/v/Az.TimeSeriesInsights.svg?style=flat-square&label=Az.TimeSeriesInsights
356361
[TrafficManager]: https://img.shields.io/powershellgallery/v/Az.TrafficManager.svg?style=flat-square&label=Az.TrafficManager
362+
[Terraform]: https://img.shields.io/powershellgallery/v/Az.Terraform.svg?style=flat-square&label=Az.Terraform
357363
[VMware]: https://img.shields.io/powershellgallery/v/Az.VMware.svg?style=flat-square&label=Az.VMware
358364
[VoiceServices]: https://img.shields.io/powershellgallery/v/Az.VoiceServices.svg?style=flat-square&label=Az.VoiceServices
359365
[Websites]: https://img.shields.io/powershellgallery/v/Az.Websites.svg?style=flat-square&label=Az.Websites
@@ -432,6 +438,7 @@
432438
[ElasticSanGallery]: https://www.powershellgallery.com/packages/Az.ElasticSan/
433439
[EventGridGallery]: https://www.powershellgallery.com/packages/Az.EventGrid/
434440
[EventHubGallery]: https://www.powershellgallery.com/packages/Az.EventHub/
441+
[FabricGallery]: https://www.powershellgallery.com/packages/Az.Fabric/
435442
[FirmwareAnalysisGallery]: https://www.powershellgallery.com/packages/Az.FirmwareAnalysis/
436443
[FleetGallery]: https://www.powershellgallery.com/packages/Az.Fleet/
437444
[FluidRelayGallery]: https://www.powershellgallery.com/packages/Az.FluidRelay/
@@ -451,6 +458,7 @@
451458
[IotHubGallery]: https://www.powershellgallery.com/packages/Az.IotHub/
452459
[KeyVaultGallery]: https://www.powershellgallery.com/packages/Az.KeyVault/
453460
[KubernetesConfigurationGallery]: https://www.powershellgallery.com/packages/Az.KubernetesConfiguration/
461+
[KubernetesRuntimeGallery]: https://www.powershellgallery.com/packages/Az.KubernetesRuntime/
454462
[KustoGallery]: https://www.powershellgallery.com/packages/Az.Kusto/
455463
[LabServicesGallery]: https://www.powershellgallery.com/packages/Az.LabServices/
456464
[LoadTestingGallery]: https://www.powershellgallery.com/packages/Az.LoadTesting/
@@ -528,6 +536,7 @@
528536
[SynapseGallery]: https://www.powershellgallery.com/packages/Az.Synapse/
529537
[TimeSeriesInsightsGallery]: https://www.powershellgallery.com/packages/Az.TimeSeriesInsights/
530538
[TrafficManagerGallery]: https://www.powershellgallery.com/packages/Az.TrafficManager/
539+
[TerraformGallery]: https://www.powershellgallery.com/packages/Az.Terraform/
531540
[VMwareGallery]: https://www.powershellgallery.com/packages/Az.VMware/
532541
[VoiceServicesGallery]: https://www.powershellgallery.com/packages/Az.VoiceServices/
533542
[WebsitesGallery]: https://www.powershellgallery.com/packages/Az.Websites/
@@ -604,6 +613,7 @@
604613
[ElasticSanChangeLog]: ../src/ElasticSan/ElasticSan/ChangeLog.md
605614
[EventGridChangeLog]: ../src/EventGrid/EventGrid/ChangeLog.md
606615
[EventHubChangeLog]: ../src/EventHub/EventHub/ChangeLog.md
616+
[FabricChangeLog]: ../src/Fabric/Fabric/ChangeLog.md
607617
[FirmwareAnalysisChangeLog]: ../src/FirmwareAnalysis/FirmwareAnalysis/ChangeLog.md
608618
[FleetChangeLog]: ../src/Fleet/Fleet/ChangeLog.md
609619
[FluidRelayChangeLog]: ../src/FluidRelay/FluidRelay/ChangeLog.md
@@ -623,6 +633,7 @@
623633
[IotHubChangeLog]: ../src/IotHub/IotHub/ChangeLog.md
624634
[KeyVaultChangeLog]: ../src/KeyVault/KeyVault/ChangeLog.md
625635
[KubernetesConfigurationChangeLog]: ../src/KubernetesConfiguration/KubernetesConfiguration/ChangeLog.md
636+
[KubernetesRuntimeChangeLog]: ../src/KubernetesRuntime/KubernetesRuntime/ChangeLog.md
626637
[KustoChangeLog]: ../src/Kusto/Kusto/ChangeLog.md
627638
[LabServicesChangeLog]: ../src/LabServices/LabServices/ChangeLog.md
628639
[LoadTestingChangeLog]: ../src/LoadTesting/LoadTesting/ChangeLog.md
@@ -700,6 +711,7 @@
700711
[SynapseChangeLog]: ../src/Synapse/Synapse/ChangeLog.md
701712
[TimeSeriesInsightsChangeLog]: ../src/TimeSeriesInsights/TimeSeriesInsights/ChangeLog.md
702713
[TrafficManagerChangeLog]: ../src/TrafficManager/TrafficManager/ChangeLog.md
714+
[TerraformChangeLog]: ../src/Terraform/Terraform/ChangeLog.md
703715
[VMwareChangeLog]: ../src/VMware/VMware/ChangeLog.md
704716
[VoiceServicesChangeLog]: ../src/VoiceServices/VoiceServices/ChangeLog.md
705717
[WebsitesChangeLog]: ../src/Websites/Websites/ChangeLog.md
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Breaking Changes in Generated Modules Due to AutoRest.PowerShell Upgrade from v3 to v4
2+
3+
We are moving forward with using the new version of the code generation tool, AutoRest.PowerShell v4, to take advantage of the features offered by the latest version. The redesign of the generated code to support new user requirements in this version inevitably introduces some breaking changes.
4+
5+
Below, we list the potential breaking changes from the perspective of users that may occur when upgrading the code generation tool for Azure PowerShell modules.
6+
7+
**Note: The breaking changes listed below may not apply universally to all generated modules. The occurrence of these breaking changes also depends on the specific configurations used when generating Azure PowerShell modules with AutoRest.PowerShell v4. For detailed information on which breaking changes may occur, please refer to the [breaking change list](https://learn.microsoft.com/powershell/azure/upcoming-breaking-changes) for the specific module.**
8+
9+
## List Replaces Array in Generated C# Classes
10+
11+
We now generate collection-like properties as [`List`](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1) instead of [`Array`](https://learn.microsoft.com/en-us/dotnet/api/system.array) in the models. This is because `List` is dynamic that it allows appending/deleting elements, while `Array` is fixed-size hence difficult to edit.
12+
13+
### How to Mitigate the Impact of Breaking Changes
14+
15+
* "Use methods from List to replace methods from Array, for example: use count instead of Length to retrieve the number of elements
16+
* Use the ToArray function if conversion to a fixed-size array is needed
17+
18+
## Use Primitive Types for Enum Instead of Struct
19+
20+
We used to generate a struct for [enum](https://github.com/Azure/autorest/blob/main/docs/extensions/readme.md#x-ms-enum) to support tab completer for parameters. This design has been abandoned due to its limitation of only supporting enums with string type.
21+
22+
### How to Mitigate the Impact of Breaking Changes
23+
24+
Generally, this change will not cause a breaking change for users. In modules generated by older versions, users typically use primitive types, and the generated struct includes a converter that transforms these primitive types into the struct. The only requirement for users is to avoid using Microsoft.Azure.PowerShell.Cmdlets.{module}.Support.* directly.
25+
26+
## Breaking Changes Due to Bug Fixes
27+
28+
### Removal of PassThru for Certain Cmdlets
29+
30+
`-PassThru` is a switch parameter that we add to cmdlets that don't have outputs to enable the pipline functionality. In AutoRest.PowerShell v3, `-PassThru` was incorrectly added to some cmdlets that do have outputs. This is fixed in v4 and those extra `-PassThru` parameters are removed.
31+
32+
#### How to Mitigate the Impact of Breaking Changes
33+
34+
Discontinue using the `PassThru` parameter for these cmdlets. Be careful that by doing so the output may change.
35+
36+
### Removal of Readonly Parameters
37+
38+
If a property is marked `"x-ms-mutability": ["read"]` in the OpenAPI spec, it means it should only appear in the output but never as an input parameter. However, in AutoRest.PowerShell v3, such kind of readonly parameters were incorrectly generated for cmdlets.
39+
40+
#### How to Mitigate the Impact of Breaking Changes
41+
42+
It's safe to simply remove these Readonly parameters, as they are ignored by the service.

documentation/breaking-changes/upcoming-breaking-changes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Az.Accounts
44

5+
### `Resolve-AzError`
6+
7+
- The alias `Resolve-Error` will be removed. Please use `Resolve-AzError` instead.
8+
- This change is expected to take effect from Az.Accounts version: 4.0.0 and Az version: 13.0.0
9+
510
### `Get-AzAccessToken`
611

712
- Cmdlet breaking-change will happen to all parameter sets

src/Accounts/Accounts/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Added breaking change preannouncement for the removal of alias `Resolve-Error`. #26189
23+
* Integrated new detection library to expand the scope of secrets.
2224

2325
## Version 3.0.4
2426
* Added customized UserAgent for ARM telemetry.
2527
* Fixed secrets exposure in example documentation.
2628
* Updated `Connect-AzAccount` to fix a display issue in PowerShell ISE [#24556].
2729
* Updated the reference of Azure PowerShell Common to 1.3.100-preview.
2830
* Used Azure.Identity and Azure.Core directly for client assertion [#22628].
29-
* Integrated new detection library to expand the scope of secrets.
3031

3132
## Version 3.0.3
3233
* Reduced the frequency of displaying sign-in announcement messages.

src/Accounts/Accounts/Errors/ResolveError.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace Microsoft.Azure.Commands.Profile.Errors
3030
[OutputType(typeof(AzureErrorRecord))]
3131
[OutputType(typeof(AzureExceptionRecord))]
3232
[OutputType(typeof(AzureRestExceptionRecord))]
33+
[GenericBreakingChangeWithVersion("The alias 'Resolve-Error' will be removed. Please use 'Resolve-AzError' instead.", "13.0.0", "4.0.0")]
3334
public class ResolveError : AzureRMCmdlet
3435
{
3536
public const string AnyErrorParameterSet = "AnyErrorParameterSet";

src/Compute/Compute/help/New-AzGalleryImageVersion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ $galleryName = "myGallery"
3838
$galleryImageDefinitionName = "myImage"
3939
$galleryImageVersionName = "1.0.0"
4040
$location = "eastus"
41-
$sourceImageId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/virtualMachines/myVM"
42-
New-AzGalleryImageVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryImageDefinitionName $galleryImageDefinitionName -Name $galleryImageVersionName -Location $location -SourceImageId $sourceImageId
41+
$sourceImageVMId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/virtualMachines/myVM"
42+
New-AzGalleryImageVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryImageDefinitionName $galleryImageDefinitionName -Name $galleryImageVersionName -Location $location -SourceImageVMId $sourceImageVMId
4343
```
4444

4545
Add a new image version from a virtual machine into the image definition.

0 commit comments

Comments
 (0)