Migrate Az.Functions from AutoRest PowerShell v3 to v4#29321
Migrate Az.Functions from AutoRest PowerShell v3 to v4#29321Francisco-Gamino wants to merge 17 commits intoAzure:mainfrom
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This pull request migrates the Az.Functions module from AutoRest PowerShell v3 to v4, updating generated/custom cmdlets, help/docs, and test assets to align with the new model/types and revised identity parameter behavior.
Changes:
- Migrates cmdlets/models to AutoRest PowerShell v4 (type namespace changes, new partial model support classes).
- Updates
New-AzFunctionApp/Update-AzFunctionAppidentity parameters and adds SKU guards inUpdate-AzFunctionApp. - Refreshes help/docs/examples, test scripts, and stack definitions (
functionAppStacks.json) with new runtimes/SKU metadata.
Reviewed changes
Copilot reviewed 65 out of 75 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Functions/Functions/help/Update-AzFunctionAppSetting.md | Help text updates for v4 model types and parameter descriptions. |
| src/Functions/Functions/help/Update-AzFunctionAppPlan.md | Help text updates for v4 model types and parameter descriptions. |
| src/Functions/Functions/help/Update-AzFunctionApp.md | Updates help to reflect new identity parameters and v4 model types. |
| src/Functions/Functions/help/Stop-AzFunctionApp.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Start-AzFunctionApp.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Restart-AzFunctionApp.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Remove-AzFunctionAppSetting.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Remove-AzFunctionAppPlan.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Remove-AzFunctionApp.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/New-AzFunctionAppPlan.md | Updates help with DefaultProfile description and v4 output type. |
| src/Functions/Functions/help/New-AzFunctionApp.md | Updates help for new identity parameters and v4 model types. |
| src/Functions/Functions/help/Get-AzFunctionAppSetting.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Get-AzFunctionAppPlan.md | Updates help output type to v4 model type. |
| src/Functions/Functions/help/Get-AzFunctionAppAvailableLocation.md | Updates help output type to v4 model type. |
| src/Functions/Functions/help/Get-AzFunctionApp.md | Updates help output type to v4 model type. |
| src/Functions/Functions/Properties/AssemblyInfo.cs | Updates Functions assembly version metadata. |
| src/Functions/Functions/ChangeLog.md | Updates Upcoming Release notes to describe v3→v4 migration and breaking changes. |
| src/Functions/Functions/Az.Functions.psd1 | Updates module manifest metadata/version and release notes content. |
| src/Functions/Functions.sln | Updates solution project GUID reference for regenerated project. |
| src/Functions/Functions.Autorest/test/utils.ps1 | Expands test environment setup, including Flex Consumption guard test setup. |
| src/Functions/Functions.Autorest/test/env.json | Refreshes recorded test environment values and adds new fields for new tests. |
| src/Functions/Functions.Autorest/test/New-Update-Remove-AzFunctionApp.Tests.ps1 | Updates tests for new identity parameters and adds new identity/guard scenarios. |
| src/Functions/Functions.Autorest/test/New-AzFunctionApp.Tests.ps1 | Updates tests for new identity parameters and adds combined identity coverage. |
| src/Functions/Functions.Autorest/test/New-AzFunctionApp.FlexConsumption.Tests.ps1 | Updates Flex tests to new identity parameters. |
| src/Functions/Functions.Autorest/generate-info.json | Updates generation identifier for v4 regeneration. |
| src/Functions/Functions.Autorest/examples/Update-AzFunctionApp.md | Updates examples to new identity parameter usage. |
| src/Functions/Functions.Autorest/docs/Update-AzFunctionAppSetting.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Update-AzFunctionAppPlan.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Update-AzFunctionApp.md | Updates docs for new identity parameters and v4 model types. |
| src/Functions/Functions.Autorest/docs/Stop-AzFunctionApp.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Start-AzFunctionApp.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Restart-AzFunctionApp.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Remove-AzFunctionAppSetting.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Remove-AzFunctionAppPlan.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Remove-AzFunctionApp.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/New-AzFunctionAppPlan.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/New-AzFunctionApp.md | Updates docs for new identity parameters and v4 model types. |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionAppSetting.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionAppPlan.md | Updates docs output type to v4 model type. |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionAppAvailableLocation.md | Updates docs output type to v4 model type. |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionApp.md | Updates docs output type to v4 model type. |
| src/Functions/Functions.Autorest/docs/Az.Functions.md | Updates module GUID metadata in docs. |
| src/Functions/Functions.Autorest/custom/api/Support/Site.cs | Adds v4 partial model support for custom properties on Site. |
| src/Functions/Functions.Autorest/custom/api/Support/AppServicePlan.cs | Adds v4 partial model support for custom properties on AppServicePlan. |
| src/Functions/Functions.Autorest/custom/Update-AzFunctionAppSetting.ps1 | Updates output type and parameter metadata for v4 models. |
| src/Functions/Functions.Autorest/custom/Update-AzFunctionAppPlan.ps1 | Updates v4 model types and plan construction type. |
| src/Functions/Functions.Autorest/custom/Update-AzFunctionApp.ps1 | Implements new identity parameters, SKU guards, and v4 model usage. |
| src/Functions/Functions.Autorest/custom/Stop-AzFunctionApp.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/Start-AzFunctionApp.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/Restart-AzFunctionApp.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/Remove-AzFunctionAppSetting.ps1 | Updates output type and parameter metadata for v4 models. |
| src/Functions/Functions.Autorest/custom/Remove-AzFunctionAppPlan.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/Remove-AzFunctionApp.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/New-AzFunctionAppPlan.ps1 | Updates v4 model types and plan construction type. |
| src/Functions/Functions.Autorest/custom/New-AzFunctionApp.ps1 | Implements new identity parameters and v4 model usage. |
| src/Functions/Functions.Autorest/custom/HelperFunctions.ps1 | Updates model type instantiations, endpoint suffix logic, and name availability call. |
| src/Functions/Functions.Autorest/custom/Get-AzFunctionAppSetting.ps1 | Updates output type and parameter metadata for v4 models. |
| src/Functions/Functions.Autorest/custom/Get-AzFunctionAppPlan.ps1 | Updates output type for v4 models. |
| src/Functions/Functions.Autorest/custom/Get-AzFunctionAppAvailableLocation.ps1 | Updates output type for v4 models. |
| src/Functions/Functions.Autorest/custom/Get-AzFunctionApp.ps1 | Updates output type for v4 models. |
| src/Functions/Functions.Autorest/custom/FunctionsStack/functionAppStacks.json | Refreshes stack definitions (Node 24, Python 3.14, Java 25) and FC1 SKU metadata. |
| src/Functions/Functions.Autorest/custom/Functions.types.ps1xml | Updates type names to v4 model namespaces for formatting/aliases. |
| src/Functions/Functions.Autorest/custom/Functions.format.ps1xml | Updates format view type names to v4 model namespaces. |
| src/Functions/Functions.Autorest/README.md | Switches AutoRest PowerShell extension to 4.x and updates directives. |
| src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs | Updates AutoRest assembly version metadata. |
Comments suppressed due to low confidence (1)
src/Functions/Functions/ChangeLog.md:33
- The changelog jumps from
## Upcoming Releasedirectly to## Version 4.3.0, and no longer includes a## Version 4.3.1section. If 4.3.1 was previously released, removing that entry rewrites release history and also conflicts with the prior 4.3.1 module version.
d3ce2b5 to
b727b8e
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
b727b8e to
793a58c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 64 out of 75 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (1)
src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs:33
- There are multiple trailing blank lines added at the end of the file. Please remove the extra empty lines to keep the generated file clean and minimize noisy diffs.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 64 out of 75 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs:35
- This file now ends with a large block of trailing blank lines. Please remove the extra empty lines to keep the generated assembly metadata clean and reduce diff noise in future regenerations.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
3965c10 to
fdcdf80
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 64 out of 75 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs:38
- There are multiple trailing blank lines added at the end of this file. Please remove the extra empty lines to keep generated assembly metadata files clean and minimize unnecessary diffs.
| Write-Verbose "Validate that the expected expetedErrorId is thrown" -Verbose | ||
| $scriptblock | Should -Throw -ErrorId $expectedErrorId |
There was a problem hiding this comment.
Typo in log message: "expetedErrorId" should be "expectedErrorId".
fdcdf80 to
594e1e2
Compare
|
/azp run |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 65 out of 76 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs:41
- There are a number of trailing blank lines appended after the assembly attributes. These add noise to diffs and can trip formatting/linting checks; please remove the extra empty lines so the file ends right after the last attribute.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
To the author of the pull request, |
Breaking changes: - Replaced -IdentityType parameter with -EnableSystemAssignedIdentity (Boolean/SwitchParameter) in New-AzFunctionApp and Update-AzFunctionApp - Replaced -IdentityID parameter with -UserAssignedIdentity (String array of ARM resource IDs) in New-AzFunctionApp and Update-AzFunctionApp - New-AzFunctionApp and Update-AzFunctionApp now support combining SystemAssigned and UserAssigned identities in a single call - Output type property changes: enum types converted to strings, arrays converted to Lists (see BreakingChangeIssues.csv) Bug fixes: - Fix parameter set conflict between Create and CreateExpanded when passing identity params to internal cmdlet - Fix AppSetting list type (List[Object] to List[INameValuePair]) - Fix error messages to reference new parameter names - Fix variable typo (siteCofig to siteConfig) - Add SKU validation guards for Flex Consumption and Container App plans Tests: - Added combined SystemAssigned+UserAssigned identity tests for New-AzFunctionApp and Update-AzFunctionApp - Added Update-AzFunctionApp error guard test for Flex Consumption apps - Updated test assertions for new parameter names and ErrorIds - Removed 9 auto-generated template test stubs - All 64 tests pass in both record and playback modes Other: - Updated functionAppStacks.json (adds Node.js 24, Python 3.14, Java 25) - Added HelpMessage attributes for InputObject, DefaultProfile, and ResourceGroupName across all custom cmdlets - Added comment on StorageAccounts_Update remove-operation directive
- Fix identity parameter detection in Update-AzFunctionApp to use PSBoundParameters.ContainsKey instead of truthiness check, correctly handling -UserAssignedIdentity @() empty array case - Remove duplicate -Name parameter in ValidateFunctionAppNameAvailability to prevent runtime binding error (Name already in PSBoundParameters) - Add [Parameter(DontShow)] and [SwitchParameter] type to param in New-AzFunctionApp to hide it from public help - Update help example to use -EnableSystemAssignedIdentity:False instead of 0 for Boolean parameter clarity - Restore module/assembly versions to 4.3.1 to match upstream/main - Remove obsolete custom/Api20231201/ files (superseded by custom/api/Support/)
…igration - Fix stale v3 namespace reference: Models.Api20190401.BlobContainer to Models.BlobContainer in New-AzFunctionApp WhatIf path - Re-record all test recordings against live Azure (78 passed, 0 failed) - Sanitize recordings (secrets replaced with placeholders) - All tests validated in Live mode (98 passed, 0 failed, 18 skipped) including LiveOnly-tagged ACA and Flex Consumption tests
…ex test comment - Fix typo in Update-AzFunctionApp.ps1 comment: 'intenal' -> 'internal', 'process' -> 'processed' - Expand acronyms in ChangeLog.md per Azure PS guidelines: ARM (Azure Resource Manager), SKU (stock keeping unit) - Clarify parameter types in ChangeLog: SwitchParameter for New-*, Boolean for Update-* - Update Flex Consumption test comment: removed outdated 'fail in pipeline' note since tests now work in all modes including CI playback
…y v4 migration - Replace hardcoded GetEndpointSuffix switch with dynamic StorageEndpointSuffix from Azure context (originally merged as Azure#29035) - The v4 migration regenerated from pre-Azure#29035 code, inadvertently reverting the cloud portability fix [Azure#29034]
- Add null check for Get-AzContext and context.Environment before accessing StorageEndpointSuffix, preventing null reference exceptions when no Azure session is active
- Handle combined 'SystemAssigned,UserAssigned' identity type in fallback logic using -match instead of exact string comparison - Fix help example: use -EnableSystemAssignedIdentity \True instead of 1 - Update test assertion for combined identity to use -Match pattern - Add ChangeLog entry for combined identity fallback fix
- Restore [PreviewMessage()] BC announcement attributes to all 14 custom cmdlet files. These were lost when the v4 migration commit overwrote the files with regenerated code from pre-Azure#29139 base. - Attributes announce breaking changes in Az v16.0.0 (May 2026) per the BC announcement PR Azure#29139
- Re-recorded all test recordings after adding PreviewMessage BC attributes, combined identity fallback fix, help example fix, cloud portability fix, and null-safety fix - Live tests: 98 passed, 0 failed, 18 skipped - Record tests: 78 passed, 0 failed, 18 skipped - Recordings sanitized (secrets replaced with placeholders)
…y and fix typo - Change [ValidateNotNullOrEmpty()] to [ValidateNotNull()] on -UserAssignedIdentity parameter in Update-AzFunctionApp so empty array @() triggers custom UserAssignedIdentityRequired error instead of generic parameter binding error - Fix typo in test: 'expetedErrorId' -> 'expectedErrorId'
- Add breaking change exception entries for all Az.Functions cmdlets affected by the v3-to-v4 migration (identity parameter changes, output type changes, parameter set changes) - Add example issue exceptions for Update-AzFunctionApp -EnableSystemAssignedIdentity:false syntax - Co-authored-by: JunKai-v <v-juphang@microsoft.com>
- Re-add -Tag 'LiveOnly' to Flex Consumption tests because New-AzFunctionApp calls Get-AzFunctionAppFlexConsumptionRuntime which requires SubscriptionId from Azure context. In CI playback there is no Azure context, causing 'Cannot bind argument to parameter SubscriptionId because it is null' errors. - Updated comment explaining the root cause
… syntax - Remove duplicate line in ExampleIssues.csv (lines 2 and 3 were identical) - Change -EnableSystemAssignedIdentity:\False to -EnableSystemAssignedIdentity \False (space-separated) in Update-AzFunctionApp example to avoid triggering Unassigned_Parameter static analysis rule
- Regenerated docs, help, AssemblyInfo, generate-info, sln, psd1 after rebase on upstream/main (v4.3.2)
- Validate each entry in -UserAssignedIdentity array is non-null and
non-whitespace in both New-AzFunctionApp and Update-AzFunctionApp
- Throws UserAssignedIdentityRequired error for invalid entries like @('')
instead of letting them pass through to build invalid identity maps
e34c832 to
be80c19
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
This PR migrates the Az.Functions module from AutoRest PowerShell v3 to v4, replacing #29111 with additional bug fixes, updated test recordings, and refreshed function app stacks.
Breaking Changes
Identity Parameter Changes
-IdentityType->-EnableSystemAssignedIdentity: SwitchParameter inNew-AzFunctionApp, Boolean inUpdate-AzFunctionApp-IdentityID->-UserAssignedIdentity: Renamed. Accepts sameString[]of user-assigned identity resource IDsOutput Type Changes
IdentityType) now returnSystem.Stringinstead of enum objectsIdentityUserAssignedIdentity) now returnList<T>instead of arrays$app.IdentityUserAssignedIdentity.AdditionalPropertiesBug Fixes
Update-AzFunctionAppto handle"SystemAssigned,UserAssigned"stringStorageEndpointSuffixwith null-safety)Models.Api20190401.BlobContainerinNew-AzFunctionAppWhatIf pathUpdate-AzFunctionAppfor Flex Consumption and Container App plansBreaking Change Announcement
[PreviewMessage()]attributes and README directives from [BC] Functions Breaking Change Announcement #29139Test & Stack Updates
functionAppStacks.jsonwith Node 24, Python 3.14, Java 25Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.