Skip to content

Commit 170f16f

Browse files
Split Az.Functions Examples (#17136)
* Split Az.Functions Examples * Split Az.Functions Examples
1 parent 1c0844a commit 170f16f

15 files changed

+80
-59
lines changed

src/Functions/help/Get-AzFunctionApp.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ Gets function apps in a subscription.
4242

4343
### Example 1: Get all function apps.
4444
```powershell
45-
PS C:\> Get-AzFunctionApp
45+
Get-AzFunctionApp
46+
```
4647

48+
```output
4749
Name Status OSType Runtime Location AppServicePlan ResourceGroupName SubscriptionId
4850
---- ------ ------ ------- -------- -------------- ----------------- --------------
4951
Functions1-Windows-DoNet Running Windows DotNet Central US CentralUSPlan Functions-West-Europe-Win fe16564a-d943-4bf8-8c28-cf01708c3f8b
@@ -54,8 +56,10 @@ Functions1-Windows-Java Running Windows Java West Europe Premium1-WE Func
5456

5557
### Example 2: Get function apps by name.
5658
```powershell
57-
PS C:\> Get-AzFunctionApp -ResourceGroupName Functions-West-Europe-Win -Name Functions1-Windows-DoNet
59+
Get-AzFunctionApp -ResourceGroupName Functions-West-Europe-Win -Name Functions1-Windows-DoNet
60+
```
5861

62+
```output
5963
Name Status OSType Runtime Location AppServicePlan ResourceGroupName SubscriptionId
6064
---- ------ ------ ------- -------- -------------- ----------------- --------------
6165
Functions1-Windows-DoNet Running Windows DotNet Central US CentralUSPlan Functions-West-Europe-Win fe16564a-d943-4bf8-8c28-cf01708c3f8b
@@ -65,8 +69,10 @@ Functions1-Windows-DoNet Running Windows DotNet Central US CentralUSPlan Funct
6569

6670
### Example 3: Get function apps by resource group name.
6771
```powershell
68-
PS C:\> Get-AzFunctionApp -ResourceGroupName Functions-West-Europe-Win
72+
Get-AzFunctionApp -ResourceGroupName Functions-West-Europe-Win
73+
```
6974

75+
```output
7076
Name Status OSType Runtime Location AppServicePlan ResourceGroupName SubscriptionId
7177
---- ------ ------ ------- -------- -------------- ----------------- --------------
7278
Functions1-Windows-DoNet Running Windows DotNet Central US CentralUSPlan Functions-West-Europe-Win fe16564a-d943-4bf8-8c28-cf01708c3f8b
@@ -76,8 +82,10 @@ Functions1-Windows-DoNet Running Windows DotNet Central US CentralUSPlan Funct
7682

7783
### Example 4: Get function apps for the given subscriptions.
7884
```powershell
79-
PS C:\> Get-AzFunctionApp -SubscriptionId fe16564a-d943-4bf8-8c28-cf01708c3f8b
85+
Get-AzFunctionApp -SubscriptionId fe16564a-d943-4bf8-8c28-cf01708c3f8b
86+
```
8087

88+
```output
8189
Name Status OSType Runtime Location AppServicePlan ResourceGroupName SubscriptionId
8290
---- ------ ------ ------- -------- -------------- ----------------- --------------
8391
Functions1-Windows-DoNet Running Windows DotNet Central US CentralUSPlan Functions-West-Europe-Win fe16564a-d943-4bf8-8c28-cf01708c3f8b
@@ -87,8 +95,10 @@ Functions1-Windows-DoNet Running Windows DotNet Central US CentralUSPlan Funct
8795

8896
### Example 5: Get function apps by location.
8997
```powershell
90-
PS C:\> Get-AzFunctionApp -Location "Central US"
98+
Get-AzFunctionApp -Location "Central US"
99+
```
91100

101+
```output
92102
Name Status OSType Runtime Location AppServicePlan ResourceGroupName SubscriptionId
93103
---- ------ ------ ------- -------- -------------- ----------------- --------------
94104
Functions1-Windows-DoNet Running Windows DotNet Central US CentralUSPlan Functions-West-Europe-Win fe16564a-d943-4bf8-8c28-cf01708c3f8b

src/Functions/help/Get-AzFunctionAppAvailableLocation.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ Gets the location where a function app for the given os and plan type is availab
2424

2525
### Example 1: Get the locations where Premium is available for Windows. If no parameters are specified, PlanType is set to 'Premium' and OSType is set to 'Windows'.
2626
```powershell
27-
PS C:\> Get-AzFunctionAppAvailableLocation
27+
Get-AzFunctionAppAvailableLocation
28+
```
2829

30+
```output
2931
Name
3032
----
3133
Central US
@@ -64,8 +66,10 @@ This command gets the locations where Premium is available for Windows.
6466

6567
### Example 2: Get the locations where Premium is available for Linux.
6668
```powershell
67-
PS C:\> Get-AzFunctionAppAvailableLocation -PlanType Premium -OSType Linux
69+
Get-AzFunctionAppAvailableLocation -PlanType Premium -OSType Linux
70+
```
6871

72+
```output
6973
Name
7074
----
7175
Central US
@@ -99,8 +103,10 @@ This command gets the locations where Premium is available for Linux.
99103

100104
### Example 3: Get the locations where Consumption is available for Windows.
101105
```powershell
102-
PS C:\> Get-AzFunctionAppAvailableLocation -PlanType Consumption -OSType Windows
106+
Get-AzFunctionAppAvailableLocation -PlanType Consumption -OSType Windows
107+
```
103108

109+
```output
104110
Name
105111
----
106112
Central US

src/Functions/help/Get-AzFunctionAppPlan.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ Get function apps plans in a subscription.
4242

4343
### Example 1: Get all function app plans.
4444
```powershell
45-
PS C:\> Get-AzFunctionAppPlan
45+
Get-AzFunctionAppPlan
46+
```
4647

48+
```output
4749
Name WorkerType SkuTier SkuName Location ResourceGroupName SubscriptionId
4850
---- ---------- ------- ------- -------- ----------------- --------------
4951
Func99-West-Europe-Linux-Premium Linux ElasticPremium EP1 West Europe Func99-West-Europe-Linux-Premium fe16564a-d943-4bf8-8c28-cf01708c3f8b
@@ -59,8 +61,10 @@ This command gets all function app plans.
5961

6062
### Example 2: Get function app plans by resource group name.
6163
```powershell
62-
PS C:\> Get-AzFunctionAppPlan -ResourceGroupName "West Europe"
64+
Get-AzFunctionAppPlan -ResourceGroupName "West Europe"
65+
```
6366

67+
```output
6468
Name WorkerType SkuTier SkuName Location ResourceGroupName SubscriptionId
6569
---- ---------- ------- ------- -------- ----------------- --------------
6670
Func99-West-Europe-Linux-Premium Linux ElasticPremium EP1 West Europe Func99-West-Europe-Linux-Premium fe16564a-d943-4bf8-8c28-cf01708c3f8b
@@ -72,8 +76,10 @@ This command gets function app plans by resource group name.
7276

7377
### Example 3: Get function app plans for the given subscriptions.
7478
```powershell
75-
PS C:\> Get-AzFunctionAppPlan -SubscriptionId fe16564a-d943-4bf8-8c28-cf01708c3f8z
79+
Get-AzFunctionAppPlan -SubscriptionId fe16564a-d943-4bf8-8c28-cf01708c3f8z
80+
```
7681

82+
```output
7783
Name WorkerType SkuTier SkuName Location ResourceGroupName SubscriptionId
7884
---- ---------- ------- ------- -------- ----------------- --------------
7985
Func99-West-Europe-Windows-Premium Windows ElasticPremium EP1 West Europe Func99-West-Europe-Win-Premium fe16564a-d943-4bf8-8c28-cf01708c3f8z
@@ -83,8 +89,10 @@ This command gets function app plans for the given subscriptions.
8389

8490
### Example 4: Get function app plans by location.
8591
```powershell
86-
PS C:\> Get-AzFunctionAppPlan -Location "Central US"
92+
Get-AzFunctionAppPlan -Location "Central US"
93+
```
8794

95+
```output
8896
Name WorkerType SkuTier SkuName Location ResourceGroupName SubscriptionId
8997
---- ---------- ------- ------- -------- ----------------- --------------
9098
Func99-West-Europe-Windows-Premium Windows ElasticPremium EP1 Central US Func99-West-Europe-Win-Premium 3r16564a-d943-4bf8-8c28-cf01708c3f8b

src/Functions/help/Get-AzFunctionAppSetting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Gets app settings for a function app.
3131

3232
### Example 1: Get the app settings of a function app.
3333
```powershell
34-
PS C:\> Get-AzFunctionAppSetting -Name MyAppName -ResourceGroupName MyResourceGroupName
34+
Get-AzFunctionAppSetting -Name MyAppName -ResourceGroupName MyResourceGroupName
3535
```
3636

3737
This command gets the app settings of a function app.

src/Functions/help/New-AzFunctionApp.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,33 @@ Creates a function app.
4848

4949
### Example 1: Create a consumption PowerShell function app in Central US.
5050
```powershell
51-
PS C:\> New-AzFunctionApp -Name MyUniqueFunctionAppName `
52-
-ResourceGroupName MyResourceGroupName `
53-
-Location centralUS `
54-
-StorageAccount MyStorageAccountName `
55-
-Runtime PowerShell
51+
New-AzFunctionApp -Name MyUniqueFunctionAppName `
52+
-ResourceGroupName MyResourceGroupName `
53+
-Location centralUS `
54+
-StorageAccount MyStorageAccountName `
55+
-Runtime PowerShell
5656
```
5757

5858
This command creates a consumption PowerShell function app in Central US.
5959

6060
### Example 2: Create a PowerShell function app which will be hosted in a service plan.
6161
```powershell
62-
PS C:\> New-AzFunctionApp -Name MyUniqueFunctionAppName `
63-
-ResourceGroupName MyResourceGroupName `
64-
-PlanName MyPlanName `
65-
-StorageAccount MyStorageAccountName `
66-
-Runtime PowerShell
62+
New-AzFunctionApp -Name MyUniqueFunctionAppName `
63+
-ResourceGroupName MyResourceGroupName `
64+
-PlanName MyPlanName `
65+
-StorageAccount MyStorageAccountName `
66+
-Runtime PowerShell
6767
```
6868

6969
This command creates a PowerShell function app which will be hosted in a service plan.
7070

7171
### Example 3: Create a function app using a using a private ACR image.
7272
```powershell
73-
PS C:\> New-AzFunctionApp -Name MyUniqueFunctionAppName `
74-
-ResourceGroupName MyResourceGroupName `
75-
-PlanName MyPlanName `
76-
-StorageAccount MyStorageAccountName `
77-
-DockerImageName myacr.azurecr.io/myimage:tag
78-
73+
New-AzFunctionApp -Name MyUniqueFunctionAppName `
74+
-ResourceGroupName MyResourceGroupName `
75+
-PlanName MyPlanName `
76+
-StorageAccount MyStorageAccountName `
77+
-DockerImageName myacr.azurecr.io/myimage:tag
7978
```
8079

8180
This command creates a function app using a using a private ACR image.

src/Functions/help/New-AzFunctionAppPlan.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ Creates a function app service plan.
2525

2626
### Example 1: Create a Windows premium app plan in West Europe with burst out capability up to 10 instances.
2727
```powershell
28-
PS C:\> New-AzFunctionAppPlan -ResourceGroupName MyResourceGroupName `
29-
-Name MyPremiumPlan `
30-
-Location WestEurope `
31-
-MinimumWorkerCount 1 `
32-
-MaximumWorkerCount 10 `
33-
-Sku EP1 `
34-
-WorkerType Windows
35-
28+
New-AzFunctionAppPlan -ResourceGroupName MyResourceGroupName `
29+
-Name MyPremiumPlan `
30+
-Location WestEurope `
31+
-MinimumWorkerCount 1 `
32+
-MaximumWorkerCount 10 `
33+
-Sku EP1 `
34+
-WorkerType Windows
3635
```
3736

3837
This command creates a Windows premium app plan in West Europe with burst out capability up to 10 instances.

src/Functions/help/Remove-AzFunctionApp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ Deletes a function app.
3131

3232
### Example 1: Get a function app by name and delete it.
3333
```powershell
34-
PS C:\> Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Remove-AzFunctionApp -Force
34+
Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Remove-AzFunctionApp -Force
3535
```
3636

3737
This command gets a function app by name and delete it.
3838

3939
### Example 2: Delete a function app by name.
4040
```powershell
41-
PS C:\> Remove-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName -Force
41+
Remove-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName -Force
4242
```
4343

4444
This command deletes a function app by name.

src/Functions/help/Remove-AzFunctionAppPlan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ Deletes a function app plan.
3131

3232
### Example 1: Get a function app plan by name and delete it.
3333
```powershell
34-
PS C:\> Get-AzFunctionAppPlan -Name MyAppName -ResourceGroupName MyResourceGroupName | Remove-AzFunctionAppPlan -Force
34+
Get-AzFunctionAppPlan -Name MyAppName -ResourceGroupName MyResourceGroupName | Remove-AzFunctionAppPlan -Force
3535
```
3636

3737
This command gets a function app plan by name and deletes it.
3838

3939
### Example 2: Delete a function app plan by name.
4040
```powershell
41-
PS C:\> Remove-AzFunctionAppPlan -Name MyAppName -ResourceGroupName MyResourceGroupName -Force
41+
Remove-AzFunctionAppPlan -Name MyAppName -ResourceGroupName MyResourceGroupName -Force
4242
```
4343

4444
This command deletes a function app plan by name.

src/Functions/help/Remove-AzFunctionAppSetting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Removes app settings from a function app.
3131

3232
### Example 1: Remove app settings in a function app.
3333
```powershell
34-
PS C:\> Remove-AzFunctionAppSetting -Name MyAppName -ResourceGroupName MyResourceGroupName -AppSettingName "MyAppSetting1", "MyAppSetting2"
34+
Remove-AzFunctionAppSetting -Name MyAppName -ResourceGroupName MyResourceGroupName -AppSettingName "MyAppSetting1", "MyAppSetting2"
3535
```
3636

3737
This command removes app settings in a function app.

src/Functions/help/Restart-AzFunctionApp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ Restarts a function app.
3131

3232
### Example 1: Get a function app by name and restart it.
3333
```powershell
34-
PS C:\> Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Restart-AzFunctionApp -Force
34+
Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Restart-AzFunctionApp -Force
3535
```
3636

3737
This command gets a function app by name and restarts it.
3838

3939
### Example 2: Restart a function app by name.
4040
```powershell
41-
PS C:\> Restart-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName -Force
41+
Restart-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName -Force
4242
```
4343

4444
This command restarts a function app by name.

src/Functions/help/Start-AzFunctionApp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ Starts a function app.
3131

3232
### Example 1: Get a function app by name and start it.
3333
```powershell
34-
PS C:\> Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Start-AzFunctionApp
34+
Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Start-AzFunctionApp
3535
```
3636

3737
This command gets a function app by name and starts it.
3838

3939
### Example 2: Start a function app by name.
4040
```powershell
41-
PS C:\> Start-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName
41+
Start-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName
4242
```
4343

4444
This command starts a function app by name.

src/Functions/help/Stop-AzFunctionApp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ Stops a function app.
3131

3232
### Example 1: Get a function app by name and stop it.
3333
```powershell
34-
PS C:\> Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Stop-AzFunctionApp -Force
34+
Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Stop-AzFunctionApp -Force
3535
```
3636

3737
This command gets a function app by name and stops it.
3838

3939
### Example 2: Stop a function app by name.
4040
```powershell
41-
PS C:\> Stop-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName -Force
41+
Stop-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName -Force
4242
```
4343

4444
This command stops a function app by name.

src/Functions/help/Update-AzFunctionApp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,28 @@ Updates a function app.
3535

3636
### Example 1: Update function app hosting plan.
3737
```powershell
38-
PS C:\> Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -PlanName NewPlanName -Force
38+
Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -PlanName NewPlanName -Force
3939
```
4040

4141
This command updates function app hosting plan.
4242

4343
### Example 2: Set a SystemAssigned managed identity for a function app.
4444
```powershell
45-
PS C:\> Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -IdentityType SystemAssigned -Force
45+
Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -IdentityType SystemAssigned -Force
4646
```
4747

4848
This command sets a SystemAssigned managed identity for a function app.
4949

5050
### Example 3: Update function app Application Insights.
5151
```powershell
52-
PS C:\> Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -ApplicationInsightsName ApplicationInsightsProjectName -Force
52+
Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -ApplicationInsightsName ApplicationInsightsProjectName -Force
5353
```
5454

5555
This command updates function app Application Insights.
5656

5757
### Example 3: Remove managed identity from a function app.
5858
```powershell
59-
PS C:\> Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -IdentityType None -Force
59+
Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -IdentityType None -Force
6060
```
6161

6262
This command removes a managed identity from a function app.

src/Functions/help/Update-AzFunctionAppPlan.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ Updates a function app service plan.
3333

3434
### Example 1: Update an app service plan to EP2 sku with twenty maximum workers.
3535
```powershell
36-
PS C:\> Update-AzFunctionAppPlan -ResourceGroupName MyResourceGroupName `
37-
-Name MyPremiumPlan `
38-
-MaximumWorkerCount 20 `
39-
-Sku EP2 `
40-
-Force
41-
36+
Update-AzFunctionAppPlan -ResourceGroupName MyResourceGroupName `
37+
-Name MyPremiumPlan `
38+
-MaximumWorkerCount 20 `
39+
-Sku EP2 `
40+
-Force
4241
```
4342

4443
This command updates an app service plan to EP2 sku with twenty maximum workers.

src/Functions/help/Update-AzFunctionAppSetting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Adds or updates app settings in a function app.
3131

3232
### Example 1: Add a new app setting in a function app.
3333
```powershell
34-
PS C:\> Update-AzFunctionAppSetting -Name MyAppName -ResourceGroupName MyResourceGroupName -AppSetting @{"Name1" = "Value1"}
34+
Update-AzFunctionAppSetting -Name MyAppName -ResourceGroupName MyResourceGroupName -AppSetting @{"Name1" = "Value1"}
3535
```
3636

3737
This command adds a new app setting in a function app.

0 commit comments

Comments
 (0)