Skip to content

Commit ab798d2

Browse files
committed
Fix signature issues
1 parent 7d272df commit ab798d2

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/FrontDoor/FrontDoor.Test/ScenarioTests/WebApplicationFireWallPolicyTests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function Test-PolicyCrud
2222
$resourceGroup = TestSetup-CreateResourceGroup
2323
$resourceGroupName = $resourceGroup.ResourceGroupName
2424
$tags = @{"tag1" = "value1"; "tag2" = "value2"}
25-
$matchCondition1 = New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -OperatorProperty Contains -Selector "UserAgent" -MatchValue "WINDOWS" -Transforms "Uppercase"
25+
$matchCondition1 = New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -OperatorProperty Contains -Selector "UserAgent" -MatchValue "WINDOWS" -Transform "Uppercase"
2626
$customRule1 = New-AzFrontDoorWafCustomRuleObject -Name "Rule1" -RuleType MatchRule -MatchCondition $matchCondition1 -Action Block -Priority 2
2727

2828
$ruleOverride = New-AzFrontDoorWafManagedRuleOverrideObject -RuleId "942100" -Action Log
@@ -43,7 +43,7 @@ function Test-PolicyCrud
4343
Assert-AreEqual $matchCondition1.Selector $retrievedPolicy.CustomRules[0].MatchConditions[0].Selector
4444
Assert-AreEqual $matchCondition1.OperatorProperty $retrievedPolicy.CustomRules[0].MatchConditions[0].OperatorProperty
4545
Assert-AreEqual $matchCondition1.MatchValue[0] $retrievedPolicy.CustomRules[0].MatchConditions[0].MatchValue[0]
46-
Assert-AreEqual $matchCondition1.Transforms[0] $retrievedPolicy.CustomRules[0].MatchConditions[0].Transforms[0]
46+
Assert-AreEqual $matchCondition1.Transform[0] $retrievedPolicy.CustomRules[0].MatchConditions[0].Transform[0]
4747
Assert-AreEqual $managedRule1.RuleGroupOverrides[0].ManagedRuleOverrides[0].Action $retrievedPolicy.ManagedRules[0].RuleGroupOverrides[0].ManagedRuleOverrides[0].Action
4848
Assert-AreEqual $managedRule1.RuleSetType $retrievedPolicy.ManagedRules[0].RuleSetType
4949
Assert-AreEqual $managedRule1.RuleSetVersion $retrievedPolicy.ManagedRules[0].RuleSetVersion
@@ -74,7 +74,7 @@ function Test-PolicyCrudWithPiping
7474
$resourceGroup = TestSetup-CreateResourceGroup
7575
$resourceGroupName = $resourceGroup.ResourceGroupName
7676
$tag = @{"tag1" = "value1"; "tag2" = "value2"}
77-
$matchCondition1 = New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -OperatorProperty Contains -Selector "UserAgent" -MatchValue "WINDOWS" -Transforms "Uppercase"
77+
$matchCondition1 = New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -OperatorProperty Contains -Selector "UserAgent" -MatchValue "WINDOWS" -Transform "Uppercase"
7878
$customRule1 = New-AzFrontDoorWafCustomRuleObject -Name "Rule1" -RuleType MatchRule -MatchCondition $matchCondition1 -Action Block -Priority 2
7979

8080
$ruleOverride = New-AzFrontDoorWafManagedRuleOverrideObject -RuleId "942100" -Action Log

src/FrontDoor/FrontDoor/Cmdlets/NewAzureRmFrontDoorWafMatchConditionObject.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class NewAzureRmFrontDoorWafMatchConditionObject : AzureFrontDoorCmdletBa
7070
/// </summary>
7171
[Parameter(Mandatory = false, HelpMessage = "Transforms to apply. Possible values include: 'Lowercase', 'Uppercase', 'Trim', 'UrlDecode', 'UrlEncode', 'RemoveNulls'.")]
7272
[PSArgumentCompleter("Lowercase", "Uppercase", "Trim", "UrlDecode", "UrlEncode", "RemoveNulls")]
73-
public string[] Transforms { get; set; }
73+
public string[] Transform { get; set; }
7474

7575
public override void ExecuteCmdlet()
7676
{
@@ -83,7 +83,7 @@ public override void ExecuteCmdlet()
8383
NegateCondition = !this.IsParameterBound(c => c.NegateCondition) ? false : NegateCondition,
8484
OperatorProperty = OperatorProperty,
8585
Selector = Selector,
86-
Transforms = Transforms?.ToList()
86+
Transform = Transform?.ToList()
8787
};
8888
WriteObject(matchCondition);
8989
}

src/FrontDoor/FrontDoor/Helpers/ModelExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public static PSMatchCondition ToPSMatchCondition(this sdkMatchCondition sdkMatc
393393
OperatorProperty = sdkMatchCondition.OperatorProperty,
394394
Selector = sdkMatchCondition.Selector,
395395
NegateCondition = sdkMatchCondition.NegateCondition,
396-
Transforms = sdkMatchCondition.Transforms?.ToList()
396+
Transform = sdkMatchCondition.Transforms?.ToList()
397397
};
398398
}
399399

@@ -434,7 +434,7 @@ public static sdkMatchCondition ToSdkMatchCondition(this PSMatchCondition psMatc
434434
NegateCondition = psMatchCondition.NegateCondition,
435435
Selector = psMatchCondition.Selector,
436436
OperatorProperty = psMatchCondition.OperatorProperty,
437-
Transforms = psMatchCondition.Transforms
437+
Transforms = psMatchCondition.Transform
438438
};
439439
}
440440

src/FrontDoor/FrontDoor/Models/PSMatchCondition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ public class PSMatchCondition
2929

3030
public bool? NegateCondition { get; set; }
3131

32-
public List<string> Transforms { get; set; }
32+
public List<string> Transform { get; set; }
3333
}
3434
}

src/FrontDoor/FrontDoor/help/New-AzFrontDoorWafMatchConditionObject.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Create MatchCondition Object for WAF policy creation
1414

1515
```
1616
New-AzFrontDoorWafMatchConditionObject -MatchVariable <String> -OperatorProperty <String>
17-
[-MatchValue <String[]>] [-Selector <String>] [-NegateCondition <Boolean>] [-Transforms <String[]>]
17+
[-MatchValue <String[]>] [-Selector <String>] [-NegateCondition <Boolean>] [-Transform <String[]>]
1818
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
1919
```
2020

@@ -28,18 +28,18 @@ Create MatchCondition Object for WAF policy creation
2828
PS C:\> New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -OperatorProperty Contains -Selector "User-Agent" -MatchValue "Windows"
2929
3030
31-
MatchVariable OperatorProperty MatchValue Selector NegateCondition Transforms
32-
------------- ---------------- ---------- -------- --------------- ----------
31+
MatchVariable OperatorProperty MatchValue Selector NegateCondition Transform
32+
------------- ---------------- ---------- -------- --------------- ---------
3333
RequestHeader Contains {Windows} User-Agent False
3434
```
3535

3636
### Example 2
3737
```powershell
38-
PS C:\> New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -OperatorProperty Contains -Selector "User-Agent" -MatchValue "WINDOWS" -Transforms Uppercase
38+
PS C:\> New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -OperatorProperty Contains -Selector "User-Agent" -MatchValue "WINDOWS" -Transform Uppercase
3939
4040
41-
MatchVariable OperatorProperty MatchValue Selector NegateCondition Transforms
42-
------------- ---------------- ---------- -------- --------------- ----------
41+
MatchVariable OperatorProperty MatchValue Selector NegateCondition Transform
42+
------------- ---------------- ---------- -------- --------------- ---------
4343
RequestHeader Contains {WINDOWS} User-Agent False {Uppercase}
4444
```
4545

@@ -140,7 +140,7 @@ Accept pipeline input: False
140140
Accept wildcard characters: False
141141
```
142142
143-
### -Transforms
143+
### -Transform
144144
Transforms to apply. Possible values include: 'Lowercase', 'Uppercase', 'Trim', 'UrlDecode', 'UrlEncode', 'RemoveNulls'.
145145
146146
```yaml

0 commit comments

Comments
 (0)