Skip to content

Commit ea2ff78

Browse files
committed
Added CLI and PS sections
1 parent a9c4d63 commit ea2ff78

File tree

4 files changed

+32
-10
lines changed

4 files changed

+32
-10
lines changed

articles/event-hubs/event-hubs-ip-filtering.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,17 @@ To deploy the template, follow the instructions for [Azure Resource Manager][lnk
147147
> [!IMPORTANT]
148148
> If there are no IP and virtual network rules, all the traffic flows into the namespace even if you set the `defaultAction` to `deny`. The namespace can be accessed over the public internet (using the access key). Specify at least one IP rule or virtual network rule for the namespace to allow traffic only from the specified IP addresses or subnet of a virtual network.
149149
150+
## Use Azure CLI
151+
Use [`az eventhubs namespace network-rule`](/cli/azure/eventhubs/namespace/network-rule) add, list, update, and remove commands to manage IP firewall rules for an Event Hubs namespace.
152+
153+
## Use Azure PowerShell
154+
Use the following Azure PowerShell commands to add, list, remove, update, and delete IP firewall rules.
155+
156+
- [`Add-AzEventHubIPRule`](/powershell/module/az.eventhub/add-azeventhubiprule) to add an IP firewall rule.
157+
- [`New-AzEventHubIPRuleConfig`](/powershell/module/az.eventhub/new-azeventhubipruleconfig) and [`Set-AzEventHubNetworkRuleSet`](/powershell/module/az.eventhub/set-azeventhubnetworkruleset) together to add an IP firewall rule
158+
- [`Remove-AzEventHubIPRule`](/powershell/module/az.eventhub/remove-azeventhubiprule) to remove an IP firewall rule.
159+
160+
150161
## Default action and public network access
151162

152163
### REST API

articles/event-hubs/event-hubs-service-endpoints.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This section shows you how to use Azure portal to add a virtual network service
4242
1. On the **Networking** page, for **Public network access**, you can set one of the three following options. Choose **Selected networks** option to allow access only from specific virtual networks.
4343

4444
Here are more details about options available in the **Public network access** page:
45-
- **Disabled**. This option disables any public access to the namespace. The namespace will be accessible only through [private endpoints](private-link-service.md).
45+
- **Disabled**. This option disables any public access to the namespace. The namespace is accessible only through [private endpoints](private-link-service.md).
4646
- **Selected networks**. This option enables public access to the namespace using an access key from selected networks.
4747

4848
> [!IMPORTANT]
@@ -55,7 +55,7 @@ This section shows you how to use Azure portal to add a virtual network service
5555

5656
> [!IMPORTANT]
5757
> If you choose **Selected networks**, add at least one IP firewall rule or a virtual network that will have access to the namespace. Choose **Disabled** if you want to restrict all traffic to this namespace over [private endpoints](private-link-service.md) only.
58-
3. Select the virtual network from the list of virtual networks, and then pick the **subnet**. You have to enable the service endpoint before adding the virtual network to the list. If the service endpoint isn't enabled, the portal will prompt you to enable it.
58+
3. Select the virtual network from the list of virtual networks, and then pick the **subnet**. You have to enable the service endpoint before adding the virtual network to the list. If the service endpoint isn't enabled, the portal prompts you to enable it.
5959

6060
:::image type="content" source="./media/event-hubs-tutorial-vnet-and-firewalls/select-subnet.png" lightbox="./media/event-hubs-tutorial-vnet-and-firewalls/select-subnet.png" alt-text="Image showing the selection of a subnet.":::
6161
4. You should see the following successful message after the service endpoint for the subnet is enabled for **Microsoft.EventHub**. Select **Add** at the bottom of the page to add the network.
@@ -187,6 +187,17 @@ To deploy the template, follow the instructions for [Azure Resource Manager][lnk
187187
> [!IMPORTANT]
188188
> If there are no IP and virtual network rules, all the traffic flows into the namespace even if you set the `defaultAction` to `deny`. The namespace can be accessed over the public internet (using the access key). Specify at least one IP rule or virtual network rule for the namespace to allow traffic only from the specified IP addresses or subnet of a virtual network.
189189
190+
## Use Azure CLI
191+
Use [`az eventhubs namespace network-rule`](/cli/azure/eventhubs/namespace/network-rule) add, list, update, and remove commands to manage virtual network rules for a Service Bus namespace.
192+
193+
## Use Azure PowerShell
194+
Use the following Azure PowerShell commands to add, list, remove, update, and delete network rules for a Service Bus namespace.
195+
196+
- [`Add-AzEventHubVirtualNetworkRule`](/powershell/module/az.eventhub/add-azeventhubvirtualnetworkrule) to add a virtual network rule.
197+
- [`New-AzEventHubVirtualNetworkRuleConfig`](/powershell/module/az.eventhub/new-azeventhubipruleconfig) and [`Set-AzEventHubNetworkRuleSet`](/powershell/module/az.eventhub/set-azeventhubnetworkruleset) together to add a virtual network rule.
198+
- [`Remove-AzEventHubVirtualNetworkRule`](/powershell/module/az.eventhub/remove-azeventhubvirtualnetworkrule) to remove s virtual network rule.
199+
200+
190201
## default action and public network access
191202

192203
### REST API

articles/service-bus-messaging/service-bus-ip-filtering.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ To deploy the template, follow the instructions for [Azure Resource Manager][lnk
137137
> If there are no IP and virtual network rules, all the traffic flows into the namespace even if you set the `defaultAction` to `deny`. The namespace can be accessed over the public internet (using the access key). Specify at least one IP rule or virtual network rule for the namespace to allow traffic only from the specified IP addresses or subnet of a virtual network.
138138
139139
## Use Azure CLI
140-
Use [az servicebus namespace network-rule](/cli/azure/servicebus/namespace/network-rule) add, list, update, and remove commands to manage IP firewall rules for a Service Bus namespace.
140+
Use [`az servicebus namespace network-rule`](/cli/azure/servicebus/namespace/network-rule) add, list, update, and remove commands to manage IP firewall rules for a Service Bus namespace.
141141

142142
## Use Azure PowerShell
143143
Use the following Azure PowerShell commands to add, list, remove, update, and delete IP firewall rules.
144144

145-
- [Add-AzServiceBusIPRule](/powershell/module/az.servicebus/add-azservicebusiprule) to add an IP firewall rule.
146-
- [New-AzServiceBusIPRuleConfig](/powershell/module/az.servicebus/new-azservicebusipruleconfig) and [Set-AzServiceBusNetworkRuleSet](/powershell/module/az.servicebus/set-azservicebusnetworkruleset) together to add an IP firewall rule
147-
- [Remove-AzServiceBusIPRule](/powershell/module/az.servicebus/remove-azservicebusiprule) to remove an IP firewall rule.
145+
- [`Add-AzServiceBusIPRule`](/powershell/module/az.servicebus/add-azservicebusiprule) to add an IP firewall rule.
146+
- [`New-AzServiceBusIPRuleConfig`](/powershell/module/az.servicebus/new-azservicebusipruleconfig) and [`Set-AzServiceBusNetworkRuleSet`](/powershell/module/az.servicebus/set-azservicebusnetworkruleset) together to add an IP firewall rule
147+
- [`Remove-AzServiceBusIPRule`](/powershell/module/az.servicebus/remove-azservicebusiprule) to remove an IP firewall rule.
148148

149149
## default action and public network access
150150

articles/service-bus-messaging/service-bus-service-endpoints.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ To deploy the template, follow the instructions for [Azure Resource Manager][lnk
208208
> If there are no IP and virtual network rules, all the traffic flows into the namespace even if you set the `defaultAction` to `deny`. The namespace can be accessed over the public internet (using the access key). Specify at least one IP rule or virtual network rule for the namespace to allow traffic only from the specified IP addresses or subnet of a virtual network.
209209
210210
## Use Azure CLI
211-
Use [az servicebus namespace network-rule](/cli/azure/servicebus/namespace/network-rule) add, list, update, and remove commands to manage virtual network rules for a Service Bus namespace.
211+
Use [`az servicebus namespace network-rule`](/cli/azure/servicebus/namespace/network-rule) add, list, update, and remove commands to manage virtual network rules for a Service Bus namespace.
212212

213213
## Use Azure PowerShell
214214
Use the following Azure PowerShell commands to add, list, remove, update, and delete network rules for a Service Bus namespace.
215215

216-
- [Add-AzServiceBusVirtualNetworkRule](/powershell/module/az.servicebus/add-azservicebusvirtualnetworkrule) to add a virtual network rule.
217-
- [New-AzServiceBusVirtualNetworkRuleConfig](/powershell/module/az.servicebus/new-azservicebusipruleconfig) and [Set-AzServiceBusNetworkRuleSet](/powershell/module/az.servicebus/set-azservicebusnetworkruleset) together to add a virtual network rule.
218-
- [Remove-AzServiceBusVirtualNetworkRule](https://learn.microsoft.com/en-us/powershell/module/az.servicebus/remove-azservicebusvirtualnetworkrule) to remove s virtual network rule.
216+
- [`Add-AzServiceBusVirtualNetworkRule`](/powershell/module/az.servicebus/add-azservicebusvirtualnetworkrule) to add a virtual network rule.
217+
- [`New-AzServiceBusVirtualNetworkRuleConfig`](/powershell/module/az.servicebus/new-azservicebusipruleconfig) and [`Set-AzServiceBusNetworkRuleSet`](/powershell/module/az.servicebus/set-azservicebusnetworkruleset) together to add a virtual network rule.
218+
- [`Remove-AzServiceBusVirtualNetworkRule`](/powershell/module/az.servicebus/remove-azservicebusvirtualnetworkrule) to remove s virtual network rule.
219219

220220

221221
## default action and public network access

0 commit comments

Comments
 (0)