Set-AzRelayNamespaceNetworkRuleSet
Update NetworkRuleSet for a Namespace.
Syntax
Set-AzRelayNamespaceNetworkRuleSet
-NamespaceName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-DefaultAction <DefaultAction>]
[-IPRule <INwRuleSetIPRules[]>]
[-PublicNetworkAccess <PublicNetworkAccess>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzRelayNamespaceNetworkRuleSet
-InputObject <IRelayIdentity>
[-DefaultAction <DefaultAction>]
[-IPRule <INwRuleSetIPRules[]>]
[-PublicNetworkAccess <PublicNetworkAccess>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update NetworkRuleSet for a Namespace.
Examples
Example 1: Update NetworkRuleSet for a Relay Namespace
$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"
Set-AzRelayNamespaceNetworkRuleSet -ResourceGroupName Relay-ServiceBus-EastUS -NamespaceName namespace-pwsh01 -DefaultAction 'Deny' -IPRule $rules | Format-List
DefaultAction : Deny
IPRule : {{
"ipMask": "1.1.1.1",
"action": "Allow"
}, {
"ipMask": "1.1.1.2",
"action": "Allow"
}, {
"ipMask": "1.1.1.3",
"action": "Allow"
}}
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Relay-ServiceBus-EastUS/providers/Microsoft.Relay/namespaces/namespace-pwsh01/networkRuleSets
/default
Name : default
PublicNetworkAccess : Enabled
ResourceGroupName : Relay-ServiceBus-EastUS
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/Namespaces/NetworkRuleSets
This cmdlet update NetworkRuleSet for a Relay Namespace. Updates the specified NetworkRuleSet with a new IPRule in the specified namespace.
Example 2: Update NetworkRuleSet for a Relay Namespace
$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"
Get-AzRelayNamespaceNetworkRuleSet -ResourceGroupName Relay-ServiceBus-EastUS -NamespaceName namespace-pwsh01 | Set-AzRelayNamespaceNetworkRuleSet -DefaultAction 'Deny' -IPRule $rules -PublicNetworkAccess 'Enabled' | Format-List
DefaultAction : Deny
IPRule : {{
"ipMask": "1.1.1.1",
"action": "Allow"
}, {
"ipMask": "1.1.1.2",
"action": "Allow"
}, {
"ipMask": "1.1.1.3",
"action": "Allow"
}}
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Relay-ServiceBus-EastUS/providers/Microsoft.Relay/namespaces/namespace-pwsh01/networkRuleSets
/default
Name : default
PublicNetworkAccess : Enabled
ResourceGroupName : Relay-ServiceBus-EastUS
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/Namespaces/NetworkRuleSets
This cmdlet update the specified NetworkRuleSet for a Relay Namespace.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultAction
Default Action for Network Rule Set
Type: | DefaultAction |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IRelayIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IPRule
List of IpRules To construct, see NOTES section for IPRULE properties and create a hash table.
Type: | INwRuleSetIPRules[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NamespaceName
The namespace name
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicNetworkAccess
This determines if traffic is allowed over public network. By default it is enabled
Type: | PublicNetworkAccess |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name of the Resource group within the Azure subscription.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |