Share via


OperationalInsightsExtensions.GetOperationalInsightsWorkspacesAsync Method

Definition

Gets the workspaces in a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces
  • Operation Id: Workspaces_List
  • Default Api Version: 2022-10-01
  • Resource: OperationalInsightsWorkspaceResource
public static Azure.AsyncPageable<Azure.ResourceManager.OperationalInsights.OperationalInsightsWorkspaceResource> GetOperationalInsightsWorkspacesAsync (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default);
static member GetOperationalInsightsWorkspacesAsync : Azure.ResourceManager.Resources.SubscriptionResource * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.OperationalInsights.OperationalInsightsWorkspaceResource>
<Extension()>
Public Function GetOperationalInsightsWorkspacesAsync (subscriptionResource As SubscriptionResource, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of OperationalInsightsWorkspaceResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

subscriptionResource is null.

Applies to