共用方式為


PolicyInsightsExtensions.GetPolicyEventQueryResultsAsync Method

Definition

Overloads

GetPolicyEventQueryResultsAsync(SubscriptionResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Queries policy events for the resources under the subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForSubscription
GetPolicyEventQueryResultsAsync(SubscriptionPolicySetDefinitionResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Queries policy events for the subscription level policy set definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForPolicySetDefinition
GetPolicyEventQueryResultsAsync(SubscriptionPolicyDefinitionResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Queries policy events for the subscription level policy definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForPolicyDefinition
GetPolicyEventQueryResultsAsync(ArmClient, ResourceIdentifier, PolicyEventType, PolicyQuerySettings, CancellationToken)

Queries policy events for the resource.

  • Request Path: /{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForResource
GetPolicyEventQueryResultsAsync(PolicyAssignmentResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Queries policy events for the subscription level or resource group level policy assignment.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForResourceGroupLevelPolicyAssignment
GetPolicyEventQueryResultsAsync(ManagementGroupResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Queries policy events for the resources under the management group.

  • Request Path: /providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForManagementGroup
GetPolicyEventQueryResultsAsync(ResourceGroupResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Queries policy events for the resources under the resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForResourceGroup

GetPolicyEventQueryResultsAsync(SubscriptionResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy events for the resources under the subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForSubscription
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent> GetPolicyEventQueryResultsAsync (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyEventType policyEventType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyEventQueryResultsAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyEventType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent>
<Extension()>
Public Function GetPolicyEventQueryResultsAsync (subscriptionResource As SubscriptionResource, policyEventType As PolicyEventType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyEvent)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

policyEventType
PolicyEventType

The name of the virtual resource under PolicyEvents resource type; only "default" is allowed.

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

subscriptionResource is null.

Applies to

GetPolicyEventQueryResultsAsync(SubscriptionPolicySetDefinitionResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy events for the subscription level policy set definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForPolicySetDefinition
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent> GetPolicyEventQueryResultsAsync (this Azure.ResourceManager.Resources.SubscriptionPolicySetDefinitionResource subscriptionPolicySetDefinitionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyEventType policyEventType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyEventQueryResultsAsync : Azure.ResourceManager.Resources.SubscriptionPolicySetDefinitionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyEventType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent>
<Extension()>
Public Function GetPolicyEventQueryResultsAsync (subscriptionPolicySetDefinitionResource As SubscriptionPolicySetDefinitionResource, policyEventType As PolicyEventType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyEvent)

Parameters

subscriptionPolicySetDefinitionResource
SubscriptionPolicySetDefinitionResource

The SubscriptionPolicySetDefinitionResource instance the method will execute against.

policyEventType
PolicyEventType

The name of the virtual resource under PolicyEvents resource type; only "default" is allowed.

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Applies to

GetPolicyEventQueryResultsAsync(SubscriptionPolicyDefinitionResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy events for the subscription level policy definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForPolicyDefinition
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent> GetPolicyEventQueryResultsAsync (this Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource subscriptionPolicyDefinitionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyEventType policyEventType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyEventQueryResultsAsync : Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyEventType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent>
<Extension()>
Public Function GetPolicyEventQueryResultsAsync (subscriptionPolicyDefinitionResource As SubscriptionPolicyDefinitionResource, policyEventType As PolicyEventType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyEvent)

Parameters

subscriptionPolicyDefinitionResource
SubscriptionPolicyDefinitionResource

The SubscriptionPolicyDefinitionResource instance the method will execute against.

policyEventType
PolicyEventType

The name of the virtual resource under PolicyEvents resource type; only "default" is allowed.

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Applies to

GetPolicyEventQueryResultsAsync(ArmClient, ResourceIdentifier, PolicyEventType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy events for the resource.

  • Request Path: /{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForResource
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent> GetPolicyEventQueryResultsAsync (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.PolicyInsights.Models.PolicyEventType policyEventType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyEventQueryResultsAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * Azure.ResourceManager.PolicyInsights.Models.PolicyEventType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent>
<Extension()>
Public Function GetPolicyEventQueryResultsAsync (client As ArmClient, scope As ResourceIdentifier, policyEventType As PolicyEventType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyEvent)

Parameters

client
ArmClient

The ArmClient instance the method will execute against.

scope
ResourceIdentifier

The scope that the resource will apply against.

policyEventType
PolicyEventType

The name of the virtual resource under PolicyEvents resource type; only "default" is allowed.

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

client is null.

Applies to

GetPolicyEventQueryResultsAsync(PolicyAssignmentResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy events for the subscription level or resource group level policy assignment.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForResourceGroupLevelPolicyAssignment
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent> GetPolicyEventQueryResultsAsync (this Azure.ResourceManager.Resources.PolicyAssignmentResource policyAssignmentResource, Azure.ResourceManager.PolicyInsights.Models.PolicyEventType policyEventType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyEventQueryResultsAsync : Azure.ResourceManager.Resources.PolicyAssignmentResource * Azure.ResourceManager.PolicyInsights.Models.PolicyEventType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent>
<Extension()>
Public Function GetPolicyEventQueryResultsAsync (policyAssignmentResource As PolicyAssignmentResource, policyEventType As PolicyEventType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyEvent)

Parameters

policyAssignmentResource
PolicyAssignmentResource

The PolicyAssignmentResource instance the method will execute against.

policyEventType
PolicyEventType

The name of the virtual resource under PolicyEvents resource type; only "default" is allowed.

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Applies to

GetPolicyEventQueryResultsAsync(ManagementGroupResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy events for the resources under the management group.

  • Request Path: /providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForManagementGroup
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent> GetPolicyEventQueryResultsAsync (this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.ResourceManager.PolicyInsights.Models.PolicyEventType policyEventType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyEventQueryResultsAsync : Azure.ResourceManager.ManagementGroups.ManagementGroupResource * Azure.ResourceManager.PolicyInsights.Models.PolicyEventType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent>
<Extension()>
Public Function GetPolicyEventQueryResultsAsync (managementGroupResource As ManagementGroupResource, policyEventType As PolicyEventType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyEvent)

Parameters

managementGroupResource
ManagementGroupResource

The ManagementGroupResource instance the method will execute against.

policyEventType
PolicyEventType

The name of the virtual resource under PolicyEvents resource type; only "default" is allowed.

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

managementGroupResource is null.

Applies to

GetPolicyEventQueryResultsAsync(ResourceGroupResource, PolicyEventType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy events for the resources under the resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults
  • Operation Id: PolicyEvents_ListQueryResultsForResourceGroup
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent> GetPolicyEventQueryResultsAsync (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.PolicyInsights.Models.PolicyEventType policyEventType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyEventQueryResultsAsync : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.ResourceManager.PolicyInsights.Models.PolicyEventType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyEvent>
<Extension()>
Public Function GetPolicyEventQueryResultsAsync (resourceGroupResource As ResourceGroupResource, policyEventType As PolicyEventType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyEvent)

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

policyEventType
PolicyEventType

The name of the virtual resource under PolicyEvents resource type; only "default" is allowed.

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

resourceGroupResource is null.

Applies to