Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format the help markdown file of Az.Websites #18416

Merged
merged 4 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Websites/Websites/help/Add-AzWebAppAccessRestrictionRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,40 +50,40 @@ The **Add-AzWebAppAccessRestrictionRule** cmdlet adds an Access Restriction rule

### Example 1: Add IpAddress Access Restriction rule to a Web App
```powershell
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite"
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite" `
-Name IpRule -Priority 200 -Action Allow -IpAddress 10.10.0.0/8
```

This command adds an access restriction rule with priority 200 and ip range to a Web App named ContosoSite that belongs to the resource group Default-Web-WestUS.

### Example 2: Add Subnet Service Endpoint Access Restriction rule to a Web App
```powershell
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite"
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite" `
-Name SubnetRule -Priority 300 -Action Allow -SubnetName appgw-subnet -VirtualNetworkName corp-vnet
```

This command adds an access restriction rule with priority 300 and with subnet appgw-subnet in corp-vnet to a Web App named ContosoSite that belongs to the resource group Default-Web-WestUS.

### Example 3: Add ServiceTag Access Restriction rule to a Web App
```powershell
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite"
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite" `
-Name ServiceTagRule -Priority 200 -Action Allow -ServiceTag AzureFrontDoor.Backend
```

This command adds an access restriction rule with priority 200 and a Service Tag representing the ip scope of Azure Front Door to a Web App named ContosoSite that belongs to the resource group Default-Web-WestUS.

### Example 4: Add multi-address Access Restriction rule to a Web App
```powershell
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite"
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite" `
-Name MultipleIpRule -Priority 200 -Action Allow -IpAddress "10.10.0.0/8,192.168.0.0/16"
```

This command adds an access restriction rule with priority 200 and two ip ranges to a Web App named ContosoSite that belongs to the resource group Default-Web-WestUS.

### Example 5: Add Access Restriction rule with http header to a Web App
```powershell
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite"
-Name MultipleIpRule -Priority 400 -Action Allow -ServiceTag AzureFrontDoor.Backend
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite" `
-Name MultipleIpRule -Priority 400 -Action Allow -ServiceTag AzureFrontDoor.Backend `
-HttpHeader @{'x-forwarded-host' = 'www.contoso.com', 'app.contoso.com'; 'x-azure-fdid' = '355deb06-47c4-4ba4-9641-c7d7a98b913e'}
```

Expand Down
3 changes: 1 addition & 2 deletions src/Websites/Websites/help/Add-AzWebAppTrafficRouting.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ This command adds a routing rule to transfer 15% of production traffice to Stg

### Example 2: Add a routing rule to transfer the production traffice to Stg slot ranges from 50% to 90% in incremental manner.
```powershell
Add-AzWebAppTrafficRouting -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite" -RoutingRule @{ActionHostName='XXXX.azurewebsites.net';ReroutePercentage=50;ChangeIntervalInMinutes=1;
MinReroutePercentage=50;MaxReroutePercentage=90;Name='Stg';ChangeStep=10}
Add-AzWebAppTrafficRouting -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoSite" -RoutingRule @{ActionHostName='XXXX.azurewebsites.net';ReroutePercentage=50;ChangeIntervalInMinutes=1;MinReroutePercentage=50;MaxReroutePercentage=90;Name='Stg';ChangeStep=10}
```

This command adds a routing rule to transfer the production traffice to Stg slot ranges from 50% to 90% in incremental manner.
Expand Down
2 changes: 1 addition & 1 deletion src/Websites/Websites/help/Get-AzStaticWebApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This commands gets a static web application by name.
### Example 4: Get a static web application by pipeline

```powershell
New-AzStaticWebApp -ResourceGroupName azure-rg-test -Name staticweb-pwsh01 -Location eastus2 -RepositoryUrl 'https://github.com/username/RepoName' -RepositoryToken 'repoToken123' -Branch 'master' -AppLocation 'Client' -ApiLocation 'Api' -OutputLocation 'wwwroot' -SkuName 'free' | Get-AzStaticWebApp -InputObject
New-AzStaticWebApp -ResourceGroupName azure-rg-test -Name staticweb-pwsh01 -Location eastus2 -RepositoryUrl 'https://github.com/username/RepoName' -RepositoryToken 'repoToken123' -Branch 'master' -AppLocation 'Client' -ApiLocation 'Api' -OutputLocation 'wwwroot' -SkuName 'free' | Get-AzStaticWebApp
```

```output
Expand Down
19 changes: 11 additions & 8 deletions src/Websites/Websites/help/Get-AzWebAppContinuousWebJob.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Get or list continuous web for an app.

### Example 1: List continuous webs for an app
```powershell
PS C:\> Get-AzWebAppContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01

Get-AzWebAppContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/continuousjob-01 webjob-rg-test
Expand All @@ -49,8 +50,9 @@ This command lists continuous webs for an app.

### Example 2: Get continuous web for an app
```powershell
PS C:\> Get-AzWebAppContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name continuousjob-01

Get-AzWebAppContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name continuousjob-01
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/continuousjob-01 webjob-rg-test
Expand All @@ -60,10 +62,11 @@ This command gets continuous web for an app.

### Example 3: Get continuous web for an app by pipeline
```powershell
PS C:\> $webjob = Get-AzWebAppContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name continuousjob-01
PS C:\> Start-AzWebAppContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name continuousjob-01
PS C:\> $webjob.Id | Get-AzWebAppContinuousWebJob

$webjob = Get-AzWebAppContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name continuousjob-01
Start-AzWebAppContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name continuousjob-01
$webjob.Id | Get-AzWebAppContinuousWebJob
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/continuousjob-01 webjob-rg-test
Expand Down
19 changes: 11 additions & 8 deletions src/Websites/Websites/help/Get-AzWebAppSlotContinuousWebJob.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Get or list continuous web for a deployment slot.

### Example 1: List continuous webs for a deployment slot
```powershell
PS C:\> Get-AzWebAppSlotContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01

Get-AzWebAppSlotContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/slot01/slotcontinuousjob-03 webjob-rg-test
Expand All @@ -49,8 +50,9 @@ This command lists continuous webs for a deployment slot.

### Example 2: Get continuous web for a deployment slot
```powershell
PS C:\> Get-AzWebAppSlotContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slotcontinuousjob-03

Get-AzWebAppSlotContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slotcontinuousjob-03
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/slot01/slotcontinuousjob-03 webjob-rg-test
Expand All @@ -60,10 +62,11 @@ This command gets continuous web for a deployment slot.

### Example 3: Get continuous web for a deployment slot by pipeline
```powershell
PS C:\> $webjob = Get-AzWebAppSlotContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slotcontinuousjob-03
PS C:\> Start-AzWebAppSlotContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slotcontinuousjob-03
PS C:\> $webjob.Id | Get-AzWebAppSlotContinuousWebJob

$webjob = Get-AzWebAppSlotContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slotcontinuousjob-03
Start-AzWebAppSlotContinuousWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slotcontinuousjob-03
$webjob.Id | Get-AzWebAppSlotContinuousWebJob
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/slot01/slotcontinuousjob-03 webjob-rg-test
Expand Down
19 changes: 11 additions & 8 deletions src/Websites/Websites/help/Get-AzWebAppSlotTriggeredWebJob.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Get or list triggered web for a deployment slot.

### Example 1: List triggered webs for a deployment slot
```powershell
PS C:\> Get-AzWebAppSlotTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01

Get-AzWebAppSlotTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/slot01/slottriggeredjob-03 webjob-rg-test
Expand All @@ -49,8 +50,9 @@ This command lists triggered webs for a deployment slot.

### Example 2: Get triggered web for a deployment slot
```powershell
PS C:\> Get-AzWebAppSlotTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03

Get-AzWebAppSlotTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/slot01/slottriggeredjob-03 webjob-rg-test
Expand All @@ -60,10 +62,11 @@ This command gets triggered web for a deployment slot.

### Example 3: Get triggered web for a deployment slot by pipeline
```powershell
PS C:\> $webjob = Get-AzWebAppSlotTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03
PS C:\> Start-AzWebAppSlotTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03
PS C:\> $webjob.Id | Get-AzWebAppSlotTriggeredWebJob

$webjob = Get-AzWebAppSlotTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03
Start-AzWebAppSlotTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03
$webjob.Id | Get-AzWebAppSlotTriggeredWebJob
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/slot01/slottriggeredjob-03 webjob-rg-test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ Get or list triggered web job's history for a deployment slot.

### Example 1: List triggered web job's history for a deployment slot
```powershell
PS C:\> Get-AzWebAppSlotTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03

Get-AzWebAppSlotTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03
```
```output
Kind Name ResourceGroupName
---- ---- -----------------
appService-test01/slot01/slottriggeredjob-03/202201040202032401 webjob-rg-test
Expand All @@ -49,8 +50,9 @@ This command list triggered web job's history for a deployment slot.

### Example 2: Get triggered web job's history for a deployment slot
```powershell
PS C:\> Get-AzWebAppSlotTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03 -Id 202201040202032401

Get-AzWebAppSlotTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03 -Id 202201040202032401
```
```output
Kind Name ResourceGroupName
---- ---- -----------------
appService-test01/slot01/slottriggeredjob-03/202201040202032401 webjob-rg-test
Expand All @@ -60,9 +62,10 @@ This command get triggered web job's history for a deployment slot.

### Example 3: Get triggered web job's history for a deployment slot by pipeline
```powershell
PS C:\> $jobs = Get-AzWebAppSlotTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03
PS C:\> $jobs[0].Id | Get-AzWebAppSlotTriggeredWebJobHistory

$jobs = Get-AzWebAppSlotTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01 -Name slottriggeredjob-03
$jobs[0].Id | Get-AzWebAppSlotTriggeredWebJobHistory
```
```output
Kind Name ResourceGroupName
---- ---- -----------------
appService-test01/slot01/slottriggeredjob-03/202201040202032401 webjob-rg-test
Expand Down
5 changes: 3 additions & 2 deletions src/Websites/Websites/help/Get-AzWebAppSlotWebJob.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ List webjobs for a deployment slot.

### Example 1: List webjobs for a deployment slot
```powershell
PS C:\> Get-AzWebAppSlotWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01

Get-AzWebAppSlotWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -SlotName slot01
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/slot01/slottriggeredjob-03 webjob-rg-test
Expand Down
19 changes: 11 additions & 8 deletions src/Websites/Websites/help/Get-AzWebAppTriggeredWebJob.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Get or list triggered web for an app.

### Example 1: List triggered webs for an app
```powershell
PS C:\> Get-AzWebAppTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01

Get-AzWebAppTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/triggeredjob-01 webjob-rg-test
Expand All @@ -49,8 +50,9 @@ This command lists triggered webs for an app.

### Example 2: Get triggered web for an app
```powershell
PS C:\> Get-AzWebAppTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01

Get-AzWebAppTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/triggeredjob-01 webjob-rg-test
Expand All @@ -60,10 +62,11 @@ This command gets triggered web for an app.

### Example 3: Get triggered web for an app by pipeline
```powershell
PS C:\> $webjob = Get-AzWebAppTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01
PS C:\> Start-AzWebAppTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01
PS C:\> $webjob.Id | Get-AzWebAppTriggeredWebJob

$webjob = Get-AzWebAppTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01
Start-AzWebAppTriggeredWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01
$webjob.Id | Get-AzWebAppTriggeredWebJob
```
```output
Name Kind WebJobType ResourceGroupName
---- ---- ---------- -----------------
appService-test01/triggeredjob-01 webjob-rg-test
Expand Down
17 changes: 10 additions & 7 deletions src/Websites/Websites/help/Get-AzWebAppTriggeredWebJobHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Get or list triggered web job's history for an app.

### Example 1: List triggered web job's history for an app
```powershell
PS C:\> Get-AzWebAppTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01

Get-AzWebAppTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01
```
```output
Kind Name ResourceGroupName
---- ---- -----------------
appService-test01/triggeredjob-01/202201040249386155 webjob-rg-test
Expand All @@ -49,8 +50,9 @@ This command lists triggered web job's history for an app.

### Example 2: Get triggered web job's history for an app
```powershell
PS C:\> Get-AzWebAppTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01 -Id 202201040236300466

Get-AzWebAppTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01 -Id 202201040236300466
```
```output
Kind Name ResourceGroupName
---- ---- -----------------
appService-test01/triggeredjob-01/202201040236300466 webjob-rg-test
Expand All @@ -60,9 +62,10 @@ This command get triggered web job's history for an app.

### Example 3: Get triggered web job's history for an app by pipeline
```powershell
PS C:\> $logs = Get-AzWebAppTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01
PS C:\> $logs[0].Id | Get-AzWebAppTriggeredWebJobHistory

$logs = Get-AzWebAppTriggeredWebJobHistory -ResourceGroupName webjob-rg-test -AppName appService-test01 -Name triggeredjob-01
$logs[0].Id | Get-AzWebAppTriggeredWebJobHistory
```
```output
Kind Name ResourceGroupName
---- ---- -----------------
appService-test01/triggeredjob-01/202201040236300466 webjob-rg-test
Expand Down
5 changes: 3 additions & 2 deletions src/Websites/Websites/help/Get-AzWebAppWebJob.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ List webjobs for an app.

### Example 1: List webjobs for an app
```powershell
PS C:\> Get-AzWebAppWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01

Get-AzWebAppWebJob -ResourceGroupName webjob-rg-test -AppName appService-test01
```
```output
Name Kind WebJobType
---- ---- ----------
appService-test01/triggeredjob-01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ The **Import-AzWebAppKeyVaultCertificate** cmdlet imports an SSL certificate to

### Example 1
```powershell
Import-AzWebAppKeyVaultCertificate -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoWebApp"
Import-AzWebAppKeyVaultCertificate -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoWebApp" `
-KeyVaultName "ContosoKeyVault" -CertName "ContosoCertname"
```

This command imports an SSL certificate to a web app from Key Vault.

### Example 2
```powershell
Import-AzWebAppKeyVaultCertificate -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoWebApp"
-KeyVaultName '/subscriptions/[sub id]/resourceGroups/[rg]/providers/Microsoft.KeyVault/vaults/[vault name]'
Import-AzWebAppKeyVaultCertificate -ResourceGroupName "Default-Web-WestUS" -WebAppName "ContosoWebApp" `
-KeyVaultName '/subscriptions/[sub id]/resourceGroups/[rg]/providers/Microsoft.KeyVault/vaults/[vault name]' `
-CertName "ContosoCertname"
```

Expand Down
Loading