共用方式為


NetworkExtensions.GetNetworkSecurityGroups Method

Definition

Overloads

GetNetworkSecurityGroups(ResourceGroupResource)

Gets a collection of NetworkSecurityGroupResources in the ResourceGroupResource. MockingTo mock this method, please mock GetNetworkSecurityGroups() instead.

GetNetworkSecurityGroups(SubscriptionResource, CancellationToken)

Gets all network security groups in a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups
  • Operation Id: NetworkSecurityGroups_ListAll
  • Default Api Version: 2024-03-01
  • Resource: NetworkSecurityGroupResource

GetNetworkSecurityGroups(ResourceGroupResource)

Source:
NetworkExtensions.cs
Source:
NetworkExtensions.cs

Gets a collection of NetworkSecurityGroupResources in the ResourceGroupResource. MockingTo mock this method, please mock GetNetworkSecurityGroups() instead.

public static Azure.ResourceManager.Network.NetworkSecurityGroupCollection GetNetworkSecurityGroups (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource);
static member GetNetworkSecurityGroups : Azure.ResourceManager.Resources.ResourceGroupResource -> Azure.ResourceManager.Network.NetworkSecurityGroupCollection
<Extension()>
Public Function GetNetworkSecurityGroups (resourceGroupResource As ResourceGroupResource) As NetworkSecurityGroupCollection

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of NetworkSecurityGroupResources and their operations over a NetworkSecurityGroupResource.

Exceptions

resourceGroupResource is null.

Applies to

GetNetworkSecurityGroups(SubscriptionResource, CancellationToken)

Source:
NetworkExtensions.cs
Source:
NetworkExtensions.cs

Gets all network security groups in a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups
  • Operation Id: NetworkSecurityGroups_ListAll
  • Default Api Version: 2024-03-01
  • Resource: NetworkSecurityGroupResource
public static Azure.Pageable<Azure.ResourceManager.Network.NetworkSecurityGroupResource> GetNetworkSecurityGroups (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default);
static member GetNetworkSecurityGroups : Azure.ResourceManager.Resources.SubscriptionResource * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Network.NetworkSecurityGroupResource>
<Extension()>
Public Function GetNetworkSecurityGroups (subscriptionResource As SubscriptionResource, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of NetworkSecurityGroupResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of NetworkSecurityGroupResource that may take multiple service requests to iterate over.

Exceptions

subscriptionResource is null.

Applies to