MockablePolicyInsightsSubscriptionResource.GetQueryResultsForPolicyDefinitionPolicyStatesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Queries policy states for the subscription level policy definition.
- Request Path: /subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
- Operation Id: PolicyStates_ListQueryResultsForPolicyDefinition
public virtual Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetQueryResultsForPolicyDefinitionPolicyStatesAsync (string policyDefinitionName, Azure.ResourceManager.PolicyInsights.Models.PolicyStateType policyStateType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetQueryResultsForPolicyDefinitionPolicyStatesAsync : string * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
override this.GetQueryResultsForPolicyDefinitionPolicyStatesAsync : string * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
Public Overridable Function GetQueryResultsForPolicyDefinitionPolicyStatesAsync (policyDefinitionName As String, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyState)
Parameters
- policyDefinitionName
- String
Policy 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
An async collection of PolicyState that may take multiple service requests to iterate over.
Exceptions
policyDefinitionName
is an empty string, and was expected to be non-empty.
policyDefinitionName
is null.
Applies to
Azure SDK for .NET