@@ -12,10 +12,18 @@ Creates a new firewall rule or updates an existing firewall rule.
1212
1313## SYNTAX
1414
15+ ### CreateExpanded (Default)
1516```
16- New-AzMySqlFirewallRule -Name <String> -ResourceGroupName <String> -ServerName <String>
17- -StartIPAddress <String> [-SubscriptionId <String>] [-EndIPAddress <String>] [-DefaultProfile <PSObject>]
18- [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
17+ New-AzMySqlFirewallRule -ResourceGroupName <String> -ServerName <String> -StartIPAddress <String>
18+ [-Name <String>] [-SubscriptionId <String>] [-EndIPAddress <String>] [-DefaultProfile <PSObject>] [-AsJob]
19+ [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
20+ ```
21+
22+ ### AllowAll
23+ ```
24+ New-AzMySqlFirewallRule -ResourceGroupName <String> -ServerName <String> -AllowAll [-Name <String>]
25+ [-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
26+ [<CommonParameters>]
1927```
2028
2129## DESCRIPTION
@@ -27,9 +35,9 @@ Creates a new firewall rule or updates an existing firewall rule.
2735``` powershell
2836PS C:\> New-AzMySqlFirewallRule -Name rule -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -EndIPAddress 0.0.0.1 -StartIPAddress 0.0.0.0
2937
30- Name Type
31- ---- ----
32- rule Microsoft.DBforMySQL/servers/firewallRules
38+ Name StartIPAddress EndIPAddress
39+ ---- -------------- ------------
40+ rule 0.0.0.0 0.0.0.1
3341```
3442
3543This cmdlets create a MySql server Firewall Rule.
@@ -38,15 +46,41 @@ This cmdlets create a MySql server Firewall Rule.
3846``` powershell
3947PS C:\> New-AzMySqlFirewallRule -Name rule -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -StartIPAddress 0.0.0.1
4048
41- Name Type
42- ---- ----
43- rule Microsoft.DBforMySQL/servers/firewallRules
49+ Name StartIPAddress EndIPAddress
50+ ---- -------------- ------------
51+ rule 0.0.0.1 0.0.0.1
4452```
4553
4654This cmdlets create a MySql Firewall Rule use only one parameter StartIPAddress when only one IP needs to be authorized.
4755
56+ ### Example 3: Create a new MySql Firewall Rule to allow all IPs
57+ ``` powershell
58+ PS C:\> New-AzMySqlFirewallRule -Name rule -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -AllowAll
59+
60+ Name StartIPAddress EndIPAddress
61+ ---- -------------- ------------
62+ AllowAll_2020-08-11_18-19-27 0.0.0.0 255.255.255.255
63+ ```
64+
65+ This cmdlets create a new MySql Firewall Rule to allow all IPs.
66+
4867## PARAMETERS
4968
69+ ### -AllowAll
70+ Present to allow all range IPs, from 0.0.0.0 to 255.255.255.255.
71+
72+ ``` yaml
73+ Type : System.Management.Automation.SwitchParameter
74+ Parameter Sets : AllowAll
75+ Aliases :
76+
77+ Required : True
78+ Position : Named
79+ Default value : None
80+ Accept pipeline input : False
81+ Accept wildcard characters : False
82+ ` ` `
83+
5084### -AsJob
5185Run the command as a job
5286
@@ -83,7 +117,7 @@ Must be IPv4 format.
83117
84118` ` ` yaml
85119Type : System.String
86- Parameter Sets : (All)
120+ Parameter Sets : CreateExpanded
87121Aliases :
88122
89123Required : False
@@ -95,13 +129,15 @@ Accept wildcard characters: False
95129
96130### -Name
97131The name of the server firewall rule.
132+ If not specified, the default is undefined.
133+ If AllowAll is present, the default name is AllowAll_yyyy-MM-dd_HH-mm-ss.
98134
99135` ` ` yaml
100136Type : System.String
101137Parameter Sets : (All)
102138Aliases : FirewallRuleName
103139
104- Required : True
140+ Required : False
105141Position : Named
106142Default value : None
107143Accept pipeline input : False
@@ -161,7 +197,7 @@ If range contains one IP, use StartIPAddress only.
161197
162198` ` ` yaml
163199Type : System.String
164- Parameter Sets : (All)
200+ Parameter Sets : CreateExpanded
165201Aliases :
166202
167203Required : True
0 commit comments