共用方式為


New-AzContainerAppIPSecurityRestrictionRuleObject

建立IPSecurityRestrictionRule的記憶體內部物件。

語法

New-AzContainerAppIPSecurityRestrictionRuleObject
   -Action <String>
   -IPAddressRange <String>
   -Name <String>
   [-Description <String>]
   [<CommonParameters>]

Description

建立IPSecurityRestrictionRule的記憶體內部物件。

範例

範例 1:建立IPSecurityRestrictionRule的記憶體內部物件。

New-AzContainerAppIPSecurityRestrictionRuleObject -Action "Allow" -IPAddressRange "192.168.1.1/32" -Name "Allow work IP A subnet"

Action Description IPAddressRange Name
------ ----------- -------------- ----
Allow              192.168.1.1/32 Allow work IP A subnet

建立IPSecurityRestrictionRule的記憶體內部物件。

參數

-Action

允許或拒絕規則來判斷傳入IP。 注意:規則只能包含 ALL 允許或 ALL 拒絕。

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

-Description

描述要傳送至 container-app 的IP限制規則。 這是選擇性欄位。

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

-IPAddressRange

符合傳入IP位址的CIDR表示法。

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

-Name

IP 限制規則的名稱。

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

輸出

IPSecurityRestrictionRule