Skip to content

Commit 6950697

Browse files
committed
Updating changeLog, using switchParmeter & updating help
1 parent 21ad069 commit 6950697

File tree

3 files changed

+51
-24
lines changed

3 files changed

+51
-24
lines changed

src/ResourceManager/Websites/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2323
* Added -AsJob support for long-running Websites cmdlets. Allows selected cmdlets to run in the background and return a job to track and control progress.
2424
- Affected cmdlets are New-, Remove-, Add-, and Set- for WebApps, AppServicePlan and Slots
25+
* Added -AssignIdentity & -Httpsonly properties for SetAzureWebApp
2526

2627
## Version 4.0.0
2728
* Add support for online help

src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/SetAzureWebApp.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public class SetAzureWebAppCmdlet : WebAppBaseCmdlet
9898
public SwitchParameter AsJob { get; set; }
9999

100100
[Parameter(ParameterSetName = ParameterSet1Name, Mandatory = false, HelpMessage = "Enable MSI on an existing azure webapp or functionapp")]
101-
public bool AssignIdentity { get; set; }
101+
public SwitchParameter AssignIdentity { get; set; }
102102

103103
[Parameter(ParameterSetName = ParameterSet1Name, Mandatory = false, HelpMessage = "Enable/disable redirecting all traffic to HTTPS on an existing azure webapp or functionapp")]
104-
public bool HttpsOnly { get; set; }
104+
public SwitchParameter HttpsOnly { get; set; }
105105

106106
public override void ExecuteCmdlet()
107107
{
@@ -150,7 +150,7 @@ public override void ExecuteCmdlet()
150150
Location = location,
151151
ServerFarmId = WebApp.ServerFarmId,
152152
Identity = parameters.Contains("AssignIdentity") ? new ManagedServiceIdentity("SystemAssigned", null, null) : WebApp.Identity,
153-
HttpsOnly = parameters.Contains("HttpsOnly") ? (bool?)HttpsOnly : null
153+
HttpsOnly = parameters.Contains("HttpsOnly") ? (bool?)HttpsOnly : false
154154
};
155155

156156
if (parameters.Contains("AssignIdentity"))

src/ResourceManager/Websites/Commands.Websites/help/Set-AzureRmWebApp.md

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
external help file: Microsoft.Azure.Commands.Websites.dll-Help.xml
3-
Module Name: AzureRM.WebSites
3+
Module Name: AzureRM.Websites
44
ms.assetid: 4166119F-D26A-45A1-B040-D7B2459833D6
55
online version: https://docs.microsoft.com/en-us/powershell/module/azurerm.websites/set-azurermwebapp
66
schema: 2.0.0
@@ -21,16 +21,16 @@ Set-AzureRmWebApp [[-AppServicePlan] <String>] [[-DefaultDocuments] <String[]>]
2121
[[-ConnectionStrings] <Hashtable>]
2222
[[-HandlerMappings] <System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]>]
2323
[[-ManagedPipelineMode] <String>] [[-WebSocketsEnabled] <Boolean>] [[-Use32BitWorkerProcess] <Boolean>]
24-
[[-AutoSwapSlotName] <String>] [-HostNames <String[]>] [-NumberOfWorkers <Int32>]
25-
[-ResourceGroupName] <String> [-Name] <String> [-AsJob]
26-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
24+
[[-AutoSwapSlotName] <String>] [-HostNames <String[]>] [-NumberOfWorkers <Int32>] [-AsJob] [-AssignIdentity]
25+
[-HttpsOnly] [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
26+
[<CommonParameters>]
2727
```
2828

2929
### S2
3030
```
3131
Set-AzureRmWebApp [[-Use32BitWorkerProcess] <Boolean>] [[-AutoSwapSlotName] <String>]
32-
[-NumberOfWorkers <Int32>] [-WebApp] <Site> [-AsJob]
33-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
32+
[-NumberOfWorkers <Int32>] [-AsJob] [-WebApp] <Site> [-DefaultProfile <IAzureContextContainer>]
33+
[<CommonParameters>]
3434
```
3535

3636
## DESCRIPTION
@@ -77,6 +77,34 @@ Accept pipeline input: False
7777
Accept wildcard characters: False
7878
```
7979
80+
### -AsJob
81+
Run cmdlet in the background
82+
83+
```yaml
84+
Type: SwitchParameter
85+
Parameter Sets: (All)
86+
Aliases:
87+
88+
Required: False
89+
Position: Named
90+
Default value: None
91+
Accept pipeline input: False
92+
Accept wildcard characters: False
93+
```
94+
95+
### -AssignIdentity
96+
Enable MSI on an existing azure webapp or functionapp```yaml
97+
Type: SwitchParameter
98+
Parameter Sets: S1
99+
Aliases:
100+
101+
Required: False
102+
Position: Named
103+
Default value: None
104+
Accept pipeline input: False
105+
Accept wildcard characters: False
106+
```
107+
80108
### -AutoSwapSlotName
81109
Destination slot name for auto swap
82110
@@ -197,6 +225,19 @@ Accept pipeline input: False
197225
Accept wildcard characters: False
198226
```
199227
228+
### -HttpsOnly
229+
Enable/disable redirecting all traffic to HTTPS on an existing azure webapp or functionapp```yaml
230+
Type: SwitchParameter
231+
Parameter Sets: S1
232+
Aliases:
233+
234+
Required: False
235+
Position: Named
236+
Default value: None
237+
Accept pipeline input: False
238+
Accept wildcard characters: False
239+
```
240+
200241
### -ManagedPipelineMode
201242
Managed Pipeline Mode Name
202243
@@ -348,21 +389,6 @@ Accept pipeline input: False
348389
Accept wildcard characters: False
349390
```
350391
351-
### -AsJob
352-
Run cmdlet in the background
353-
354-
```yaml
355-
Type: SwitchParameter
356-
Parameter Sets: (All)
357-
Aliases:
358-
359-
Required: False
360-
Position: Named
361-
Default value: None
362-
Accept pipeline input: False
363-
Accept wildcard characters: False
364-
```
365-
366392
### CommonParameters
367393
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
368394

0 commit comments

Comments
 (0)