Share via


MockablePolicyInsightsSubscriptionResource.GetQueryResultsForPolicySetDefinitionPolicyStates Method

Definition

Queries policy states for the subscription level policy set definition.

  • Request Path: /subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
  • Operation Id: PolicyStates_ListQueryResultsForPolicySetDefinition
public virtual Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetQueryResultsForPolicySetDefinitionPolicyStates (string policySetDefinitionName, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetQueryResultsForPolicySetDefinitionPolicyStates : string * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
override this.GetQueryResultsForPolicySetDefinitionPolicyStates : string * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
Public Overridable Function GetQueryResultsForPolicySetDefinitionPolicyStates (policySetDefinitionName As String, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of PolicyState)

Parameters

policySetDefinitionName
String

Policy set definition name.

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

policySetDefinitionName is an empty string, and was expected to be non-empty.

policySetDefinitionName is null.

Applies to