diff --git a/src/Functions/Az.Functions.format.ps1xml b/src/Functions/Az.Functions.format.ps1xml
index e61d1ef2d495..4b0456aa9cad 100644
--- a/src/Functions/Az.Functions.format.ps1xml
+++ b/src/Functions/Az.Functions.format.ps1xml
@@ -68,6 +68,9 @@
+
+
+
@@ -234,6 +237,9 @@
HostingEnvironmentName
+
+ Id1
+ ImmutabilityPolicyName
@@ -542,9 +548,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.BlobServiceProperties1
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.BlobServicePropertiesAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.BlobServiceProperties1
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.BlobServicePropertiesAutoGenerated
@@ -852,9 +858,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.Dimension
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.DimensionAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.Dimension
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.DimensionAutoGenerated
@@ -1538,9 +1544,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.MetricSpecification
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.MetricSpecificationAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.MetricSpecification
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.MetricSpecificationAutoGenerated
@@ -1630,9 +1636,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.OperationAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.OperationAutoGenerated
@@ -2430,9 +2436,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.Usage
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.UsageAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.Usage
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190401.UsageAutoGenerated
@@ -2560,9 +2566,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.Identity
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.IdentityAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.Identity
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.IdentityAutoGenerated
@@ -2650,9 +2656,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationAutoGenerated2
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationAutoGenerated2
@@ -2672,9 +2678,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationDisplayAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationDisplayAutoGenerated
@@ -2712,9 +2718,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationListResultAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20181130.OperationListResultAutoGenerated
@@ -3138,9 +3144,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20150501.ComponentPurgeBodyFilters1
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20150501.ComponentPurgeBodyFilters
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20150501.ComponentPurgeBodyFilters1
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20150501.ComponentPurgeBodyFilters
@@ -3362,9 +3368,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api10.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api10.ResourceAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api10.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api10.ResourceAutoGenerated
@@ -8270,10 +8276,10 @@
-
+
-
+
@@ -8286,10 +8292,10 @@
DisplayName
- Name
+ InternalName
- InternalName
+ NameToBeExportedForShoebox
@@ -13411,32 +13417,32 @@
-
+
-
+
-
+
-
+
- Name
+ Kind
- Type
+ Location
- Kind
+ Name
- Location
+ Type
@@ -13647,26 +13653,14 @@
-
-
-
-
-
-
-
+
- PrimaryAggregationType
-
-
- ResourceUri
-
-
- Unit
+ Item
@@ -13681,14 +13675,26 @@
-
+
+
+
+
+
+
+
- Item
+ PrimaryAggregationType
+
+
+ ResourceUri
+
+
+ Unit
diff --git a/src/Functions/Az.Functions.psd1 b/src/Functions/Az.Functions.psd1
index 66f714777632..00860635cf9d 100644
--- a/src/Functions/Az.Functions.psd1
+++ b/src/Functions/Az.Functions.psd1
@@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
-# Generated on: 9/15/2020
+# Generated on: 10/19/2020
#
@{
@@ -12,7 +12,7 @@
RootModule = './Az.Functions.psm1'
# Version number of this module.
-ModuleVersion = '1.0.2'
+ModuleVersion = '2.0.0'
# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
@@ -47,7 +47,7 @@ PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
-# CLRVersion = ''
+# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
@@ -56,16 +56,16 @@ DotNetFrameworkVersion = '4.7.2'
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '1.9.5'; })
# Assemblies that must be loaded prior to importing this module
-RequiredAssemblies = './bin/Az.Functions.private.dll'
+RequiredAssemblies = 'bin\Az.Functions.private.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
-ScriptsToProcess = './custom/HelperFunctions.ps1'
+ScriptsToProcess = 'custom\HelperFunctions.ps1'
# Type files (.ps1xml) to be loaded when importing this module
-TypesToProcess = './custom/Functions.types.ps1xml'
+TypesToProcess = 'custom\Functions.types.ps1xml'
# Format files (.ps1xml) to be loaded when importing this module
-FormatsToProcess = './Az.Functions.format.ps1xml', './custom/Functions.format.ps1xml'
+FormatsToProcess = 'Az.Functions.format.ps1xml', 'custom\Functions.format.ps1xml'
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
@@ -115,8 +115,7 @@ PrivateData = @{
# IconUri = ''
# ReleaseNotes of this module
- ReleaseNotes = '* Removed the ability to create v2 Functions in regions that do not support it.
-* Deprecated PowerShell 6.2. Added a warning for when a user creates a PowerShell 6.2 function app that advises them to create a PowerShell 7.0 function app instead.'
+ ReleaseNotes = 'Implemented Functions Stacks API which describes what runtimes and runtime versions are available for function app creation'
# Prerelease string of this module
# Prerelease = ''
diff --git a/src/Functions/Az.Functions.psm1 b/src/Functions/Az.Functions.psm1
index b49fb1424daf..c02c76155b8e 100644
--- a/src/Functions/Az.Functions.psm1
+++ b/src/Functions/Az.Functions.psm1
@@ -24,17 +24,17 @@
}
}
if(-not $accountsModule) {
- $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.7.4' } | Measure-Object).Count -gt 0
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
if($hasAdequateVersion) {
- $accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.7.4 -Scope Global -PassThru
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
}
}
}
if(-not $accountsModule) {
- Write-Error "`nThis module requires $accountsName version 1.7.4 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
- } elseif (($accountsModule.Version -lt [System.Version]'1.7.4') -and (-not $localAccounts)) {
- Write-Error "`nThis module requires $accountsName version 1.7.4 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
+ Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
}
Write-Information "Loaded Module '$($accountsModule.Name)'"
diff --git a/src/Functions/ChangeLog.md b/src/Functions/ChangeLog.md
index 05426a65bc69..0bc280e05dce 100644
--- a/src/Functions/ChangeLog.md
+++ b/src/Functions/ChangeLog.md
@@ -19,6 +19,10 @@
-->
## Upcoming Release
+## Version 2.0.0
+* Implemented Functions Stacks API which describes what runtimes and runtime versions are available for function app creation
+* Bug fixing
+
## Version 1.0.2
* Removed the ability to create v2 Functions in regions that do not support it.
* Deprecated PowerShell 6.2. Added a warning for when a user creates a PowerShell 6.2 function app that advises them to create a PowerShell 7.0 function app instead.
diff --git a/src/Functions/check-dependencies.ps1 b/src/Functions/check-dependencies.ps1
index 23ee92268fde..513c52ca2fb5 100644
--- a/src/Functions/check-dependencies.ps1
+++ b/src/Functions/check-dependencies.ps1
@@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) {
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
}
-DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.7.4'
+DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1'
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
$tools = Join-Path $PSScriptRoot 'tools'
diff --git a/src/Functions/custom/FunctionsStack/LinuxFunctionsStacks.json b/src/Functions/custom/FunctionsStack/LinuxFunctionsStacks.json
index 63f7737a0b1c..721683e0d855 100644
--- a/src/Functions/custom/FunctionsStack/LinuxFunctionsStacks.json
+++ b/src/Functions/custom/FunctionsStack/LinuxFunctionsStacks.json
@@ -11,19 +11,39 @@
"majorVersions": [
{
"displayVersion": "3.1",
+ "runtimeVersion": "dotnet|3.1",
"supportedFunctionsExtensionVersions": [
"~3"
],
- "runtimeVersion": "dotnet|3.1",
- "isDefault": false,
+ "isDefault": true,
"minorVersions": [],
"applicationInsights": true,
"appSettingsDictionary": {
- "FUNCTIONS_WORKER_RUNTIME": "dotnet",
+ "FUNCTIONS_WORKER_RUNTIME": "dotnet"
+ },
+ "siteConfigPropertiesDictionary": {
+ "use32BitWorkerProcess": false,
"linuxFxVersion": "dotnet|3.1"
},
+ "isPreview": false,
+ "isDeprecated": false,
+ "isHidden": false
+ },
+ {
+ "displayVersion": "2.2",
+ "runtimeVersion": "dotnet|2.2",
+ "supportedFunctionsExtensionVersions": [
+ "~2"
+ ],
+ "isDefault": true,
+ "minorVersions": [],
+ "applicationInsights": true,
+ "appSettingsDictionary": {
+ "FUNCTIONS_WORKER_RUNTIME": "dotnet"
+ },
"siteConfigPropertiesDictionary": {
- "Use32BitWorkerProcess": false
+ "use32BitWorkerProcess": false,
+ "linuxFxVersion": "dotnet|2.2"
},
"isPreview": false,
"isDeprecated": false,
@@ -43,6 +63,26 @@
"display": "Node.js",
"dependency": null,
"majorVersions": [
+ {
+ "displayVersion": "14",
+ "runtimeVersion": "Node|14",
+ "supportedFunctionsExtensionVersions": [
+ "~3"
+ ],
+ "isDefault": true,
+ "minorVersions": [],
+ "applicationInsights": true,
+ "appSettingsDictionary": {
+ "FUNCTIONS_WORKER_RUNTIME": "node"
+ },
+ "siteConfigPropertiesDictionary": {
+ "use32BitWorkerProcess": false,
+ "linuxFxVersion": "Node|14"
+ },
+ "isPreview": true,
+ "isDeprecated": false,
+ "isHidden": true
+ },
{
"displayVersion": "12",
"runtimeVersion": "Node|12",
@@ -56,7 +96,7 @@
"FUNCTIONS_WORKER_RUNTIME": "node"
},
"siteConfigPropertiesDictionary": {
- "Use32BitWorkerProcess": false,
+ "use32BitWorkerProcess": false,
"linuxFxVersion": "Node|12"
},
"isPreview": false,
@@ -70,14 +110,14 @@
"~2",
"~3"
],
- "isDefault": false,
+ "isDefault": true,
"minorVersions": [],
"applicationInsights": true,
"appSettingsDictionary": {
"FUNCTIONS_WORKER_RUNTIME": "node"
},
"siteConfigPropertiesDictionary": {
- "Use32BitWorkerProcess": false,
+ "use32BitWorkerProcess": false,
"linuxFxVersion": "Node|10"
},
"isPreview": false,
@@ -112,7 +152,7 @@
"FUNCTIONS_WORKER_RUNTIME": "python"
},
"siteConfigPropertiesDictionary": {
- "Use32BitWorkerProcess": false,
+ "use32BitWorkerProcess": false,
"linuxFxVersion": "Python|3.6"
},
"isPreview": false,
@@ -133,7 +173,7 @@
"FUNCTIONS_WORKER_RUNTIME": "python"
},
"siteConfigPropertiesDictionary": {
- "Use32BitWorkerProcess": false,
+ "use32BitWorkerProcess": false,
"linuxFxVersion": "Python|3.7"
},
"isPreview": false,
@@ -146,14 +186,14 @@
"supportedFunctionsExtensionVersions": [
"~3"
],
- "isDefault": false,
+ "isDefault": true,
"minorVersions": [],
"applicationInsights": true,
"appSettingsDictionary": {
"FUNCTIONS_WORKER_RUNTIME": "python"
},
"siteConfigPropertiesDictionary": {
- "Use32BitWorkerProcess": false,
+ "use32BitWorkerProcess": false,
"linuxFxVersion": "Python|3.8"
},
"isPreview": false,
@@ -187,7 +227,7 @@
"FUNCTIONS_WORKER_RUNTIME": "java"
},
"siteConfigPropertiesDictionary": {
- "Use32BitWorkerProcess": false,
+ "use32BitWorkerProcess": false,
"linuxFxVersion": "Java|8"
},
"isPreview": false,
@@ -200,14 +240,14 @@
"supportedFunctionsExtensionVersions": [
"~3"
],
- "isDefault": true,
+ "isDefault": false,
"minorVersions": [],
"applicationInsights": true,
"appSettingsDictionary": {
"FUNCTIONS_WORKER_RUNTIME": "java"
},
"siteConfigPropertiesDictionary": {
- "Use32BitWorkerProcess": false,
+ "use32BitWorkerProcess": false,
"linuxFxVersion": "Java|11"
},
"isPreview": false,
diff --git a/src/Functions/custom/FunctionsStack/WindowsFunctionsStacks.json b/src/Functions/custom/FunctionsStack/WindowsFunctionsStacks.json
index 14727a048b2f..3d9b56c8fc3f 100644
--- a/src/Functions/custom/FunctionsStack/WindowsFunctionsStacks.json
+++ b/src/Functions/custom/FunctionsStack/WindowsFunctionsStacks.json
@@ -11,7 +11,7 @@
"majorVersions": [
{
"displayVersion": "3.1",
- "runtimeVersion": null,
+ "runtimeVersion": "3.1",
"supportedFunctionsExtensionVersions": [
"~3"
],
@@ -21,7 +21,28 @@
"appSettingsDictionary": {
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
},
- "siteConfigPropertiesDictionary": {},
+ "siteConfigPropertiesDictionary": {
+ "use32BitWorkerProcess": true
+ },
+ "isPreview": false,
+ "isDeprecated": false,
+ "isHidden": false
+ },
+ {
+ "displayVersion": "2.2",
+ "runtimeVersion": "2.2",
+ "supportedFunctionsExtensionVersions": [
+ "~2"
+ ],
+ "isDefault": true,
+ "minorVersions": [],
+ "applicationInsights": true,
+ "appSettingsDictionary": {
+ "FUNCTIONS_WORKER_RUNTIME": "dotnet"
+ },
+ "siteConfigPropertiesDictionary": {
+ "use32BitWorkerProcess": true
+ },
"isPreview": false,
"isDeprecated": false,
"isHidden": false
@@ -40,6 +61,26 @@
"display": "Node.js",
"dependency": null,
"majorVersions": [
+ {
+ "displayVersion": "14",
+ "runtimeVersion": "~14",
+ "supportedFunctionsExtensionVersions": [
+ "~3"
+ ],
+ "isDefault": true,
+ "minorVersions": [],
+ "applicationInsights": true,
+ "appSettingsDictionary": {
+ "FUNCTIONS_WORKER_RUNTIME": "node",
+ "WEBSITE_NODE_DEFAULT_VERSION": "~14"
+ },
+ "siteConfigPropertiesDictionary": {
+ "use32BitWorkerProcess": true
+ },
+ "isPreview": true,
+ "isDeprecated": false,
+ "isHidden": true
+ },
{
"displayVersion": "12",
"runtimeVersion": "~12",
@@ -53,7 +94,9 @@
"FUNCTIONS_WORKER_RUNTIME": "node",
"WEBSITE_NODE_DEFAULT_VERSION": "~12"
},
- "siteConfigPropertiesDictionary": {},
+ "siteConfigPropertiesDictionary": {
+ "use32BitWorkerProcess": true
+ },
"isPreview": false,
"isDeprecated": false,
"isHidden": false
@@ -65,14 +108,16 @@
"~2",
"~3"
],
- "isDefault": false,
+ "isDefault": true,
"minorVersions": [],
"applicationInsights": true,
"appSettingsDictionary": {
"FUNCTIONS_WORKER_RUNTIME": "node",
"WEBSITE_NODE_DEFAULT_VERSION": "~10"
},
- "siteConfigPropertiesDictionary": {},
+ "siteConfigPropertiesDictionary": {
+ "use32BitWorkerProcess": true
+ },
"isPreview": false,
"isDeprecated": false,
"isHidden": false
@@ -81,7 +126,6 @@
"displayVersion": "8",
"runtimeVersion": "~8",
"supportedFunctionsExtensionVersions": [
- "~1",
"~2"
],
"isDefault": false,
@@ -91,7 +135,9 @@
"FUNCTIONS_WORKER_RUNTIME": "node",
"WEBSITE_NODE_DEFAULT_VERSION": "~8"
},
- "siteConfigPropertiesDictionary": {},
+ "siteConfigPropertiesDictionary": {
+ "use32BitWorkerProcess": true
+ },
"isPreview": false,
"isDeprecated": false,
"isHidden": false
@@ -123,7 +169,10 @@
"appSettingsDictionary": {
"FUNCTIONS_WORKER_RUNTIME": "java"
},
- "siteConfigPropertiesDictionary": {},
+ "siteConfigPropertiesDictionary": {
+ "javaVersion": "1.8",
+ "use32BitWorkerProcess": true
+ },
"isPreview": false,
"isDeprecated": false,
"isHidden": false
@@ -134,13 +183,16 @@
"supportedFunctionsExtensionVersions": [
"~3"
],
- "isDefault": true,
+ "isDefault": false,
"minorVersions": [],
"applicationInsights": true,
"appSettingsDictionary": {
"FUNCTIONS_WORKER_RUNTIME": "java"
},
- "siteConfigPropertiesDictionary": {},
+ "siteConfigPropertiesDictionary": {
+ "javaVersion": "11",
+ "use32BitWorkerProcess": true
+ },
"isPreview": false,
"isDeprecated": false,
"isHidden": false
@@ -173,10 +225,11 @@
"FUNCTIONS_WORKER_RUNTIME": "powershell"
},
"siteConfigPropertiesDictionary": {
- "PowerShellVersion": "~6"
+ "powerShellVersion": "~6",
+ "use32BitWorkerProcess": true
},
"isPreview": false,
- "isDeprecated": false,
+ "isDeprecated": true,
"isHidden": false
},
{
@@ -192,7 +245,8 @@
"FUNCTIONS_WORKER_RUNTIME": "powershell"
},
"siteConfigPropertiesDictionary": {
- "PowerShellVersion": "~7"
+ "powerShellVersion": "~7",
+ "use32BitWorkerProcess": true
},
"isPreview": false,
"isDeprecated": false,
diff --git a/src/Functions/custom/Get-AzFunctionApp.ps1 b/src/Functions/custom/Get-AzFunctionApp.ps1
index ac6333222f20..cafa4122d01e 100644
--- a/src/Functions/custom/Get-AzFunctionApp.ps1
+++ b/src/Functions/custom/Get-AzFunctionApp.ps1
@@ -13,8 +13,8 @@ function Get-AzFunctionApp {
[System.String[]]
${SubscriptionId},
- [Parameter(Mandatory=$true, ParameterSetName="ByName", HelpMessage='The name of the resource group.')]
- [Parameter(ParameterSetName="ByResourceGroupName")]
+ [Parameter(Mandatory=$true, ParameterSetName="ByResourceGroupName", HelpMessage='The name of the resource group.')]
+ [Parameter(Mandatory=$true, ParameterSetName="ByName")]
[Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Path')]
[ValidateNotNullOrEmpty()]
[System.String]
@@ -32,7 +32,7 @@ function Get-AzFunctionApp {
[System.String]
${Location},
- [Parameter(Mandatory=$false, HelpMessage='Use to specify whether to include deployment slots in results.')]
+ [Parameter(Mandatory=$false, ParameterSetName="ByResourceGroupName", HelpMessage='Use to specify whether to include deployment slots in results.')]
[System.Management.Automation.SwitchParameter]
${IncludeSlot},
diff --git a/src/Functions/custom/HelperFunctions.ps1 b/src/Functions/custom/HelperFunctions.ps1
index 73d33163836e..65f37c54ec8c 100644
--- a/src/Functions/custom/HelperFunctions.ps1
+++ b/src/Functions/custom/HelperFunctions.ps1
@@ -3,39 +3,6 @@ $constants = @{}
$constants["AllowedStorageTypes"] = @('Standard_GRS', 'Standard_RAGRS', 'Standard_LRS', 'Standard_ZRS', 'Premium_LRS')
$constants["RequiredStorageEndpoints"] = @('PrimaryEndpointFile', 'PrimaryEndpointQueue', 'PrimaryEndpointTable')
$constants["DefaultFunctionsVersion"] = '3'
-$constants["NodeDefaultVersion"] = @{
- '2' = '~10'
- '3' = '~12'
-}
-$constants["RuntimeToDefaultVersion"] = @{
- 'Linux' = @{
- '2'= @{
- 'Node' = '10'
- 'DotNet'= '2'
- 'Python' = '3.7'
- }
- '3' = @{
- 'Node' = '10'
- 'DotNet' = '3'
- 'Python' = '3.7'
- 'Java' = '8'
- }
- }
- 'Windows' = @{
- '2'= @{
- 'Node' = '10'
- 'DotNet'= '2'
- 'PowerShell' = '6.2'
- 'Java' = '8'
- }
- '3' = @{
- 'Node' = '10'
- 'DotNet' = '3'
- 'PowerShell' = '7.0'
- 'Java' = '8'
- }
- }
-}
$constants["RuntimeToFormattedName"] = @{
'node' = 'Node'
'dotnet' = 'DotNet'
@@ -50,16 +17,6 @@ $constants["RuntimeToDefaultOSType"] = @{
'PowerShell' = 'Windows'
'Python' = 'Linux'
}
-
-# These are used for tab completion for the RuntimeVersion parameter in New-AzFunctionApp.
-$constants["RuntimeVersions"] = @{
- 'DotNet'= @('2', '3')
- 'Node' = @('8', '10', '12')
- 'Java' = @('8', '11')
- 'PowerShell' = @('7.0')
- 'Python' = @('3.6', '3.7', '3.8')
-}
-
$constants["ReservedFunctionAppSettingNames"] = @(
'FUNCTIONS_WORKER_RUNTIME'
'DOCKER_CUSTOM_IMAGE_NAME'
@@ -77,14 +34,7 @@ $constants["ReservedFunctionAppSettingNames"] = @(
'WEBSITE_CONTENTSHARE'
'APPINSIGHTS_INSTRUMENTATIONKEY'
)
-
-$constants["DotNetRuntimeVersionToDotNetLinuxFxVersion"] = @{
- '2' = '2.2'
- '3' = '3.1'
-}
-
$constants["SupportedFunctionsVersion"] = @('2', '3')
-
$constants["FunctionsNoV2Version"] = @(
"USNat West"
"USNat East"
@@ -96,75 +46,10 @@ foreach ($variableName in $constants.Keys)
{
if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
{
- Set-Variable $variableName -value $constants[$variableName]
+ Set-Variable $variableName -value $constants[$variableName] -option ReadOnly
}
}
-function GetDefaultRuntimeVersion
-{
- param
- (
- [Parameter(Mandatory=$true)]
- [ValidateNotNullOrEmpty()]
- [System.String]
- $FunctionsVersion,
-
- [Parameter(Mandatory=$true)]
- [ValidateNotNullOrEmpty()]
- [System.String]
- $Runtime,
-
- [Parameter(Mandatory=$true)]
- [ValidateNotNullOrEmpty()]
- [System.String]
- $OSType
- )
-
- if ($Runtime -eq "DotNet")
- {
- return $FunctionsVersion
- }
-
- $defaultVersion = $RuntimeToDefaultVersion[$OSType][$FunctionsVersion][$Runtime]
-
- if (-not $defaultVersion)
- {
- $errorMessage = "$Runtime is not supported in Functions version $FunctionsVersion for $OSType."
- $exception = [System.InvalidOperationException]::New($errorMessage)
- ThrowTerminatingError -ErrorId "RuntimeNotSuported" `
- -ErrorMessage $errorMessage `
- -ErrorCategory ([System.Management.Automation.ErrorCategory]::InvalidOperation) `
- -Exception $exception
- }
-
- return $defaultVersion
-}
-
-function GetDefaultOSType
-{
- param
- (
- [Parameter(Mandatory=$true)]
- [ValidateNotNullOrEmpty()]
- [System.String]
- $Runtime
- )
-
- $defaultOSType = $RuntimeToDefaultOSType[$Runtime]
-
- if (-not $defaultOSType)
- {
- $errorMessage = "Failed to get default OS type for $Runtime."
- $exception = [System.InvalidOperationException]::New($errorMessage)
- ThrowTerminatingError -ErrorId "FailedToGetDefaultOSType" `
- -ErrorMessage $errorMessage `
- -ErrorCategory ([System.Management.Automation.ErrorCategory]::InvalidOperation) `
- -Exception $exception
- }
-
- return $defaultOSType
-}
-
function GetConnectionString
{
param
@@ -492,6 +377,11 @@ function AddFunctionAppSettings
$App.AppServicePlan = ($App.ServerFarmId -split "/")[-1]
$App.OSType = if ($App.kind.ToLower().Contains("linux")){ "Linux" } else { "Windows" }
+
+ if ($App.Type -eq "Microsoft.Web/sites/slots")
+ {
+ return $App
+ }
$currentSubscription = $null
$resetDefaultSubscription = $false
@@ -883,71 +773,6 @@ function ThrowTerminatingError
throw $errorRecord
}
-function GetFunctionAppDefaultNodeVersion
-{
- param
- (
- [System.String]
- $FunctionsVersion,
-
- [System.String]
- $Runtime,
-
- [System.String]
- $RuntimeVersion
- )
-
- if ((-not $Runtime) -or ($Runtime -ne "node"))
- {
- return $NodeDefaultVersion[$FunctionsVersion]
- }
-
- if ($RuntimeVersion)
- {
- return "~$RuntimeVersion"
- }
-
- return $NodeDefaultVersion[$FunctionsVersion]
-}
-
-function GetLinuxFxVersion
-{
- param
- (
- [Parameter(Mandatory=$true)]
- [ValidateNotNullOrEmpty()]
- [System.String]
- $FunctionsVersion,
-
- [Parameter(Mandatory=$true)]
- [ValidateNotNullOrEmpty()]
- [System.String]
- $Runtime,
-
- [Parameter(Mandatory=$true)]
- [ValidateNotNullOrEmpty()]
- [System.String]
- $OSType,
-
- [System.String]
- $RuntimeVersion
- )
-
- if (-not $RuntimeVersion)
- {
- $RuntimeVersion = $RuntimeToDefaultVersion[$OSType][$FunctionsVersion][$Runtime]
- }
-
- if ($Runtime -eq "DotNet")
- {
- $RuntimeVersion = $DotNetRuntimeVersionToDotNetLinuxFxVersion[$FunctionsVersion]
- }
-
- $runtimeName = $Runtime.ToUpper()
-
- return "$runtimeName|$RuntimeVersion"
-}
-
function GetErrorMessage
{
param
@@ -1048,23 +873,45 @@ function ValidateFunctionsV2NotAvailableLocation
}
}
-function ValidateRuntimeAndRuntimeVersion
+function GetDefaultOSType
{
param
(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[System.String]
- $FunctionsVersion,
+ $Runtime
+ )
+
+ $defaultOSType = $RuntimeToDefaultOSType[$Runtime]
+
+ if (-not $defaultOSType)
+ {
+ # The specified runtime did not match, error out
+ $runtimeOptions = FormatListToString -List @($RuntimeToDefaultOSType.Keys | Sort-Object)
+ $errorMessage = "Runtime '$Runtime' is not supported. Currently supported runtimes: " + $runtimeOptions + "."
+ ThrowRuntimeNotSupportedException -Message $errorMessage -ErrorId "RuntimeNotSupported"
+ }
+ return $defaultOSType
+}
+
+function GetRuntimeJsonDefinition
+{
+ param
+ (
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[System.String]
- $Runtime,
+ $FunctionsVersion,
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[System.String]
+ $Runtime,
+
+ [Parameter(Mandatory=$false)]
+ [System.String]
$RuntimeVersion,
[Parameter(Mandatory=$true)]
@@ -1073,59 +920,131 @@ function ValidateRuntimeAndRuntimeVersion
$OSType
)
- if ($Runtime -eq "DotNet")
+ $functionsExtensionVersion = "~$FunctionsVersion"
+ $supportedRuntimes = GetSupportedRuntimes -OSType $OSType
+
+ if (-not $supportedRuntimes.ContainsKey($Runtime))
{
- return
+ $runtimeOptions = FormatListToString -List @($supportedRuntimes.Keys | ForEach-Object { $RuntimeToFormattedName[$_]} | Sort-Object)
+ $errorMessage = "Runtime '$Runtime' in Functions version '$FunctionsVersion' on '$OSType' is not supported. Currently supported runtimes: " + $runtimeOptions + "."
+
+ ThrowRuntimeNotSupportedException -Message $errorMessage -ErrorId "RuntimeNotSupported"
}
- $runtimeVersionIsSupported = $false
- $supportedRuntimes = GetSupportedRuntimes -OSType $OSType
-
- foreach ($majorVersion in $supportedRuntimes[$Runtime].MajorVersions)
+ # If runtime version is not provided, iterate through the SupportedRuntimes to get the default version
+ # based the function extension version, os type and runtime.
+ if (-not $RuntimeVersion)
{
- if ($majorVersion.DisplayVersion -eq $RuntimeVersion)
+ $latestVersion = [Version]::new("0.0")
+ $defaultVersionFound = $false
+ $versionIsInt = $false
+
+ foreach ($version in $supportedRuntimes[$Runtime].MajorVersions.Keys)
{
- # SupportedFunctionsExtensionVersions[0] is of the form '~int'
- # Add '~' to the begining of FunctionsVersion
- if ($majorVersion.SupportedFunctionsExtensionVersions -contains "~$FunctionsVersion")
+ $majorVersion = $supportedRuntimes[$Runtime].MajorVersions[$version]
+
+ if ($majorVersion.IsDefault -and ($majorVersion.SupportedFunctionsExtensionVersions -contains $functionsExtensionVersion))
{
- $runtimeVersionIsSupported = $true
- break
+ if (-not $version.Contains("."))
+ {
+ $versionIsInt = $true
+ $version = $version + ".0"
+ }
+
+ $thisVersion = $null
+ [Version]::TryParse($version, [ref]$thisVersion)
+
+ if (($null -ne $thisVersion ) -and ($thisVersion -gt $latestVersion))
+ {
+ $latestVersion = $thisVersion
+ $defaultVersionFound = $true
+ }
}
}
+
+ # Error out if we could not find a default version for the given runtime, functions extension version, and os type
+ if (-not $defaultVersionFound)
+ {
+ $errorMessage = "Runtime '$Runtime' in Functions version '$FunctionsVersion' on '$OSType' is not supported."
+ ThrowRuntimeNotSupportedException -Message $errorMessage -ErrorId "RuntimeVersionNotSupported"
+ }
+
+ if ($versionIsInt)
+ {
+ $RuntimeVersion = $latestVersion.Major
+ }
+ else
+ {
+ $RuntimeVersion = $latestVersion.ToString()
+ }
+
+ Write-Verbose "RuntimeVersion not specified. Setting default runtime version for '$Runtime' to '$RuntimeVersion'." -Verbose
}
- if (-not $runtimeVersionIsSupported)
+ # Get the RuntimeJsonDefinition
+ $runtimeJsonDefinition = $supportedRuntimes[$Runtime].MajorVersions[$RuntimeVersion]
+
+ if ((-not $runtimeJsonDefinition) -or (-not ($runtimeJsonDefinition.SupportedFunctionsExtensionVersions -contains $functionsExtensionVersion)))
{
- $errorMessage = "$Runtime version $RuntimeVersion in Functions version $FunctionsVersion for $OSType is not supported."
- $errorMessage += " For supported languages, please visit 'https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions#languages'."
- $errorId = "InvalidRuntimeVersionFor" + $Runtime + "In" + $OSType
- $exception = [System.InvalidOperationException]::New($errorMessage)
- ThrowTerminatingError -ErrorId $errorId `
- -ErrorMessage $errorMessage `
- -ErrorCategory ([System.Management.Automation.ErrorCategory]::InvalidOperation) `
- -Exception $exception
+ $errorMessage = "Runtime '$Runtime' version '$RuntimeVersion' in Functions version '$FunctionsVersion' on '$OSType' is not supported."
+ $supporedVersions = @(GetSupportedRuntimeVersions -FunctionsVersion $FunctionsVersion -Runtime $Runtime -OSType $OSType)
+
+ if ($supporedVersions.Count -gt 0)
+ {
+ $runtimeVersionOptions = FormatListToString -List @($supporedVersions | Sort-Object)
+ $errorMessage += " Currently supported runtime versions for '$($Runtime)' are: $runtimeVersionOptions."
+ }
+
+ ThrowRuntimeNotSupportedException -Message $errorMessage -ErrorId "RuntimeVersionNotSupported"
+ }
+
+ if ($runtimeJsonDefinition.IsPreview)
+ {
+ # Write a verbose message to the user if the current runtime is in Preview
+ Write-Verbose "Runtime '$Runtime' version '$RuntimeVersion' is in Preview." -Verbose
}
+
+ return $runtimeJsonDefinition
}
-function GetWorkerVersion
+function ThrowRuntimeNotSupportedException
{
param
(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[System.String]
- $FunctionsVersion,
+ $Message,
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[System.String]
- $Runtime,
+ $ErrorId
+ )
+
+ $Message += [System.Environment]::NewLine
+ $Message += "For supported languages, please visit 'https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions#languages'."
+
+ $exception = [System.InvalidOperationException]::New($Message)
+ ThrowTerminatingError -ErrorId $ErrorId `
+ -ErrorMessage $Message `
+ -ErrorCategory ([System.Management.Automation.ErrorCategory]::InvalidOperation) `
+ -Exception $exception
+}
+
+function GetSupportedRuntimeVersions
+{
+ param
+ (
+ [Parameter(Mandatory=$true)]
+ [ValidateNotNullOrEmpty()]
+ [System.String]
+ $FunctionsVersion,
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[System.String]
- $RuntimeVersion,
+ $Runtime,
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
@@ -1133,30 +1052,56 @@ function GetWorkerVersion
$OSType
)
- $workerRuntimeVersion = $null
+ $functionsExtensionVersion = "~$FunctionsVersion"
$supportedRuntimes = GetSupportedRuntimes -OSType $OSType
- foreach ($majorVersion in $supportedRuntimes[$Runtime].MajorVersions)
+ $result = @()
+
+ foreach ($runtimeVersion in $supportedRuntimes[$Runtime].MajorVersions.Keys)
{
- if ($majorVersion.DisplayVersion -eq $RuntimeVersion)
+ $majorVersion = $supportedRuntimes[$Runtime].MajorVersions[$runtimeVersion]
+ if ($majorVersion.SupportedFunctionsExtensionVersions -contains $functionsExtensionVersion)
{
- $workerRuntimeVersion = $majorVersion.runtimeVersion
- break
+ $result += $runtimeVersion
}
}
- if (-not $workerRuntimeVersion)
+ return ($result | Sort-Object)
+}
+
+function FormatListToString
+{
+ param
+ (
+ [Parameter(Mandatory=$true)]
+ [System.String[]]
+ $List
+ )
+
+ if ($List.Count -eq 0)
{
- $errorMessage = "Falied to get runtime version for $Runtime $RuntimeVersion in Functions version $FunctionsVersion for $OSType."
- $errorId = "InvalidWorkerRuntimeVersionFor" + $Runtime + "In" + $OSType
- $exception = [System.InvalidOperationException]::New($errorMessage)
- ThrowTerminatingError -ErrorId $errorId `
- -ErrorMessage $errorMessage `
- -ErrorCategory ([System.Management.Automation.ErrorCategory]::InvalidOperation) `
- -Exception $exception
+ return
}
- return $workerRuntimeVersion
+ $result = ""
+
+ if ($List.Count -eq 1)
+ {
+ $result = "'" + $List[0] + "'"
+ }
+
+ else
+ {
+ for ($index = 0; $index -lt ($List.Count - 1); $index++)
+ {
+ $item = $List[$index]
+ $result += "'" + $item + "', "
+ }
+
+ $result += "'" + $List[$List.Count - 1] + "'"
+ }
+
+ return $result
}
function ValidatePlanLocation
@@ -1592,7 +1537,7 @@ function NewIdentityUserAssignedIdentity
# Set Linux and Windows supported runtimes
Class Runtime {
[string]$Name
- [MajorVersion[]]$MajorVersions
+ [hashtable]$MajorVersions
}
Class MajorVersion {
@@ -1601,10 +1546,15 @@ Class MajorVersion {
[string[]]$SupportedFunctionsExtensionVersions
[hashtable]$AppSettingsDictionary
[hashtable]$SiteConfigPropertiesDictionary
+ [bool]$IsPreview
+ [bool]$IsDeprecated
+ [bool]$IsHidden
+ [bool]$IsDefault
}
$LinuxRuntimes = @{}
$WindowsRuntimes = @{}
+$RuntimeVersions = @{}
function SetLinuxandWindowsSupportedRuntimes
{
@@ -1623,46 +1573,118 @@ function SetLinuxandWindowsSupportedRuntimes
{
$runtime = [Runtime]::new()
$runtime.name = $stack.name
+ $majorVersions = @{}
foreach ($version in $stack.properties.majorVersions)
{
+ if ([String]::IsNullOrEmpty($version.displayVersion))
+ {
+ throw "DisplayVersion cannot be null or empty for '$($runtime.name)."
+ }
+
$majorVersion = [MajorVersion]::new()
- $majorVersion.RuntimeVersion = $version.RuntimeVersion
+ # For DotNet, the runtime version is the same as FunctionsVersion, e.g., 3 for 3.1 and 2 for 2.2
+ $displayVersion = $version.displayVersion
+
+ if ($runtime.name -eq "DotNet")
+ {
+ $displayVersion = [int]$displayVersion
+ }
+
+ $majorVersion.DisplayVersion = $displayVersion
+ $majorVersion.RuntimeVersion = $version.runtimeVersion
$majorVersion.SupportedFunctionsExtensionVersions = $version.supportedFunctionsExtensionVersions
- if ($version.displayVersion)
+ # Add the optional properties if available
+ foreach ($propertyName in @("isPreview", "isDeprecated", "isHidden", "isDefault"))
{
- $majorVersion.DisplayVersion = $version.displayVersion
+ if (-not [String]::IsNullOrEmpty($version.$propertyName))
+ {
+ $majorVersion.$propertyName = $version.$propertyName
+ }
}
- if ($version.appSettingsDictionary)
+ # Skip deprecated runtimes
+ if ($majorVersion.IsDeprecated)
{
- $appSettings = @{}
+ continue
+ }
- foreach ($property in $version.appSettingsDictionary.PSObject.Properties)
- {
- $appSettings.Add($property.Name, $property.Value)
- }
+ # Skip hidden runtimes if $env:DisplayHiddenRuntimes is set to false
+ if ($majorVersion.isHidden -and (-not $env:DisplayHiddenRuntimes))
+ {
+ continue
+ }
- $majorVersion.appSettingsDictionary = $appSettings
+ # Add AppSettingsDictionary properties
+ if (-not $version.appSettingsDictionary)
+ {
+ throw "AppSettingsDictionary for $($runtime.name) $($majorVersion.DisplayVersion) cannot be null or empty"
}
- if ($version.appSettingsDictionary)
+ $appSettings = @{}
+ foreach ($property in $version.appSettingsDictionary.PSObject.Properties)
{
- $siteConfigProperties = @{}
+ $appSettings.Add($property.Name, $property.Value)
+ }
- foreach ($property in $version.siteConfigPropertiesDictionary.PSObject.Properties)
- {
- $siteConfigProperties.Add($property.Name, $property.Value)
- }
+ $majorVersion.appSettingsDictionary = $appSettings
+
+ # Add siteConfigPropertiesDictionary properties
+ if (-not $version.siteConfigPropertiesDictionary)
+ {
+ throw "SiteConfigPropertiesDictionary for $($runtime.name) $($majorVersion.DisplayVersion) cannot be null or empty"
+ }
- $majorVersion.SiteConfigPropertiesDictionary = $siteConfigProperties
+ $siteConfigProperties = @{}
+ foreach ($property in $version.siteConfigPropertiesDictionary.PSObject.Properties)
+ {
+ $siteConfigProperties.Add($property.Name, $property.Value)
}
- $runtime.MajorVersions += $majorVersion
+ $majorVersion.SiteConfigPropertiesDictionary = $siteConfigProperties
+
+ # Add the major version as a key value pair. These properties will be retrieved via $supportedRuntimes[$Runtime].MajorVersions[$RuntimeVersion]
+ $majorVersions[[string]$displayVersion] = $majorVersion
+
+ # Create a dictionary where the key is the runtime and the value is a list of runtime versions.
+ # This will be used to register the tab completer for -RuntimeVersion based on the selection of -Runtime parameter.
+ if ($RuntimeVersions.ContainsKey($runtime.name))
+ {
+ $list = $RuntimeVersions[$runtime.name]
+ }
+ else
+ {
+ $list = @()
+ }
+
+ # Sort-Object works differently when sorting strings vs numeric values.
+ # Because of this, if the runtimeVersion value contains a ".", we cast this to [double]; otherwise, we cast it to an [int].
+ # For the case when the Runtime is PowerShell, we cast the value to string. Otherwise, casting 7.0 to [double] results in 7, which is not correct for our scenario.
+ if ($runtime.name -eq "PowerShell")
+ {
+ $displayVersion = [string]$displayVersion
+ }
+ elseif (([string]$displayVersion).Contains("."))
+ {
+ $displayVersion = [double]$displayVersion
+ }
+ else
+ {
+ $displayVersion = [int]$displayVersion
+ }
+
+ if (-not $list.Contains($displayVersion))
+ {
+ $list += $displayVersion
+ $list = @($list | Sort-Object -Descending)
+ $RuntimeVersions[$runtime.name] = $list
+ }
}
+ $runtime.MajorVersions = $majorVersions
+
if ($stack.type -like "*LinuxFunctions")
{
if (-not $LinuxRuntimes.ContainsKey($runtime.name))
@@ -1694,14 +1716,14 @@ $GetRuntimeVersionCompleter = {
if ($fakeBoundParameters.ContainsKey('Runtime'))
{
- # RuntimeVersions is defined at the top of this file
+ # RuntimeVersions is defined in SetLinuxandWindowsSupportedRuntimes
$RuntimeVersions[$fakeBoundParameters.Runtime] | Where-Object {
$_ -like "$wordToComplete*"
} | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }
}
else
{
- $RuntimeVersions.RuntimeVersion | ForEach-Object {$_}
+ $RuntimeVersions.RuntimeVersion | Sort-Object -Descending | ForEach-Object { $_ }
}
}
Register-ArgumentCompleter -CommandName New-AzFunctionApp -ParameterName RuntimeVersion -ScriptBlock $GetRuntimeVersionCompleter
diff --git a/src/Functions/custom/New-AzFunctionApp.ps1 b/src/Functions/custom/New-AzFunctionApp.ps1
index 34cbafe5f29d..d257d23e6935 100644
--- a/src/Functions/custom/New-AzFunctionApp.ps1
+++ b/src/Functions/custom/New-AzFunctionApp.ps1
@@ -64,6 +64,7 @@ function New-AzFunctionApp {
[Parameter(ParameterSetName="ByAppServicePlan", HelpMessage='The OS to host the function app.')]
[Parameter(ParameterSetName="Consumption")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Functions.Support.WorkerType])]
+ [ValidateSet("Linux", "Windows")]
[ValidateNotNullOrEmpty()]
[System.String]
# OS type (Linux or Windows)
@@ -245,41 +246,76 @@ function New-AzFunctionApp {
$params = GetParameterKeyValues -PSBoundParametersDictionary $PSBoundParameters `
-ParameterList @("SubscriptionId", "HttpPipelineAppend", "HttpPipelinePrepend")
+
+ $runtimeJsonDefintion = $null
ValidateFunctionName -Name $Name @params
if (-not $functionAppIsCustomDockerImage)
{
if (-not $FunctionsVersion)
{
+ if ($Runtime -eq "DotNet")
+ {
+ $errorId = "MissingFunctionsVersionValue"
+ $message += "For 'DotNet' function apps, the runtime version is specified by the FunctionsVersion parameter. Please specify this value and try again."
+ $exception = [System.InvalidOperationException]::New($message)
+ ThrowTerminatingError -ErrorId $errorId `
+ -ErrorMessage $message `
+ -ErrorCategory ([System.Management.Automation.ErrorCategory]::InvalidOperation) `
+ -Exception $exception
+ }
+
$FunctionsVersion = $DefaultFunctionsVersion
Write-Verbose "FunctionsVersion not specified. Setting default FunctionsVersion to '$FunctionsVersion'." -Verbose
}
ValidateFunctionsVersion -FunctionsVersion $FunctionsVersion
+ if (($Runtime -eq "DotNet") -and ($RuntimeVersion -ne $FunctionsVersion))
+ {
+ Write-Verbose "'DotNet' runtime version is specified by FunctionsVersion. The value of the -RuntimeVersion will be set to '$FunctionsVersion'." -Verbose
+ $RuntimeVersion = $FunctionsVersion
+ }
+
if (-not $OSType)
{
$OSType = GetDefaultOSType -Runtime $Runtime
Write-Verbose "OSType for $Runtime is '$OSType'." -Verbose
}
- if (-not $RuntimeVersion)
+ $runtimeJsonDefintion = GetRuntimeJsonDefinition -FunctionsVersion $FunctionsVersion -Runtime $Runtime -RuntimeVersion $RuntimeVersion -OSType $OSType
+
+ if (-not $runtimeJsonDefintion)
{
- # If not runtime version is provided, set the default version for the worker
- $RuntimeVersion = GetDefaultRuntimeVersion -FunctionsVersion $FunctionsVersion -Runtime $Runtime -OSType $OSType
- Write-Verbose "RuntimeVersion not specified. Setting default runtime version for $Runtime to '$RuntimeVersion'." -Verbose
+ $errorId = "FailedToGetRuntimeDefinition"
+ $message += "Failed to get runtime definition for '$Runtime' version '$RuntimeVersion' in Functions version '$FunctionsVersion' on '$OSType'."
+ $exception = [System.InvalidOperationException]::New($message)
+ ThrowTerminatingError -ErrorId $errorId `
+ -ErrorMessage $message `
+ -ErrorCategory ([System.Management.Automation.ErrorCategory]::InvalidOperation) `
+ -Exception $exception
+
}
- if (($Runtime -eq "DotNet") -and ($RuntimeVersion -ne $FunctionsVersion))
+ # Add app settings
+ if ($runtimeJsonDefintion.AppSettingsDictionary.Count -gt 0)
{
- Write-Verbose "DotNet version is specified by FunctionsVersion. The value of the -RuntimeVersion will be set to $FunctionsVersion." -Verbose
- $RuntimeVersion = $FunctionsVersion
+ foreach ($keyName in $runtimeJsonDefintion.AppSettingsDictionary.Keys)
+ {
+ $value = $runtimeJsonDefintion.AppSettingsDictionary[$keyName]
+ $appSettings.Add((NewAppSetting -Name $keyName -Value $value))
+ }
}
- ValidateRuntimeAndRuntimeVersion -FunctionsVersion $FunctionsVersion -Runtime $Runtime -RuntimeVersion $RuntimeVersion -OSType $OSType
-
- $runtimeWorker = $Runtime.ToLower()
- $appSettings.Add((NewAppSetting -Name 'FUNCTIONS_WORKER_RUNTIME' -Value "$runtimeWorker"))
+ # Add site config properties
+ if ($runtimeJsonDefintion.SiteConfigPropertiesDictionary.Count -gt 0)
+ {
+ foreach ($PropertyName in $runtimeJsonDefintion.SiteConfigPropertiesDictionary.Keys)
+ {
+ $value = $runtimeJsonDefintion.SiteConfigPropertiesDictionary[$PropertyName]
+ $siteCofig.$PropertyName = $value
+ }
+ }
}
$servicePlan = $null
@@ -350,37 +386,12 @@ function New-AzFunctionApp {
else
{
$appSettings.Add((NewAppSetting -Name 'WEBSITES_ENABLE_APP_SERVICE_STORAGE' -Value 'true'))
- $siteCofig.LinuxFxVersion = GetLinuxFxVersion -FunctionsVersion $FunctionsVersion -Runtime $Runtime -OSType $OSType -RuntimeVersion $RuntimeVersion
}
}
else
{
# Windows function app
$functionAppDef.Kind = 'functionapp'
-
- # Set default Node version
- $defaultNodeVersion = GetFunctionAppDefaultNodeVersion -FunctionsVersion $FunctionsVersion -Runtime $Runtime -RuntimeVersion $RuntimeVersion
- $appSettings.Add((NewAppSetting -Name 'WEBSITE_NODE_DEFAULT_VERSION' -Value $defaultNodeVersion))
-
- # Set version for Java or PowerShell function apps
- if ($Runtime -eq "Java")
- {
- $JavaVersion = GetWorkerVersion -FunctionsVersion $FunctionsVersion -Runtime $Runtime -RuntimeVersion $RuntimeVersion -OSType $OSType
- $siteCofig.JavaVersion = "$JavaVersion"
- }
- elseif ($Runtime -eq "PowerShell")
- {
- if ($RuntimeVersion -eq "6.2")
- {
- # Write warning for PowerShell 6.2 function apps
- $message = "PowerShell '6.2' has been deprecated. Please update your PowerShell runtime version to 7.0 by providing '-RuntimeVersion 7.0' when creating PowerShell function apps. "
- $message += "For more information, please see 'https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle?view=powershell-7#powershell-releases-end-of-life'."
- Write-Warning -Message $message
- }
-
- $PowerShellWorkerVersion = GetWorkerVersion -FunctionsVersion $FunctionsVersion -Runtime $Runtime -RuntimeVersion $RuntimeVersion -OSType $OSType
- $siteCofig.PowerShellVersion = "$PowerShellWorkerVersion"
- }
}
# Validate storage account and get connection string
@@ -409,7 +420,7 @@ function New-AzFunctionApp {
$appSettings.Add((NewAppSetting -Name 'WEBSITE_CONTENTSHARE' -Value $Name.ToLower()))
}
- if (-not $DisableAppInsights)
+ if (-not $DisableApplicationInsights)
{
if ($ApplicationInsightsKey)
{
diff --git a/src/Functions/examples/AddFunctionAppPlanWorkerType.md b/src/Functions/examples/AddFunctionAppPlanWorkerType.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/AddFunctionAppPlanWorkerType.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/AddFunctionAppSettings.md b/src/Functions/examples/AddFunctionAppSettings.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/AddFunctionAppSettings.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ContainsReservedFunctionAppSettingName.md b/src/Functions/examples/ContainsReservedFunctionAppSettingName.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ContainsReservedFunctionAppSettingName.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ConvertWebAppApplicationSettingToHashtable.md b/src/Functions/examples/ConvertWebAppApplicationSettingToHashtable.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ConvertWebAppApplicationSettingToHashtable.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/CreateApplicationInsightsProject.md b/src/Functions/examples/CreateApplicationInsightsProject.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/CreateApplicationInsightsProject.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/CreateFunctionsIdentity.md b/src/Functions/examples/CreateFunctionsIdentity.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/CreateFunctionsIdentity.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/FormatListToString.md b/src/Functions/examples/FormatListToString.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/FormatListToString.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Get-AzSystemAssignedIdentity.md b/src/Functions/examples/Get-AzSystemAssignedIdentity.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Get-AzSystemAssignedIdentity.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Get-AzWebAppFunctionKey.md b/src/Functions/examples/Get-AzWebAppFunctionKey.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Get-AzWebAppFunctionKey.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Get-AzWebAppFunctionKeySlot.md b/src/Functions/examples/Get-AzWebAppFunctionKeySlot.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Get-AzWebAppFunctionKeySlot.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Get-AzWebAppSettingKeyVaultReference.md b/src/Functions/examples/Get-AzWebAppSettingKeyVaultReference.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Get-AzWebAppSettingKeyVaultReference.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Get-AzWebAppSyncStatus.md b/src/Functions/examples/Get-AzWebAppSyncStatus.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Get-AzWebAppSyncStatus.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Get-AzWebAppSyncStatusSlot.md b/src/Functions/examples/Get-AzWebAppSyncStatusSlot.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Get-AzWebAppSyncStatusSlot.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetApplicationInsightsProject.md b/src/Functions/examples/GetApplicationInsightsProject.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetApplicationInsightsProject.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetAzWebAppConfig.md b/src/Functions/examples/GetAzWebAppConfig.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetAzWebAppConfig.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetConnectionString.md b/src/Functions/examples/GetConnectionString.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetConnectionString.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetDefaultOSType.md b/src/Functions/examples/GetDefaultOSType.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetDefaultOSType.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetErrorMessage.md b/src/Functions/examples/GetErrorMessage.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetErrorMessage.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetFunctionAppByName.md b/src/Functions/examples/GetFunctionAppByName.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetFunctionAppByName.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetFunctionAppPlans.md b/src/Functions/examples/GetFunctionAppPlans.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetFunctionAppPlans.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetFunctionAppServicePlanInfo.md b/src/Functions/examples/GetFunctionAppServicePlanInfo.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetFunctionAppServicePlanInfo.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetFunctionApps.md b/src/Functions/examples/GetFunctionApps.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetFunctionApps.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetParameterKeyValues.md b/src/Functions/examples/GetParameterKeyValues.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetParameterKeyValues.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetRuntimeJsonDefinition.md b/src/Functions/examples/GetRuntimeJsonDefinition.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetRuntimeJsonDefinition.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetServicePlan.md b/src/Functions/examples/GetServicePlan.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetServicePlan.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetSkuName.md b/src/Functions/examples/GetSkuName.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetSkuName.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetStorageAccount.md b/src/Functions/examples/GetStorageAccount.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetStorageAccount.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetSupportedRuntimeVersions.md b/src/Functions/examples/GetSupportedRuntimeVersions.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetSupportedRuntimeVersions.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/GetSupportedRuntimes.md b/src/Functions/examples/GetSupportedRuntimes.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/GetSupportedRuntimes.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Move-Az.md b/src/Functions/examples/Move-Az.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Move-Az.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/NewAppSetting.md b/src/Functions/examples/NewAppSetting.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/NewAppSetting.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/NewAppSettingObject.md b/src/Functions/examples/NewAppSettingObject.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/NewAppSettingObject.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/NewIdentityUserAssignedIdentity.md b/src/Functions/examples/NewIdentityUserAssignedIdentity.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/NewIdentityUserAssignedIdentity.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/NewResourceTag.md b/src/Functions/examples/NewResourceTag.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/NewResourceTag.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/NormalizeSku.md b/src/Functions/examples/NormalizeSku.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/NormalizeSku.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ParseDockerImage.md b/src/Functions/examples/ParseDockerImage.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ParseDockerImage.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Sync-AzWebAppFunctionSlot.md b/src/Functions/examples/Sync-AzWebAppFunctionSlot.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Sync-AzWebAppFunctionSlot.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/Test-Az.md b/src/Functions/examples/Test-Az.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/Test-Az.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ThrowRuntimeNotSupportedException.md b/src/Functions/examples/ThrowRuntimeNotSupportedException.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ThrowRuntimeNotSupportedException.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ThrowTerminatingError.md b/src/Functions/examples/ThrowTerminatingError.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ThrowTerminatingError.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ValidateConsumptionPlanLocation.md b/src/Functions/examples/ValidateConsumptionPlanLocation.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ValidateConsumptionPlanLocation.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ValidateFunctionName.md b/src/Functions/examples/ValidateFunctionName.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ValidateFunctionName.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ValidateFunctionsV2NotAvailableLocation.md b/src/Functions/examples/ValidateFunctionsV2NotAvailableLocation.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ValidateFunctionsV2NotAvailableLocation.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ValidateFunctionsVersion.md b/src/Functions/examples/ValidateFunctionsVersion.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ValidateFunctionsVersion.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ValidatePlanLocation.md b/src/Functions/examples/ValidatePlanLocation.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ValidatePlanLocation.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ValidatePlanSwitchCompatibility.md b/src/Functions/examples/ValidatePlanSwitchCompatibility.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ValidatePlanSwitchCompatibility.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/examples/ValidatePremiumPlanLocation.md b/src/Functions/examples/ValidatePremiumPlanLocation.md
new file mode 100644
index 000000000000..093355d11d50
--- /dev/null
+++ b/src/Functions/examples/ValidatePremiumPlanLocation.md
@@ -0,0 +1,18 @@
+### Example 1: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+PS C:\> {{ Add code here }}
+
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/Functions/exports/ValidateRuntimeAndRuntimeVersion.ps1 b/src/Functions/exports/FormatListToString.ps1
similarity index 75%
rename from src/Functions/exports/ValidateRuntimeAndRuntimeVersion.ps1
rename to src/Functions/exports/FormatListToString.ps1
index bae70e0c360a..dd0d2d4219e4 100644
--- a/src/Functions/exports/ValidateRuntimeAndRuntimeVersion.ps1
+++ b/src/Functions/exports/FormatListToString.ps1
@@ -30,30 +30,15 @@ PS C:\> {{ Add code here }}
.Outputs
System.Object
.Link
-https://docs.microsoft.com/en-us/powershell/module/az.functions/validateruntimeandruntimeversion
+https://docs.microsoft.com/en-us/powershell/module/az.functions/formatlisttostring
#>
-function ValidateRuntimeAndRuntimeVersion {
+function FormatListToString {
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Position=0, Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Body')]
- [System.String]
- ${FunctionsVersion},
-
- [Parameter(Position=1, Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Body')]
- [System.String]
- ${Runtime},
-
- [Parameter(Position=2, Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Body')]
- [System.String]
- ${RuntimeVersion},
-
- [Parameter(Position=3, Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Body')]
- [System.String]
- ${OSType}
+ [System.String[]]
+ ${List}
)
begin {
@@ -64,7 +49,7 @@ begin {
}
$parameterSet = $PSCmdlet.ParameterSetName
$mapping = @{
- __AllParameterSets = 'Az.Functions.custom\ValidateRuntimeAndRuntimeVersion';
+ __AllParameterSets = 'Az.Functions.custom\FormatListToString';
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
diff --git a/src/Functions/exports/Get-AzFunctionApp.ps1 b/src/Functions/exports/Get-AzFunctionApp.ps1
index 3d0ed573a17d..33be6ec47a5a 100644
--- a/src/Functions/exports/Get-AzFunctionApp.ps1
+++ b/src/Functions/exports/Get-AzFunctionApp.ps1
@@ -72,7 +72,7 @@ param(
# The location of the function app.
${Location},
- [Parameter(ParameterSetName='ByResourceGroupName')]
+ [Parameter(ParameterSetName='ByResourceGroupName', Mandatory)]
[Parameter(ParameterSetName='ByName', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Path')]
[System.String]
@@ -85,7 +85,7 @@ param(
# The name of the function app.
${Name},
- [Parameter()]
+ [Parameter(ParameterSetName='ByResourceGroupName')]
[Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Body')]
[System.Management.Automation.SwitchParameter]
# Use to specify whether to include deployment slots in results.
diff --git a/src/Functions/exports/Get-AzSystemAssignedIdentity.ps1 b/src/Functions/exports/Get-AzSystemAssignedIdentity.ps1
index 15f6b3365407..10e20cb6a70d 100644
--- a/src/Functions/exports/Get-AzSystemAssignedIdentity.ps1
+++ b/src/Functions/exports/Get-AzSystemAssignedIdentity.ps1
@@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter
[BackupId ]: ID of the backup.
[BaseAddress ]: Module base address.
[BlobServicesName ]: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'
- [CertificateOrderName ]: Name of the certificate order.
+ [CertificateOrderName ]: Name of the certificate order..
[ContainerName ]: The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
[DeletedSiteId ]: The numeric ID of the deleted app, e.g. 12345
[DetectorName ]: Detector Resource Name
@@ -57,7 +57,8 @@ INPUTOBJECT : Identity Parameter
[GatewayName ]: Name of the gateway. Currently, the only supported string is "primary".
[HostName ]: Hostname in the hostname binding.
[HostingEnvironmentName ]: Name of the hosting environment.
- [Id ]: Resource identity path
+ [Id ]: Deployment ID.
+ [Id1 ]: Resource identity path
[ImmutabilityPolicyName ]: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
[Instance ]: Name of the instance in the multi-role pool.
[InstanceId ]:
@@ -77,12 +78,12 @@ INPUTOBJECT : Identity Parameter
[PurgeId ]: In a purge status request, this is the Id of the operation the status of which is returned.
[RelayName ]: The relay name for this hybrid connection.
[ResourceGroupName ]: Name of the resource group to which the resource belongs.
- [ResourceName ]: The name of the identity resource.
+ [ResourceName ]: The name of the Application Insights component resource.
[RouteName ]: Name of the Virtual Network route.
[Scope ]: The resource provider scope of the resource. Parent resource being extended by Managed Identities.
[SiteExtensionId ]: Site extension name.
[SiteName ]: Site Name
- [Slot ]: Name of the deployment slot. By default, this API returns the production slot.
+ [Slot ]: Slot Name
[SnapshotId ]: The ID of the snapshot to read.
[SourceControlType ]: Type of source control
[SubscriptionId ]: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
diff --git a/src/Functions/exports/Get-AzWebAppSettingKeyVaultReference.ps1 b/src/Functions/exports/Get-AzWebAppSettingKeyVaultReference.ps1
index 55577dfa8578..d7053cfd0973 100644
--- a/src/Functions/exports/Get-AzWebAppSettingKeyVaultReference.ps1
+++ b/src/Functions/exports/Get-AzWebAppSettingKeyVaultReference.ps1
@@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter
[BackupId ]: ID of the backup.
[BaseAddress ]: Module base address.
[BlobServicesName ]: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'
- [CertificateOrderName ]: Name of the certificate order.
+ [CertificateOrderName ]: Name of the certificate order..
[ContainerName ]: The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
[DeletedSiteId ]: The numeric ID of the deleted app, e.g. 12345
[DetectorName ]: Detector Resource Name
@@ -59,7 +59,8 @@ INPUTOBJECT : Identity Parameter
[GatewayName ]: Name of the gateway. Currently, the only supported string is "primary".
[HostName ]: Hostname in the hostname binding.
[HostingEnvironmentName ]: Name of the hosting environment.
- [Id ]: Resource identity path
+ [Id ]: Deployment ID.
+ [Id1 ]: Resource identity path
[ImmutabilityPolicyName ]: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
[Instance ]: Name of the instance in the multi-role pool.
[InstanceId ]:
@@ -79,12 +80,12 @@ INPUTOBJECT : Identity Parameter
[PurgeId ]: In a purge status request, this is the Id of the operation the status of which is returned.
[RelayName ]: The relay name for this hybrid connection.
[ResourceGroupName ]: Name of the resource group to which the resource belongs.
- [ResourceName ]: The name of the identity resource.
+ [ResourceName ]: The name of the Application Insights component resource.
[RouteName ]: Name of the Virtual Network route.
[Scope ]: The resource provider scope of the resource. Parent resource being extended by Managed Identities.
[SiteExtensionId ]: Site extension name.
[SiteName ]: Site Name
- [Slot ]: Name of the deployment slot. By default, this API returns the production slot.
+ [Slot ]: Slot Name
[SnapshotId ]: The ID of the snapshot to read.
[SourceControlType ]: Type of source control
[SubscriptionId ]: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
diff --git a/src/Functions/exports/GetWorkerVersion.ps1 b/src/Functions/exports/GetRuntimeJsonDefinition.ps1
similarity index 91%
rename from src/Functions/exports/GetWorkerVersion.ps1
rename to src/Functions/exports/GetRuntimeJsonDefinition.ps1
index e2303bbd65a9..b3e698aef8ee 100644
--- a/src/Functions/exports/GetWorkerVersion.ps1
+++ b/src/Functions/exports/GetRuntimeJsonDefinition.ps1
@@ -30,9 +30,9 @@ PS C:\> {{ Add code here }}
.Outputs
System.Object
.Link
-https://docs.microsoft.com/en-us/powershell/module/az.functions/getworkerversion
+https://docs.microsoft.com/en-us/powershell/module/az.functions/getruntimejsondefinition
#>
-function GetWorkerVersion {
+function GetRuntimeJsonDefinition {
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Position=0, Mandatory)]
@@ -45,15 +45,15 @@ param(
[System.String]
${Runtime},
- [Parameter(Position=2, Mandatory)]
+ [Parameter(Position=3, Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Body')]
[System.String]
- ${RuntimeVersion},
+ ${OSType},
- [Parameter(Position=3, Mandatory)]
+ [Parameter(Position=2)]
[Microsoft.Azure.PowerShell.Cmdlets.Functions.Category('Body')]
[System.String]
- ${OSType}
+ ${RuntimeVersion}
)
begin {
@@ -64,7 +64,7 @@ begin {
}
$parameterSet = $PSCmdlet.ParameterSetName
$mapping = @{
- __AllParameterSets = 'Az.Functions.custom\GetWorkerVersion';
+ __AllParameterSets = 'Az.Functions.custom\GetRuntimeJsonDefinition';
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
diff --git a/src/Functions/exports/GetDefaultRuntimeVersion.ps1 b/src/Functions/exports/GetSupportedRuntimeVersions.ps1
similarity index 93%
rename from src/Functions/exports/GetDefaultRuntimeVersion.ps1
rename to src/Functions/exports/GetSupportedRuntimeVersions.ps1
index 5254e845806f..72c49bbbf443 100644
--- a/src/Functions/exports/GetDefaultRuntimeVersion.ps1
+++ b/src/Functions/exports/GetSupportedRuntimeVersions.ps1
@@ -30,9 +30,9 @@ PS C:\> {{ Add code here }}
.Outputs
System.Object
.Link
-https://docs.microsoft.com/en-us/powershell/module/az.functions/getdefaultruntimeversion
+https://docs.microsoft.com/en-us/powershell/module/az.functions/getsupportedruntimeversions
#>
-function GetDefaultRuntimeVersion {
+function GetSupportedRuntimeVersions {
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Position=0, Mandatory)]
@@ -59,7 +59,7 @@ begin {
}
$parameterSet = $PSCmdlet.ParameterSetName
$mapping = @{
- __AllParameterSets = 'Az.Functions.custom\GetDefaultRuntimeVersion';
+ __AllParameterSets = 'Az.Functions.custom\GetSupportedRuntimeVersions';
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
diff --git a/src/Functions/exports/Move-Az.ps1 b/src/Functions/exports/Move-Az.ps1
index 97d0cfa1cbeb..528cc6f3c2d4 100644
--- a/src/Functions/exports/Move-Az.ps1
+++ b/src/Functions/exports/Move-Az.ps1
@@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter
[BackupId ]: ID of the backup.
[BaseAddress ]: Module base address.
[BlobServicesName ]: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'
- [CertificateOrderName ]: Name of the certificate order.
+ [CertificateOrderName ]: Name of the certificate order..
[ContainerName ]: The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
[DeletedSiteId ]: The numeric ID of the deleted app, e.g. 12345
[DetectorName ]: Detector Resource Name
@@ -59,7 +59,8 @@ INPUTOBJECT : Identity Parameter
[GatewayName ]: Name of the gateway. Currently, the only supported string is "primary".
[HostName ]: Hostname in the hostname binding.
[HostingEnvironmentName ]: Name of the hosting environment.
- [Id ]: Resource identity path
+ [Id ]: Deployment ID.
+ [Id1 ]: Resource identity path
[ImmutabilityPolicyName ]: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
[Instance ]: Name of the instance in the multi-role pool.
[InstanceId ]:
@@ -79,12 +80,12 @@ INPUTOBJECT : Identity Parameter
[PurgeId ]: In a purge status request, this is the Id of the operation the status of which is returned.
[RelayName ]: The relay name for this hybrid connection.
[ResourceGroupName ]: Name of the resource group to which the resource belongs.
- [ResourceName ]: The name of the identity resource.
+ [ResourceName ]: The name of the Application Insights component resource.
[RouteName ]: Name of the Virtual Network route.
[Scope ]: The resource provider scope of the resource. Parent resource being extended by Managed Identities.
[SiteExtensionId ]: Site extension name.
[SiteName ]: Site Name
- [Slot ]: Name of the deployment slot. By default, this API returns the production slot.
+ [Slot ]: Slot Name
[SnapshotId ]: The ID of the snapshot to read.
[SourceControlType ]: Type of source control
[SubscriptionId ]: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
diff --git a/src/Functions/exports/ProxyCmdletDefinitions.ps1 b/src/Functions/exports/ProxyCmdletDefinitions.ps1
index 1bd9459669d2..23a1801cf311 100644
--- a/src/Functions/exports/ProxyCmdletDefinitions.ps1
+++ b/src/Functions/exports/ProxyCmdletDefinitions.ps1
@@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter
[BackupId ]: ID of the backup.
[BaseAddress ]: Module base address.
[BlobServicesName ]: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'
- [CertificateOrderName ]: Name of the certificate order.
+ [CertificateOrderName ]: Name of the certificate order..
[ContainerName ]: The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
[DeletedSiteId ]: The numeric ID of the deleted app, e.g. 12345
[DetectorName ]: Detector Resource Name
@@ -57,7 +57,8 @@ INPUTOBJECT : Identity Parameter
[GatewayName ]: Name of the gateway. Currently, the only supported string is "primary".
[HostName ]: Hostname in the hostname binding.
[HostingEnvironmentName ]: Name of the hosting environment.
- [Id ]: Resource identity path
+ [Id ]: Deployment ID.
+ [Id1 ]: Resource identity path
[ImmutabilityPolicyName ]: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
[Instance ]: Name of the instance in the multi-role pool.
[InstanceId ]:
@@ -77,12 +78,12 @@ INPUTOBJECT : Identity Parameter
[PurgeId ]: In a purge status request, this is the Id of the operation the status of which is returned.
[RelayName ]: The relay name for this hybrid connection.
[ResourceGroupName ]: Name of the resource group to which the resource belongs.
- [ResourceName ]: The name of the identity resource.
+ [ResourceName ]: The name of the Application Insights component resource.
[RouteName ]: Name of the Virtual Network route.
[Scope ]: The resource provider scope of the resource. Parent resource being extended by Managed Identities.
[SiteExtensionId ]: Site extension name.
[SiteName ]: Site Name
- [Slot ]: Name of the deployment slot. By default, this API returns the production slot.
+ [Slot ]: Slot Name
[SnapshotId ]: The ID of the snapshot to read.
[SourceControlType ]: Type of source control
[SubscriptionId ]: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
@@ -553,7 +554,7 @@ INPUTOBJECT : Identity Parameter
[BackupId ]: ID of the backup.
[BaseAddress ]: Module base address.
[BlobServicesName ]: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'
- [CertificateOrderName ]: Name of the certificate order.
+ [CertificateOrderName ]: Name of the certificate order..
[ContainerName ]: The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
[DeletedSiteId ]: The numeric ID of the deleted app, e.g. 12345
[DetectorName ]: Detector Resource Name
@@ -566,7 +567,8 @@ INPUTOBJECT : Identity Parameter
[GatewayName ]: Name of the gateway. Currently, the only supported string is "primary".
[HostName ]: Hostname in the hostname binding.
[HostingEnvironmentName ]: Name of the hosting environment.
- [Id ]: Resource identity path
+ [Id ]: Deployment ID.
+ [Id1 ]: Resource identity path
[ImmutabilityPolicyName ]: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
[Instance ]: Name of the instance in the multi-role pool.
[InstanceId ]:
@@ -586,12 +588,12 @@ INPUTOBJECT : Identity Parameter
[PurgeId ]: In a purge status request, this is the Id of the operation the status of which is returned.
[RelayName ]: The relay name for this hybrid connection.
[ResourceGroupName ]: Name of the resource group to which the resource belongs.
- [ResourceName ]: The name of the identity resource.
+ [ResourceName ]: The name of the Application Insights component resource.
[RouteName ]: Name of the Virtual Network route.
[Scope ]: The resource provider scope of the resource. Parent resource being extended by Managed Identities.
[SiteExtensionId ]: Site extension name.
[SiteName ]: Site Name
- [Slot ]: Name of the deployment slot. By default, this API returns the production slot.
+ [Slot ]: Slot Name
[SnapshotId ]: The ID of the snapshot to read.
[SourceControlType ]: Type of source control
[SubscriptionId ]: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
@@ -1091,7 +1093,7 @@ INPUTOBJECT : Identity Parameter
[BackupId ]: ID of the backup.
[BaseAddress ]: Module base address.
[BlobServicesName ]: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'
- [CertificateOrderName ]: Name of the certificate order.
+ [CertificateOrderName ]: Name of the certificate order..
[ContainerName ]: The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
[DeletedSiteId ]: The numeric ID of the deleted app, e.g. 12345
[DetectorName ]: Detector Resource Name
@@ -1104,7 +1106,8 @@ INPUTOBJECT : Identity Parameter
[GatewayName ]: Name of the gateway. Currently, the only supported string is "primary".
[HostName ]: Hostname in the hostname binding.
[HostingEnvironmentName ]: Name of the hosting environment.
- [Id ]: Resource identity path
+ [Id ]: Deployment ID.
+ [Id1 ]: Resource identity path
[ImmutabilityPolicyName ]: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
[Instance ]: Name of the instance in the multi-role pool.
[InstanceId ]:
@@ -1124,12 +1127,12 @@ INPUTOBJECT : Identity Parameter
[PurgeId ]: In a purge status request, this is the Id of the operation the status of which is returned.
[RelayName ]: The relay name for this hybrid connection.
[ResourceGroupName ]: Name of the resource group to which the resource belongs.
- [ResourceName ]: The name of the identity resource.
+ [ResourceName ]: The name of the Application Insights component resource.
[RouteName ]: Name of the Virtual Network route.
[Scope ]: The resource provider scope of the resource. Parent resource being extended by Managed Identities.
[SiteExtensionId ]: Site extension name.
[SiteName ]: Site Name
- [Slot ]: Name of the deployment slot. By default, this API returns the production slot.
+ [Slot ]: Slot Name
[SnapshotId ]: The ID of the snapshot to read.
[SourceControlType ]: Type of source control
[SubscriptionId ]: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
@@ -1338,7 +1341,7 @@ INPUTOBJECT : Identity Parameter
[BackupId ]: ID of the backup.
[BaseAddress ]: Module base address.
[BlobServicesName ]: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'
- [CertificateOrderName ]: Name of the certificate order.
+ [CertificateOrderName ]: Name of the certificate order..
[ContainerName ]: The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
[DeletedSiteId ]: The numeric ID of the deleted app, e.g. 12345
[DetectorName ]: Detector Resource Name
@@ -1351,7 +1354,8 @@ INPUTOBJECT : Identity Parameter
[GatewayName ]: Name of the gateway. Currently, the only supported string is "primary".
[HostName ]: Hostname in the hostname binding.
[HostingEnvironmentName ]: Name of the hosting environment.
- [Id ]: Resource identity path
+ [Id ]: Deployment ID.
+ [Id1 ]: Resource identity path
[ImmutabilityPolicyName ]: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
[Instance ]: Name of the instance in the multi-role pool.
[InstanceId ]:
@@ -1371,12 +1375,12 @@ INPUTOBJECT : Identity Parameter
[PurgeId ]: In a purge status request, this is the Id of the operation the status of which is returned.
[RelayName ]: The relay name for this hybrid connection.
[ResourceGroupName ]: Name of the resource group to which the resource belongs.
- [ResourceName ]: The name of the identity resource.
+ [ResourceName ]: The name of the Application Insights component resource.
[RouteName ]: Name of the Virtual Network route.
[Scope ]: The resource provider scope of the resource. Parent resource being extended by Managed Identities.
[SiteExtensionId ]: Site extension name.
[SiteName ]: Site Name
- [Slot ]: Name of the deployment slot. By default, this API returns the production slot.
+ [Slot ]: Slot Name
[SnapshotId ]: The ID of the snapshot to read.
[SourceControlType ]: Type of source control
[SubscriptionId ]: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
@@ -1568,7 +1572,7 @@ INPUTOBJECT : Identity Parameter
[BackupId ]: ID of the backup.
[BaseAddress ]: Module base address.
[BlobServicesName ]: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'
- [CertificateOrderName ]: Name of the certificate order.
+ [CertificateOrderName