Skip to content

Commit 1e2834a

Browse files
committed
Add changelog entry, update help file
1 parent a77f8c1 commit 1e2834a

File tree

3 files changed

+48
-29
lines changed

3 files changed

+48
-29
lines changed

src/ResourceManager/Resources/Commands.Resources/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Add missing -Mode parameter to Set-AzureRmPolicyDefinition
2122

2223
## Version 6.5.0
2324
* Update New-AzureRmResourceGroupDeployment with new parameter RollbackAction

src/ResourceManager/Resources/Commands.Resources/help/Set-AzureRmPolicyDefinition.md

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,31 @@ Modifies a policy definition.
1616
### NameParameterSet (Default)
1717
```
1818
Set-AzureRmPolicyDefinition -Name <String> [-DisplayName <String>] [-Description <String>] [-Policy <String>]
19-
[-Metadata <String>] [-Parameter <String>] [-ApiVersion <String>] [-Pre]
19+
[-Metadata <String>] [-Parameter <String>] [-Mode <PolicyDefinitionMode>] [-ApiVersion <String>] [-Pre]
2020
[-DefaultProfile <IAzureContextContainer>] [-InformationAction <ActionPreference>]
2121
[-InformationVariable <String>] [<CommonParameters>]
2222
```
2323

2424
### ManagementGroupNameParameterSet
2525
```
2626
Set-AzureRmPolicyDefinition -Name <String> [-DisplayName <String>] [-Description <String>] [-Policy <String>]
27-
[-Metadata <String>] [-Parameter <String>] -ManagementGroupName <String> [-ApiVersion <String>] [-Pre]
28-
[-DefaultProfile <IAzureContextContainer>] [-InformationAction <ActionPreference>]
29-
[-InformationVariable <String>] [<CommonParameters>]
27+
[-Metadata <String>] [-Parameter <String>] [-Mode <PolicyDefinitionMode>] -ManagementGroupName <String>
28+
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>]
29+
[-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
3030
```
3131

3232
### SubscriptionIdParameterSet
3333
```
3434
Set-AzureRmPolicyDefinition -Name <String> [-DisplayName <String>] [-Description <String>] [-Policy <String>]
35-
[-Metadata <String>] [-Parameter <String>] -SubscriptionId <Guid> [-ApiVersion <String>] [-Pre]
36-
[-DefaultProfile <IAzureContextContainer>] [-InformationAction <ActionPreference>]
37-
[-InformationVariable <String>] [<CommonParameters>]
35+
[-Metadata <String>] [-Parameter <String>] [-Mode <PolicyDefinitionMode>] -SubscriptionId <Guid>
36+
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>]
37+
[-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
3838
```
3939

4040
### IdParameterSet
4141
```
4242
Set-AzureRmPolicyDefinition -Id <String> [-DisplayName <String>] [-Description <String>] [-Policy <String>]
43-
[-Metadata <String>] [-Parameter <String>] [-ApiVersion <String>] [-Pre]
43+
[-Metadata <String>] [-Parameter <String>] [-Mode <PolicyDefinitionMode>] [-ApiVersion <String>] [-Pre]
4444
[-DefaultProfile <IAzureContextContainer>] [-InformationAction <ActionPreference>]
4545
[-InformationVariable <String>] [<CommonParameters>]
4646
```
@@ -60,14 +60,22 @@ The first command gets a policy definition named VMPolicyDefinition by using the
6060
The command stores that object in the $PolicyDefinition variable.
6161
The second command updates the description of the policy definition identified by the **ResourceId** property of $PolicyDefinition.
6262

63+
### Example 2: Update the mode of a policy definition
64+
```
65+
PS C:\> Set-AzureRmPolicyDefinition -Name 'VMPolicyDefinition' -Mode 'All'
66+
```
67+
68+
This command updates the policy definition named VMPolicyDefinition by using the Set-AzureRmPolicyDefinition cmdlet to
69+
set its mode property to 'All'.
70+
6371
## PARAMETERS
6472

6573
### -ApiVersion
6674
Specifies the version of the resource provider API to use.
6775
If you do not specify a version, this cmdlet uses the latest available version.
6876

6977
```yaml
70-
Type: System.String
78+
Type: String
7179
Parameter Sets: (All)
7280
Aliases:
7381

@@ -82,7 +90,7 @@ Accept wildcard characters: False
8290
The credentials, account, tenant, and subscription used for communication with azure
8391
8492
```yaml
85-
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
93+
Type: IAzureContextContainer
8694
Parameter Sets: (All)
8795
Aliases: AzureRmContext, AzureCredential
8896

@@ -97,7 +105,7 @@ Accept wildcard characters: False
97105
Specifies a new description for the policy definition.
98106
99107
```yaml
100-
Type: System.String
108+
Type: String
101109
Parameter Sets: (All)
102110
Aliases:
103111

@@ -112,7 +120,7 @@ Accept wildcard characters: False
112120
Specifies a new display name for the policy definition.
113121
114122
```yaml
115-
Type: System.String
123+
Type: String
116124
Parameter Sets: (All)
117125
Aliases:
118126

@@ -127,7 +135,7 @@ Accept wildcard characters: False
127135
Specifies the fully qualified resource ID for the policy definition that this cmdlet modifies.
128136
129137
```yaml
130-
Type: System.String
138+
Type: String
131139
Parameter Sets: IdParameterSet
132140
Aliases: ResourceId
133141

@@ -149,7 +157,7 @@ The acceptable values for this parameter are:
149157
- Suspend
150158
151159
```yaml
152-
Type: System.Management.Automation.ActionPreference
160+
Type: ActionPreference
153161
Parameter Sets: (All)
154162
Aliases: infa
155163

@@ -164,7 +172,7 @@ Accept wildcard characters: False
164172
Specifies an information variable.
165173
166174
```yaml
167-
Type: System.String
175+
Type: String
168176
Parameter Sets: (All)
169177
Aliases: iv
170178

@@ -179,7 +187,7 @@ Accept wildcard characters: False
179187
The name of the management group of the policy definition to update.
180188
181189
```yaml
182-
Type: System.String
190+
Type: String
183191
Parameter Sets: ManagementGroupNameParameterSet
184192
Aliases:
185193

@@ -194,7 +202,22 @@ Accept wildcard characters: False
194202
The metadata for policy definition. This can either be a path to a file name containing the metadata, or the metadata as string.
195203
196204
```yaml
197-
Type: System.String
205+
Type: String
206+
Parameter Sets: (All)
207+
Aliases:
208+
209+
Required: False
210+
Position: Named
211+
Default value: None
212+
Accept pipeline input: True (ByPropertyName)
213+
Accept wildcard characters: False
214+
```
215+
216+
### -Mode
217+
The mode of the new policy definition.
218+
219+
```yaml
220+
Type: PolicyDefinitionMode
198221
Parameter Sets: (All)
199222
Aliases:
200223

@@ -209,7 +232,7 @@ Accept wildcard characters: False
209232
Specifies the name of the policy definition that this cmdlet modifies.
210233
211234
```yaml
212-
Type: System.String
235+
Type: String
213236
Parameter Sets: NameParameterSet, ManagementGroupNameParameterSet, SubscriptionIdParameterSet
214237
Aliases:
215238

@@ -224,7 +247,7 @@ Accept wildcard characters: False
224247
The parameters declaration for policy definition. This can either be a path to a file name or uri containing the parameters declaration, or the parameters declaration as string.
225248
226249
```yaml
227-
Type: System.String
250+
Type: String
228251
Parameter Sets: (All)
229252
Aliases:
230253

@@ -240,7 +263,7 @@ Specifies new policy rule for the policy definition.
240263
You can specify the path of a .json file or a string that contains the policy in JavaScript Object Notation (JSON) format.
241264
242265
```yaml
243-
Type: System.String
266+
Type: String
244267
Parameter Sets: (All)
245268
Aliases:
246269

@@ -255,7 +278,7 @@ Accept wildcard characters: False
255278
Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.
256279
257280
```yaml
258-
Type: System.Management.Automation.SwitchParameter
281+
Type: SwitchParameter
259282
Parameter Sets: (All)
260283
Aliases:
261284

@@ -270,7 +293,7 @@ Accept wildcard characters: False
270293
The subscription ID of the policy definition to update.
271294
272295
```yaml
273-
Type: System.Nullable`1[System.Guid]
296+
Type: Guid
274297
Parameter Sets: SubscriptionIdParameterSet
275298
Aliases:
276299

src/ResourceManager/Resources/Resources.sln

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 15
3-
VisualStudioVersion = 15.0.27130.2027
2+
# Visual Studio 14
3+
VisualStudioVersion = 14.0.25420.1
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}"
66
EndProject
@@ -10,11 +10,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Test", "
1010
EndProject
1111
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Rest", "Commands.ResourceManager\Cmdlets\Commands.Resources.Rest.csproj", "{8058D403-06E3-4BED-8924-D166CE303961}"
1212
EndProject
13-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0414B697-C059-4C9E-80EF-512E30C5F8B9}"
14-
ProjectSection(SolutionItems) = preProject
15-
ChangeLog.md = ChangeLog.md
16-
EndProjectSection
17-
EndProject
1813
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Insights", "..\Insights\Commands.Insights\Commands.Insights.csproj", "{DEA446A1-84E2-46CC-B780-EB4AFDE2460E}"
1914
EndProject
2015
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Profile\Commands.Profile\Commands.Profile.csproj", "{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}"

0 commit comments

Comments
 (0)