Share via


ResourceGroupCollection.GetAllAsync Method

Definition

Gets all the resource groups for a subscription.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups
  • Operation Id: ResourceGroups_List
  • Default Api Version: 2022-09-01
  • Resource: ResourceGroupResource
public virtual Azure.AsyncPageable<Azure.ResourceManager.Resources.ResourceGroupResource> GetAllAsync (string filter = default, int? top = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAllAsync : string * Nullable<int> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Resources.ResourceGroupResource>
override this.GetAllAsync : string * Nullable<int> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Resources.ResourceGroupResource>
Public Overridable Function GetAllAsync (Optional filter As String = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of ResourceGroupResource)

Parameters

filter
String

The filter to apply on the operation.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'.

top
Nullable<Int32>

The number of results to return. If null is passed, returns all resource groups.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

An async collection of ResourceGroupResource that may take multiple service requests to iterate over.

Applies to