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
C#
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);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

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
C#
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);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

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
C#
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);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

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
C#
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);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

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
C#
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);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

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
C#
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);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

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
C#
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);

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

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview