PolicyInsightsExtensions.GetPolicyStateQueryResultsAsync 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.
Overloads
GetPolicyStateQueryResultsAsync(SubscriptionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the resources under the subscription.
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResultsAsync(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 GetPolicyStateQueryResultsAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResultsAsync (subscriptionResource As SubscriptionResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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
An async collection of PolicyState that may take multiple service requests to iterate over.
Exceptions
subscriptionResource is null.
Applies to
GetPolicyStateQueryResultsAsync(ManagementGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the resources under the management group.
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResultsAsync(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 GetPolicyStateQueryResultsAsync : Azure.ResourceManager.ManagementGroups.ManagementGroupResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResultsAsync (managementGroupResource As ManagementGroupResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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
An async collection of PolicyState that may take multiple service requests to iterate over.
Exceptions
managementGroupResource is null.
Applies to
GetPolicyStateQueryResultsAsync(PolicyAssignmentResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the policy assignment.
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResultsAsync(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 GetPolicyStateQueryResultsAsync : Azure.ResourceManager.Resources.PolicyAssignmentResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResultsAsync (policyAssignmentResource As PolicyAssignmentResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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
An async collection of PolicyState that may take multiple service requests to iterate over.
Applies to
GetPolicyStateQueryResultsAsync(ResourceGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the resources under the resource group.
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResultsAsync(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 GetPolicyStateQueryResultsAsync : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResultsAsync (resourceGroupResource As ResourceGroupResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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
An async collection of PolicyState that may take multiple service requests to iterate over.
Exceptions
resourceGroupResource is null.
Applies to
GetPolicyStateQueryResultsAsync(SubscriptionPolicyDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the subscription level policy definition.
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResultsAsync(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 GetPolicyStateQueryResultsAsync : Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResultsAsync (subscriptionPolicyDefinitionResource As SubscriptionPolicyDefinitionResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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
An async collection of PolicyState that may take multiple service requests to iterate over.
Applies to
GetPolicyStateQueryResultsAsync(SubscriptionPolicySetDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the subscription level policy set definition.
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResultsAsync(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 GetPolicyStateQueryResultsAsync : Azure.ResourceManager.Resources.SubscriptionPolicySetDefinitionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResultsAsync (subscriptionPolicySetDefinitionResource As SubscriptionPolicySetDefinitionResource, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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
An async collection of PolicyState that may take multiple service requests to iterate over.
Applies to
GetPolicyStateQueryResultsAsync(ArmClient, ResourceIdentifier, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the resource.
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState> GetPolicyStateQueryResultsAsync(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 GetPolicyStateQueryResultsAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * Azure.ResourceManager.PolicyInsights.Models.PolicyStateType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicyState>
<Extension()>
Public Function GetPolicyStateQueryResultsAsync (client As ArmClient, scope As ResourceIdentifier, policyStateType As PolicyStateType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicyState)
Parameters
- 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.