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(ManagementGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken) |
Queries policy states for the resources under the management group.
|
GetPolicyStateQueryResultsAsync(PolicyAssignmentResource, PolicyStateType, PolicyQuerySettings, CancellationToken) |
Queries policy states for the subscription level or resource group level policy assignment.
|
GetPolicyStateQueryResultsAsync(ResourceGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken) |
Queries policy states for the resources under the resource group.
|
GetPolicyStateQueryResultsAsync(SubscriptionPolicyDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken) |
Queries policy states for the subscription level policy definition.
|
GetPolicyStateQueryResultsAsync(SubscriptionPolicySetDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken) |
Queries policy states for the subscription level policy set definition.
|
GetPolicyStateQueryResultsAsync(SubscriptionResource, PolicyStateType, PolicyQuerySettings, CancellationToken) |
Queries policy states for the resources under the subscription.
|
GetPolicyStateQueryResultsAsync(ArmClient, ResourceIdentifier, PolicyStateType, PolicyQuerySettings, CancellationToken) |
Queries policy states for the resource.
|
GetPolicyStateQueryResultsAsync(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.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 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.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.
- Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
- Operation Id: PolicyStates_ListQueryResultsForResourceGroup
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.
- Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
- Operation Id: PolicyStates_ListQueryResultsForPolicyDefinition
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.
- Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
- Operation Id: PolicyStates_ListQueryResultsForPolicySetDefinition
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(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.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(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.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.