PolicyInsightsExtensions.GetPolicyStateQueryResults 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
GetPolicyStateQueryResults(ResourceGroupResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the resources under the resource group.
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(ArmClient, ResourceIdentifier, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the resource.
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
- 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(SubscriptionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the resources under the subscription.
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(SubscriptionPolicySetDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the subscription level policy set definition.
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(PolicyAssignmentResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the policy assignment.
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.
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
GetPolicyStateQueryResults(SubscriptionPolicyDefinitionResource, PolicyStateType, PolicyQuerySettings, CancellationToken)
- Source:
- PolicyInsightsExtensions.cs
- Source:
- PolicyInsightsExtensions.cs
Queries policy states for the subscription level policy definition.
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.