Udostępnij za pośrednictwem


PolicyInsightsExtensions.GetPolicyStateQueryResults Method

Definition

Overloads

GetPolicyStateQueryResults(SubscriptionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Queries policy states for the resources under the subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForSubscription
GetPolicyStateQueryResults(ArmClient, ResourceIdentifier, PolicyStateType, PolicyQuerySettings, CancellationToken)

Queries policy states for the resource.

  • Request Path: /{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForResource
GetPolicyStateQueryResults(SubscriptionPolicySetDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Queries policy states for the subscription level policy set definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForPolicySetDefinition
GetPolicyStateQueryResults(SubscriptionPolicyDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Queries policy states for the subscription level policy definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForPolicyDefinition
GetPolicyStateQueryResults(ResourceGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Queries policy states for the resources under the resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForResourceGroup
GetPolicyStateQueryResults(PolicyAssignmentResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

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

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForResourceGroupLevelPolicyAssignment
GetPolicyStateQueryResults(ManagementGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Queries policy states for the resources under the management group.

  • Request Path: /providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForManagementGroup

GetPolicyStateQueryResults(SubscriptionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy states for the resources under the subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForSubscription
public static Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResults (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyStateQueryResults : Azure.ResourceManager.Resources.SubscriptionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResults (subscriptionResource As SubscriptionResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of PolicyState)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

policyStateType
PolicyStateType

The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

subscriptionResource is null.

Applies to

GetPolicyStateQueryResults(ArmClient, ResourceIdentifier, PolicyStateType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy states for the resource.

  • Request Path: /{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForResource
public static Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResults (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyStateQueryResults : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResults (client As ArmClient, scope As ResourceIdentifier, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of PolicyState)

Parameters

client
ArmClient

The ArmClient instance the method will execute against.

scope
ResourceIdentifier

The scope that the resource will apply against.

policyStateType
PolicyStateType

The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

client is null.

Applies to

GetPolicyStateQueryResults(SubscriptionPolicySetDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy states for the subscription level policy set definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForPolicySetDefinition
public static Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResults (this Azure.ResourceManager.Resources.SubscriptionPolicySetDefinitionResource subscriptionPolicySetDefinitionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyStateQueryResults : Azure.ResourceManager.Resources.SubscriptionPolicySetDefinitionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResults (subscriptionPolicySetDefinitionResource As SubscriptionPolicySetDefinitionResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of PolicyState)

Parameters

subscriptionPolicySetDefinitionResource
SubscriptionPolicySetDefinitionResource

The SubscriptionPolicySetDefinitionResource instance the method will execute against.

policyStateType
PolicyStateType

The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Applies to

GetPolicyStateQueryResults(SubscriptionPolicyDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy states for the subscription level policy definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForPolicyDefinition
public static Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResults (this Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource subscriptionPolicyDefinitionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyStateQueryResults : Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResults (subscriptionPolicyDefinitionResource As SubscriptionPolicyDefinitionResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of PolicyState)

Parameters

subscriptionPolicyDefinitionResource
SubscriptionPolicyDefinitionResource

The SubscriptionPolicyDefinitionResource instance the method will execute against.

policyStateType
PolicyStateType

The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Applies to

GetPolicyStateQueryResults(ResourceGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy states for the resources under the resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForResourceGroup
public static Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResults (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyStateQueryResults : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResults (resourceGroupResource As ResourceGroupResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of PolicyState)

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

policyStateType
PolicyStateType

The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

resourceGroupResource is null.

Applies to

GetPolicyStateQueryResults(PolicyAssignmentResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

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

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForResourceGroupLevelPolicyAssignment
public static Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResults (this Azure.ResourceManager.Resources.PolicyAssignmentResource policyAssignmentResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyStateQueryResults : Azure.ResourceManager.Resources.PolicyAssignmentResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResults (policyAssignmentResource As PolicyAssignmentResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of PolicyState)

Parameters

policyAssignmentResource
PolicyAssignmentResource

The PolicyAssignmentResource instance the method will execute against.

policyStateType
PolicyStateType

The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Applies to

GetPolicyStateQueryResults(ManagementGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken)

Source:
PolicyInsightsExtensions.cs
Source:
PolicyInsightsExtensions.cs

Queries policy states for the resources under the management group.

  • Request Path: /providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForManagementGroup
public static Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResults (this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyStateQueryResults : Azure.ResourceManager.ManagementGroups.ManagementGroupResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResults (managementGroupResource As ManagementGroupResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of PolicyState)

Parameters

managementGroupResource
ManagementGroupResource

The ManagementGroupResource instance the method will execute against.

policyStateType
PolicyStateType

The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).

policyQuerySettings
PolicyQuerySettings

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

managementGroupResource is null.

Applies to