Add-AzEventHubIPRule
Hinzufügen einer einzelnen IP-Regel zum NetworkRuleSet des angegebenen Namespaces
Syntax
Add-AzEventHubIPRule
[-ResourceGroupName] <String>
[-Name] <String>
[-IpMask] <String>
[-Action <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-AzEventHubIPRule
[-ResourceGroupName] <String>
[-Name] <String>
[-IpRuleObject] <PSNWRuleSetIpRulesAttributes>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Hinzufügen einer einzelnen IP-Regel zum NetworkRuleSet des angegebenen Namespaces
Beispiele
Beispiel 1
PS C:\> Add-AzEventHubIPRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389 -IpMask "11.22.33.44" -Action Allow
Name : defaultAction : Allow ID : /subscriptions/SubscriptionId/resourceGroups/RSG-TestAzEventhub/providers/Microsoft.Eventhub/namespaces/Eventhub-Namespace-2389/networkRuleSets/default Type : Microsoft.Eventhub/Namespaces/NetworkRuleSet IpRules : {11.22.33.44, Allow} VirtualNetworkRules:
fügen Sie ipRule mit IpMask "11.22.33.44" und "Action Allow for the given namespace" hinzu.
Beispiel 2
PS C:\> Add-AzEventHubIPRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389 -IpRuleObject $ipruleobject
Name : defaultAction : Allow ID : /subscriptions/SubscriptionId/resourceGroups/RSG-TestAzEventhub/providers/Microsoft.Eventhub/namespaces/Eventhub-Namespace-2389/networkRuleSets/default Type : Microsoft.Eventhub/Namespaces/NetworkRuleSet IpRules : {11.22.33.44, Allow} VirtualNetworkRules:
fügen Sie ipRule mit IpMask "11.22.33.44" und "Action Allow for the given namespace" hinzu.
Parameter
-Action
Die IP-Filteraktion
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IpMask
Subnetzressourcen-ID
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IpRuleObject
IPRule-Konfigurationsobjekt, das hinzugefügt werden soll
Type: | Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Namespacename
Type: | String |
Aliases: | NamespaceName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Ressourcengruppenname
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Eingaben
Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes
Ausgaben
Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes