共用方式為


Update-AzMySqlFlexibleServerFirewallRule

更新現有的防火牆規則。

語法

Update-AzMySqlFlexibleServerFirewallRule
      -Name <String>
      -ResourceGroupName <String>
      -ServerName <String>
      [-SubscriptionId <String>]
      -EndIPAddress <String>
      -StartIPAddress <String>
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzMySqlFlexibleServerFirewallRule
      -Name <String>
      -ResourceGroupName <String>
      -ServerName <String>
      [-SubscriptionId <String>]
      -ClientIPAddress <String>
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzMySqlFlexibleServerFirewallRule
      -InputObject <IMySqlIdentity>
      -EndIPAddress <String>
      -StartIPAddress <String>
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzMySqlFlexibleServerFirewallRule
      -InputObject <IMySqlIdentity>
      -ClientIPAddress <String>
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

更新現有的防火牆規則。

範例

範例 1:依名稱更新 MySql 防火牆規則

Update-AzMySqlFlexibleServerFirewallRule -Name rule -ResourceGroupName PowershellMySqlTest -ServerName mysql-test -EndIPAddress 0.0.0.3 -StartIPAddress 0.0.0.2

Name StartIPAddress EndIPAddress
---- -------------- ------------
rule 0.0.0.2        0.0.0.3

此 Cmdlet 會依名稱更新 MySql 防火牆規則。

範例 2:依身分識別更新 MySql 防火牆規則。

$ID = "/subscriptions/<SubscriptionId>/resourceGroups/PowershellMySqlTest/providers/Microsoft.DBForMySql/flexibleServers/mysql-test/firewallRules/rule"
Update-AzMySqlFlexibleServerFirewallRule -InputObject $ID -EndIPAddress 0.0.0.3 -StartIPAddress 0.0.0.2

Name StartIPAddress EndIPAddress
---- -------------- ------------
rule 0.0.0.2        0.0.0.3

這些 Cmdlet 會依身分識別更新 MySql 防火牆規則。

參數

-AsJob

以作業身分執行命令

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ClientIPAddress

用戶端指定的伺服器防火牆規則單一IP。 必須是 IPv4 格式。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:PSObject
別名:AzureRMContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-EndIPAddress

伺服器防火牆規則的結束IP位址。 必須是 IPv4 格式。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

類型:IMySqlIdentity
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

伺服器防火牆規則的名稱。

類型:String
別名:FirewallRuleName
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-NoWait

以異步方式執行命令

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

資源群組的名稱。 名稱不區分大小寫。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ServerName

伺服器的名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-StartIPAddress

伺服器防火牆規則的起始IP位址。 必須是 IPv4 格式。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-SubscriptionId

目標訂用帳戶的標識碼。

類型:String
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

IMySqlIdentity

輸出

IFirewallRuleAutoGenerated