Skip to content

Commit

Permalink
Add examples when using the profileScrubbing'
Browse files Browse the repository at this point in the history
  • Loading branch information
TracyYaoYao committed Mar 27, 2024
1 parent 0d4297f commit 991b553
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,20 @@ Create an in-memory object for ProfileLogScrubbing.

## EXAMPLES

### Example 1: {{ Add title here }}
### Example 1: Create an in-memory object for ProfileUpgradeParameters, for two LogScrubbingRules
```powershell
{{ Add code here }}
$scrubbingRule1 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
$scrubbingRule2 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestUri -State Enabled
New-AzFrontDoorCdnProfileLogScrubbingObject -ScrubbingRule @($scrubbingRule1, $scrubbingRule2) -State Enabled
```

```output
{{ Add output here }}
State
-----
Enabled
```

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
{{ Add code here }}
```

```output
{{ Add output here }}
```

{{ Add description here }}
Create an in-memory object for ProfileUpgradeParameters, for two LogScrubbingRules

## PARAMETERS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,31 @@ Create an in-memory object for ProfileScrubbingRules.

## EXAMPLES

### Example 1: {{ Add title here }}
### Example 1: Create an in-memory object for ProfileScrubbingRules and the value of matchVariable is RequestIPAddress
```powershell
{{ Add code here }}
New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
```

```output
{{ Add output here }}
MatchVariable Selector SelectorMatchOperator State
------------- -------- --------------------- -----
RequestIPAddress EqualsAny Enabled
```

{{ Add description here }}
Create an in-memory object for ProfileScrubbingRules and the value of matchVariable is RequestIPAddress

### Example 2: {{ Add title here }}
### Example 2: Create an in-memory object for ProfileScrubbingRules and disbale the Scrubbing rule
```powershell
{{ Add code here }}
New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestUri -State Disabled
```

```output
{{ Add output here }}
MatchVariable Selector SelectorMatchOperator State
------------- -------- --------------------- -----
RequestUri EqualsAny Disabled
```

{{ Add description here }}
Create an in-memory object for ProfileScrubbingRules and disbale the Scrubbing rule

## PARAMETERS

Expand Down
45 changes: 45 additions & 0 deletions src/Cdn/Cdn.Autorest/docs/Update-AzFrontDoorCdnProfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,51 @@ Global fdp-v542q6 frontdoor testps-rg-da16jm

Enable managed identity using UserAssigned type to an AzureFrontDoor profile

### Example 5: Enable the Profile Logscrub to an AzureFrontDoor profile, only contains one LogScrubbingRule
```powershell
$rule = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rule -LogScrubbingState Enabled
```

```output
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
```

Enable the Profile Logscrub to an AzureFrontDoor profile, only contains one LogScrubbingRule

### Example 6: Enable the Profile Logscrub to an AzureFrontDoor profile, contains more than one LogScrubbingRule
```powershell
$rule1 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
$rule2 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable QueryStringArgNames -State Enabled
$rules = New-AzFrontDoorCdnProfileLogScrubbingObject -ScrubbingRule @($rule1, $rule2) -State Enabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rules.ScrubbingRule -LogScrubbingState Enabled
```

```output
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
```

Enable the Profile Logscrub to an AzureFrontDoor profile, contains more than one LogScrubbingRule

### Example 7: Disable the Profile Logscrub to an AzureFrontDoor profile
```powershell
$rule = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Disabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rule -LogScrubbingState Disabled
```

```output
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
```

Disable the Profile Logscrub to an AzureFrontDoor profile

## PARAMETERS

### -AsJob
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
### Example 1: {{ Add title here }}
### Example 1: Create an in-memory object for ProfileUpgradeParameters, for two LogScrubbingRules
```powershell
{{ Add code here }}
$scrubbingRule1 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
$scrubbingRule2 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestUri -State Enabled
New-AzFrontDoorCdnProfileLogScrubbingObject -ScrubbingRule @($scrubbingRule1, $scrubbingRule2) -State Enabled
```

```output
{{ Add output here }}
State
-----
Enabled
```

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
{{ Add code here }}
```

```output
{{ Add output here }}
```

{{ Add description here }}
Create an in-memory object for ProfileUpgradeParameters, for two LogScrubbingRules

Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
### Example 1: {{ Add title here }}
### Example 1: Create an in-memory object for ProfileScrubbingRules and the value of matchVariable is RequestIPAddress
```powershell
{{ Add code here }}
New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
```

```output
{{ Add output here }}
MatchVariable Selector SelectorMatchOperator State
------------- -------- --------------------- -----
RequestIPAddress EqualsAny Enabled
```

{{ Add description here }}
Create an in-memory object for ProfileScrubbingRules and the value of matchVariable is RequestIPAddress

### Example 2: {{ Add title here }}
### Example 2: Create an in-memory object for ProfileScrubbingRules and disbale the Scrubbing rule
```powershell
{{ Add code here }}
New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestUri -State Disabled
```

```output
{{ Add output here }}
MatchVariable Selector SelectorMatchOperator State
------------- -------- --------------------- -----
RequestUri EqualsAny Disabled
```

{{ Add description here }}
Create an in-memory object for ProfileScrubbingRules and disbale the Scrubbing rule

50 changes: 49 additions & 1 deletion src/Cdn/Cdn.Autorest/examples/Update-AzFrontDoorCdnProfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,52 @@ Location Name Kind ResourceGroupName
Global fdp-v542q6 frontdoor testps-rg-da16jm
```

Enable managed identity using UserAssigned type to an AzureFrontDoor profile
Enable managed identity using UserAssigned type to an AzureFrontDoor profile


### Example 5: Enable the Profile Logscrub to an AzureFrontDoor profile, only contains one LogScrubbingRule
```powershell
$rule = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rule -LogScrubbingState Enabled
```

```output
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
```

Enable the Profile Logscrub to an AzureFrontDoor profile, only contains one LogScrubbingRule


### Example 6: Enable the Profile Logscrub to an AzureFrontDoor profile, contains more than one LogScrubbingRule
```powershell
$rule1 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
$rule2 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable QueryStringArgNames -State Enabled
$rules = New-AzFrontDoorCdnProfileLogScrubbingObject -ScrubbingRule @($rule1, $rule2) -State Enabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rules.ScrubbingRule -LogScrubbingState Enabled
```

```output
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
```

Enable the Profile Logscrub to an AzureFrontDoor profile, contains more than one LogScrubbingRule


### Example 7: Disable the Profile Logscrub to an AzureFrontDoor profile
```powershell
$rule = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Disabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rule -LogScrubbingState Disabled
```

```output
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
```

Disable the Profile Logscrub to an AzureFrontDoor profile

0 comments on commit 991b553

Please sign in to comment.