Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Azure/azure-powershell into…
Browse files Browse the repository at this point in the history
… mergepreview
  • Loading branch information
yifanz7 committed Oct 12, 2024
2 parents 68a4cfb + 543e011 commit ebacce1
Show file tree
Hide file tree
Showing 94 changed files with 1,654 additions and 291 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/powershell-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variables:
LinuxAgentPoolVMImage: ''
MacOSName: macOS
MacOSAgentPoolName: 'Azure Pipelines'
MacOSAgentPoolVMImage: macOS-latest
MacOSAgentPoolVMImage: macOS-13
TestFramework: net6.0
TestTarget: Test
Configuration: Debug
Expand Down
32 changes: 32 additions & 0 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3983,6 +3983,22 @@ configuration:
- azureSQLGitHub
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
label: Service Attention
- labelAdded:
label: SSH
- hasLabel:
label: Service Attention
- hasLabel:
label: SSH
then:
- mentionUsers:
mentionees:
- vthiebaut10
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
Expand Down Expand Up @@ -4153,6 +4169,22 @@ configuration:
- Shipra1Mishra
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
label: Service Attention
- labelAdded:
label: Traffic Collector
- hasLabel:
label: Service Attention
- hasLabel:
label: Traffic Collector
then:
- mentionUsers:
mentionees:
- rmodh
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- or:
- labelAdded:
Expand Down
8 changes: 0 additions & 8 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@
#### Az.RecoveryServices 7.2.0
* Fixed bug for making RecoveryAzureStorageAccountId parameter optional in 'New-ASRReplicationProtectedItem' cmdlet of H2A.

#### Az.RedisEnterpriseCache 1.3.0
* Added support for using Microsoft Entra token-based authentication.
* Added the new properties of Cluster: highAvailability and redundancyMode.
* Added new product SKUs.
* Added the new properties of Database: accessKeysAuthentication.
* Added Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup to force link geo replicated caches.
* Added Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion to upgrade the redis database version directly.

#### Az.Resources 7.5.0
* Added 'ResourceSelector' and 'Override' parameters to 'New/Update-AzPolicyAssignment'.
* Added 'ResourceSelector' parameter to 'New/Update-AzPolicyExemption'.
Expand Down
4 changes: 0 additions & 4 deletions documentation/SyntaxChangeLog/SyntaxChangeLog-Az12.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
* Modified cmdlet `Set-AzNetworkWatcherFlowLog`
- Added parameters `-EnabledFilteringCriteria`, `-UserAssignedIdentityId`
* Added cmdlet `Get-AzBastionShareableLink`, `New-AzBastionShareableLink`, `Remove-AzBastionShareableLink`
#### Az.RedisEnterpriseCache 1.3.0
* Modified cmdlet `Update-AzRedisEnterpriseCache`
- Added parameter `-HighAvailability`
* Added cmdlet `Get-AzRedisEnterpriseCacheAccessPolicyAssignment`, `Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup`, `New-AzRedisEnterpriseCacheAccessPolicyAssignment`, `Remove-AzRedisEnterpriseCacheAccessPolicyAssignment`, `Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion`
#### Az.Resources 7.5.0
* Modified cmdlet `New-AzPolicyAssignment`
- Added parameters `-Override`, `-ResourceSelector`
Expand Down
12 changes: 12 additions & 0 deletions documentation/azure-powershell-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
| ElasticSan on Azure | `Az.ElasticSan` | [![ElasticSan]][ElasticSanGallery] | [Changelog][ElasticSanChangeLog] |
| Event Grid | `Az.EventGrid` | [![EventGrid]][EventGridGallery] | [Changelog][EventGridChangeLog] |
| Event Hubs | `Az.EventHub` | [![EventHub]][EventHubGallery] | [Changelog][EventHubChangeLog] |
| Fabric | `Fabric` | [![Fabric]][FabricGallery] | [Changelog][FabricChangeLog] |
| FirmwareAnalysis | `FirmwareAnalysis` | [![FirmwareAnalysis]][FirmwareAnalysisGallery] | [Changelog][FirmwareAnalysisChangeLog] |
| Fleet | `Az.Fleet` | [![Fleet]][FleetGallery] | [Changelog][FleetChangeLog] |
| Fluid Relay | `Az.FluidRelay` | [![FluidRelay]][FluidRelayGallery] | [Changelog][FluidRelayChangeLog] |
Expand All @@ -99,6 +100,7 @@
| IoT Hub | `Az.IotHub` | [![IotHub]][IotHubGallery] | [Changelog][IotHubChangeLog] |
| Key Vault | `Az.KeyVault` | [![KeyVault]][KeyVaultGallery] | [Changelog][KeyVaultChangeLog] |
| Kubernetes Configuration | `Az.KubernetesConfiguration` | [![KubernetesConfiguration]][KubernetesConfigurationGallery] | [Changelog][KubernetesConfigurationChangeLog] |
| Kubernetes Runtime | `Az.KubernetesRuntime` | [![KubernetesRuntime]][KubernetesRuntimeGallery] | [Changelog][KubernetesRuntimeChangeLog] |
| Kusto | `Az.Kusto` | [![Kusto]][KustoGallery] | [Changelog][KustoChangeLog] |
| Lab Services | `Az.LabServices` | [![LabServices]][LabServicesGallery] | [Changelog][LabServicesChangeLog] |
| Load Testing | `Az.LoadTesting` | [![LoadTesting]][LoadTestingGallery] | [Changelog][LoadTestingChangeLog] |
Expand Down Expand Up @@ -176,6 +178,7 @@
| Synapse Analytics | `Az.Synapse` | [![Synapse]][SynapseGallery] | [Changelog][SynapseChangeLog] |
| Time Series Insights | `Az.TimeSeriesInsights` | [![TimeSeriesInsights]][TimeSeriesInsightsGallery] | [Changelog][TimeSeriesInsightsChangeLog] |
| Traffic Manager | `Az.TrafficManager` | [![TrafficManager]][TrafficManagerGallery] | [Changelog][TrafficManagerChangeLog] |
| Terraform | `Az.Terraform` | [![Terraform]][TerraformGallery] | [Changelog][TerraformChangeLog] |
| Azure VMware Solution | `Az.VMware` | [![VMware]][VMwareGallery] | [Changelog][VMwareChangeLog] |
| Voice Services | `Az.VoiceServices` | [![VoiceServices]][VMwareGallery] | [Changelog][VoiceServicesChangeLog] |
| Web App Service | `Az.Websites` | [![Websites]][WebsitesGallery] | [Changelog][WebsitesChangeLog] |
Expand Down Expand Up @@ -258,6 +261,7 @@
[ElasticSan]: https://img.shields.io/powershellgallery/v/Az.ElasticSan.svg?style=flat-square&label=Az.ElasticSan
[EventGrid]: https://img.shields.io/powershellgallery/v/Az.EventGrid.svg?style=flat-square&label=Az.EventGrid
[EventHub]: https://img.shields.io/powershellgallery/v/Az.EventHub.svg?style=flat-square&label=Az.EventHub
[Fabric]: https://img.shields.io/powershellgallery/v/Az.Fabric.svg?style=flat-square&label=Az.Fabric
[FirmwareAnalysis]: https://img.shields.io/powershellgallery/v/Az.FirmwareAnalysis.svg?style=flat-square&label=Az.FirmwareAnalysis
[Fleet]: https://img.shields.io/powershellgallery/v/Az.Fleet.svg?style=flat-square&label=Az.Fleet
[FluidRelay]: https://img.shields.io/powershellgallery/v/Az.FluidRelay.svg?style=flat-square&label=Az.FluidRelay
Expand All @@ -277,6 +281,7 @@
[IotHub]: https://img.shields.io/powershellgallery/v/Az.IotHub.svg?style=flat-square&label=Az.IotHub
[KeyVault]: https://img.shields.io/powershellgallery/v/Az.KeyVault.svg?style=flat-square&label=Az.KeyVault
[KubernetesConfiguration]: https://img.shields.io/powershellgallery/v/Az.KubernetesConfiguration.svg?style=flat-square&label=Az.KubernetesConfiguration
[KubernetesRuntime]: https://img.shields.io/powershellgallery/v/Az.KubernetesRuntime.svg?style=flat-square&label=Az.KubernetesRuntime
[Kusto]: https://img.shields.io/powershellgallery/v/Az.Kusto.svg?style=flat-square&label=Az.Kusto
[LabServices]: https://img.shields.io/powershellgallery/v/Az.LabServices.svg?style=flat-square&label=Az.LabServices
[LoadTesting]: https://img.shields.io/powershellgallery/v/Az.LoadTesting.svg?style=flat-square&label=Az.LoadTesting
Expand Down Expand Up @@ -354,6 +359,7 @@
[Synapse]: https://img.shields.io/powershellgallery/v/Az.Synapse.svg?style=flat-square&label=Az.Synapse
[TimeSeriesInsights]: https://img.shields.io/powershellgallery/v/Az.TimeSeriesInsights.svg?style=flat-square&label=Az.TimeSeriesInsights
[TrafficManager]: https://img.shields.io/powershellgallery/v/Az.TrafficManager.svg?style=flat-square&label=Az.TrafficManager
[Terraform]: https://img.shields.io/powershellgallery/v/Az.Terraform.svg?style=flat-square&label=Az.Terraform
[VMware]: https://img.shields.io/powershellgallery/v/Az.VMware.svg?style=flat-square&label=Az.VMware
[VoiceServices]: https://img.shields.io/powershellgallery/v/Az.VoiceServices.svg?style=flat-square&label=Az.VoiceServices
[Websites]: https://img.shields.io/powershellgallery/v/Az.Websites.svg?style=flat-square&label=Az.Websites
Expand Down Expand Up @@ -432,6 +438,7 @@
[ElasticSanGallery]: https://www.powershellgallery.com/packages/Az.ElasticSan/
[EventGridGallery]: https://www.powershellgallery.com/packages/Az.EventGrid/
[EventHubGallery]: https://www.powershellgallery.com/packages/Az.EventHub/
[FabricGallery]: https://www.powershellgallery.com/packages/Az.Fabric/
[FirmwareAnalysisGallery]: https://www.powershellgallery.com/packages/Az.FirmwareAnalysis/
[FleetGallery]: https://www.powershellgallery.com/packages/Az.Fleet/
[FluidRelayGallery]: https://www.powershellgallery.com/packages/Az.FluidRelay/
Expand All @@ -451,6 +458,7 @@
[IotHubGallery]: https://www.powershellgallery.com/packages/Az.IotHub/
[KeyVaultGallery]: https://www.powershellgallery.com/packages/Az.KeyVault/
[KubernetesConfigurationGallery]: https://www.powershellgallery.com/packages/Az.KubernetesConfiguration/
[KubernetesRuntimeGallery]: https://www.powershellgallery.com/packages/Az.KubernetesRuntime/
[KustoGallery]: https://www.powershellgallery.com/packages/Az.Kusto/
[LabServicesGallery]: https://www.powershellgallery.com/packages/Az.LabServices/
[LoadTestingGallery]: https://www.powershellgallery.com/packages/Az.LoadTesting/
Expand Down Expand Up @@ -528,6 +536,7 @@
[SynapseGallery]: https://www.powershellgallery.com/packages/Az.Synapse/
[TimeSeriesInsightsGallery]: https://www.powershellgallery.com/packages/Az.TimeSeriesInsights/
[TrafficManagerGallery]: https://www.powershellgallery.com/packages/Az.TrafficManager/
[TerraformGallery]: https://www.powershellgallery.com/packages/Az.Terraform/
[VMwareGallery]: https://www.powershellgallery.com/packages/Az.VMware/
[VoiceServicesGallery]: https://www.powershellgallery.com/packages/Az.VoiceServices/
[WebsitesGallery]: https://www.powershellgallery.com/packages/Az.Websites/
Expand Down Expand Up @@ -604,6 +613,7 @@
[ElasticSanChangeLog]: ../src/ElasticSan/ElasticSan/ChangeLog.md
[EventGridChangeLog]: ../src/EventGrid/EventGrid/ChangeLog.md
[EventHubChangeLog]: ../src/EventHub/EventHub/ChangeLog.md
[FabricChangeLog]: ../src/Fabric/Fabric/ChangeLog.md
[FirmwareAnalysisChangeLog]: ../src/FirmwareAnalysis/FirmwareAnalysis/ChangeLog.md
[FleetChangeLog]: ../src/Fleet/Fleet/ChangeLog.md
[FluidRelayChangeLog]: ../src/FluidRelay/FluidRelay/ChangeLog.md
Expand All @@ -623,6 +633,7 @@
[IotHubChangeLog]: ../src/IotHub/IotHub/ChangeLog.md
[KeyVaultChangeLog]: ../src/KeyVault/KeyVault/ChangeLog.md
[KubernetesConfigurationChangeLog]: ../src/KubernetesConfiguration/KubernetesConfiguration/ChangeLog.md
[KubernetesRuntimeChangeLog]: ../src/KubernetesRuntime/KubernetesRuntime/ChangeLog.md
[KustoChangeLog]: ../src/Kusto/Kusto/ChangeLog.md
[LabServicesChangeLog]: ../src/LabServices/LabServices/ChangeLog.md
[LoadTestingChangeLog]: ../src/LoadTesting/LoadTesting/ChangeLog.md
Expand Down Expand Up @@ -700,6 +711,7 @@
[SynapseChangeLog]: ../src/Synapse/Synapse/ChangeLog.md
[TimeSeriesInsightsChangeLog]: ../src/TimeSeriesInsights/TimeSeriesInsights/ChangeLog.md
[TrafficManagerChangeLog]: ../src/TrafficManager/TrafficManager/ChangeLog.md
[TerraformChangeLog]: ../src/Terraform/Terraform/ChangeLog.md
[VMwareChangeLog]: ../src/VMware/VMware/ChangeLog.md
[VoiceServicesChangeLog]: ../src/VoiceServices/VoiceServices/ChangeLog.md
[WebsitesChangeLog]: ../src/Websites/Websites/ChangeLog.md
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Breaking Changes in Generated Modules Due to AutoRest.PowerShell Upgrade from v3 to v4

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.

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.

**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.**

## List Replaces Array in Generated C# Classes

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.

### How to Mitigate the Impact of Breaking Changes

* "Use methods from List to replace methods from Array, for example: use count instead of Length to retrieve the number of elements
* Use the ToArray function if conversion to a fixed-size array is needed

## Use Primitive Types for Enum Instead of Struct

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.

### How to Mitigate the Impact of Breaking Changes

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.

## Breaking Changes Due to Bug Fixes

### Removal of PassThru for Certain Cmdlets

`-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.

#### How to Mitigate the Impact of Breaking Changes

Discontinue using the `PassThru` parameter for these cmdlets. Be careful that by doing so the output may change.

### Removal of Readonly Parameters

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.

#### How to Mitigate the Impact of Breaking Changes

It's safe to simply remove these Readonly parameters, as they are ignored by the service.
5 changes: 5 additions & 0 deletions documentation/breaking-changes/upcoming-breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Az.Accounts

### `Resolve-AzError`

- The alias `Resolve-Error` will be removed. Please use `Resolve-AzError` instead.
- This change is expected to take effect from Az.Accounts version: 4.0.0 and Az version: 13.0.0

### `Get-AzAccessToken`

- Cmdlet breaking-change will happen to all parameter sets
Expand Down
3 changes: 2 additions & 1 deletion src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
-->

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

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

## Version 3.0.3
* Reduced the frequency of displaying sign-in announcement messages.
Expand Down
1 change: 1 addition & 0 deletions src/Accounts/Accounts/Errors/ResolveError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace Microsoft.Azure.Commands.Profile.Errors
[OutputType(typeof(AzureErrorRecord))]
[OutputType(typeof(AzureExceptionRecord))]
[OutputType(typeof(AzureRestExceptionRecord))]
[GenericBreakingChangeWithVersion("The alias 'Resolve-Error' will be removed. Please use 'Resolve-AzError' instead.", "13.0.0", "4.0.0")]
public class ResolveError : AzureRMCmdlet
{
public const string AnyErrorParameterSet = "AnyErrorParameterSet";
Expand Down
4 changes: 2 additions & 2 deletions src/Compute/Compute/help/New-AzGalleryImageVersion.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ $galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$galleryImageVersionName = "1.0.0"
$location = "eastus"
$sourceImageId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/virtualMachines/myVM"
New-AzGalleryImageVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryImageDefinitionName $galleryImageDefinitionName -Name $galleryImageVersionName -Location $location -SourceImageId $sourceImageId
$sourceImageVMId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/virtualMachines/myVM"
New-AzGalleryImageVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryImageDefinitionName $galleryImageDefinitionName -Name $galleryImageVersionName -Location $location -SourceImageVMId $sourceImageVMId
```

Add a new image version from a virtual machine into the image definition.
Expand Down
Loading

0 comments on commit ebacce1

Please sign in to comment.