azure-powershell
azure-powershell copied to clipboard
Introduce Site Config configuration, especially for Pre-Warmed Instances and Always Ready settings (minimumElasticInstanceCount)
Description
Customers that want to configure the Always Ready and Pre-Warmed Instances settings of their Premium function apps using this PowerShell module have to currently configure it using the Get-AzResource and Set-AzResource approach as currently documented here.
It would be cleaner for customers to be able to get and set this minimumElasticInstanceCount and PreWarmedInstanceCount site config settings using this Az.Functions module instead. It looks like minimumElasticInstanceCount was introduced as part of the 2020-12-01 rest spec version and is also in the 2022-03-01 version. This Az.Functions module is currently using the 2019-08-01 spec version. So for Always Ready (minimumElasticInstanceCount) and Pre-Warmed Instances (PreWarmedInstanceCount) to work the rest spec version used by this Az.Functions module would need to be updated, with a likely introduction of a breaking change.
Expected something like the following.
Always Ready:
PS> $appconfig = Get-AzFunctionAppConfig -ResourceGroupName <RG name> -Name <function app name>
PS> $appconfig.MinimumElasticInstanceCount = <desired_always_ready_count>
PS> $appconfig | Set-AzFunctionAppConfig -Force
Pre-Warmed Instances:
PS> $appconfig = Get-AzFunctionAppConfig -ResourceGroupName <RG name> -Name <function app name>
PS> $appconfig.PreWarmedInstanceCount = <desired_prewarmed_count>
PS> $appconfig | Set-AzFunctionAppConfig -Force
Or an alternative approach using Get-AzFunctionApp and Set-AzFunctionApp if it makes more sense so not to introduce a new command.
Issue script & Debug output
N/A
Environment data
Name Value
---- -----
PSVersion 5.1.22000.653
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22000.653
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
4.0.3 Az.Functions
Error output
No response
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably, @fabiocav.
Issue Details
Description
Customers that want to configure the Always Ready and Pre-Warmed Instances settings of their Premium function apps using this PowerShell module have to currently configure it using the Get-AzResource and Set-AzResource approach as currently documented here.
It would be cleaner for customers to be able to get and set this minimumElasticInstanceCount and PreWarmedInstanceCount site config settings using this Az.Functions module instead. It looks like minimumElasticInstanceCount was introduced as part of the 2020-12-01 rest spec version and is also in the 2022-03-01 version. This Az.Functions module is currently using the 2019-08-01 spec version. So for Always Ready (minimumElasticInstanceCount) and Pre-Warmed Instances (PreWarmedInstanceCount) to work the rest spec version used by this Az.Functions module would need to be updated, with a likely introduction of a breaking change.
Expected something like the following.
Always Ready:
PS> $appconfig = Get-AzFunctionAppConfig -ResourceGroupName <RG name> -Name <function app name>
PS> $appconfig.MinimumElasticInstanceCount = <desired_always_ready_count>
PS> $appconfig | Set-AzFunctionAppConfig -Force
Pre-Warmed Instances:
PS> $appconfig = Get-AzFunctionAppConfig -ResourceGroupName <RG name> -Name <function app name>
PS> $appconfig.PreWarmedInstanceCount = <desired_prewarmed_count>
PS> $appconfig | Set-AzFunctionAppConfig -Force
Or an alternative approach using Get-AzFunctionApp and Set-AzFunctionApp if it makes more sense so not to introduce a new command.
Issue script & Debug output
N/A
Environment data
Name Value
---- -----
PSVersion 5.1.22000.653
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22000.653
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
4.0.3 Az.Functions
Error output
No response
| Author: | nzthiago |
|---|---|
| Assignees: | Francisco-Gamino |
| Labels: |
|
| Milestone: | - |
The next breaking change release will take place in May 2023 if we decide to fix this issue.
Hello @panchagnula / @StrawnSC -- Do you plan to support this in the Az CLI?
Hello,
If it help, i would like to have this functionallity in the next planned version as well.
Thanks.