編集

次の方法で共有


New-AzRelayNetworkRuleSetIPRuleObject

Create an in-memory object for NwRuleSetIPRules.

Syntax

New-AzRelayNetworkRuleSetIPRuleObject
   [-Action <NetworkRuleIPAction>]
   [-IPMask <String>]
   [<CommonParameters>]

Description

Create an in-memory object for NwRuleSetIPRules.

Examples

Example 1: Create an in-memory object for NwRuleSetIPRules

$rules = @()
$rules += New-AzRelayNetworkRuleSetIPRuleObject -Action 'Allow' -IPMask "1.1.1.1"
$rules += New-AzRelayNetworkRuleSetIPRuleObject -Action 'Allow' -IPMask "1.1.1.2"
$rules += New-AzRelayNetworkRuleSetIPRuleObject -Action 'Allow' -IPMask "1.1.1.3"

This cmdlet creates an in-memory object for NwRuleSetIPRules as the value of the IPRule parameter in New-AzRelayNamespaceNetworkRuleSet.

Parameters

-Action

The IP Filter Action.

Type:NetworkRuleIPAction
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPMask

IP Mask.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

NwRuleSetIPRules