你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

PolicyInsightsExtensions.SummarizePolicyStatesAsync 方法

定义

重载

SummarizePolicyStatesAsync(ArmClient, ResourceIdentifier, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总资源的策略状态。

  • 请求路径/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForResource
SummarizePolicyStatesAsync(SubscriptionResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总订阅下资源的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForSubscription
SummarizePolicyStatesAsync(SubscriptionPolicySetDefinitionResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总订阅级别策略集定义的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForPolicySetDefinition
SummarizePolicyStatesAsync(ManagementGroupResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总管理组下资源的策略状态。

  • 请求路径/提供程序/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForManagementGroup
SummarizePolicyStatesAsync(ResourceGroupResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总资源组下资源的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForResourceGroup
SummarizePolicyStatesAsync(PolicyAssignmentResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总订阅级别或资源组级别策略分配的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForResourceGroupLevelPolicyAssignment
SummarizePolicyStatesAsync(SubscriptionPolicyDefinitionResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总订阅级别策略定义的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForPolicyDefinition

SummarizePolicyStatesAsync(ArmClient, ResourceIdentifier, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总资源的策略状态。

  • 请求路径/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForResource
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary> SummarizePolicyStatesAsync (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType policyStateSummaryType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member SummarizePolicyStatesAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary>
<Extension()>
Public Function SummarizePolicyStatesAsync (client As ArmClient, scope As ResourceIdentifier, policyStateSummaryType As PolicyStateSummaryType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicySummary)

参数

client
ArmClient

方法 ArmClient 将对其执行的实例。

scope
ResourceIdentifier

资源将应用于的范围。

policyStateSummaryType
PolicyStateSummaryType

“PolicyStates”下用于汇总操作的资源类型下的虚拟资源。 在给定的时间范围内,“latest”表示 () 的最新策略状态,是唯一允许的值。

policyQuerySettings
PolicyQuerySettings

参数组。

cancellationToken
CancellationToken

要使用的取消标记。

返回

适用于

SummarizePolicyStatesAsync(SubscriptionResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总订阅下资源的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForSubscription
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary> SummarizePolicyStatesAsync (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType policyStateSummaryType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member SummarizePolicyStatesAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary>
<Extension()>
Public Function SummarizePolicyStatesAsync (subscriptionResource As SubscriptionResource, policyStateSummaryType As PolicyStateSummaryType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicySummary)

参数

subscriptionResource
SubscriptionResource

方法 SubscriptionResource 将对其执行的实例。

policyStateSummaryType
PolicyStateSummaryType

“PolicyStates”下用于汇总操作的资源类型下的虚拟资源。 在给定的时间范围内,“latest”表示 () 的最新策略状态,是唯一允许的值。

policyQuerySettings
PolicyQuerySettings

参数组。

cancellationToken
CancellationToken

要使用的取消标记。

返回

的异步集合 PolicySummary ,可能需要多个服务请求进行迭代。

适用于

SummarizePolicyStatesAsync(SubscriptionPolicySetDefinitionResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总订阅级别策略集定义的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForPolicySetDefinition
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary> SummarizePolicyStatesAsync (this Azure.ResourceManager.Resources.SubscriptionPolicySetDefinitionResource subscriptionPolicySetDefinitionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType policyStateSummaryType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member SummarizePolicyStatesAsync : Azure.ResourceManager.Resources.SubscriptionPolicySetDefinitionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary>
<Extension()>
Public Function SummarizePolicyStatesAsync (subscriptionPolicySetDefinitionResource As SubscriptionPolicySetDefinitionResource, policyStateSummaryType As PolicyStateSummaryType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicySummary)

参数

subscriptionPolicySetDefinitionResource
SubscriptionPolicySetDefinitionResource

方法 SubscriptionPolicySetDefinitionResource 将对其执行的实例。

policyStateSummaryType
PolicyStateSummaryType

“PolicyStates”下用于汇总操作的资源类型下的虚拟资源。 在给定的时间范围内,“latest”表示 () 的最新策略状态,是唯一允许的值。

policyQuerySettings
PolicyQuerySettings

参数组。

cancellationToken
CancellationToken

要使用的取消标记。

返回

的异步集合 PolicySummary ,可能需要多个服务请求进行迭代。

适用于

SummarizePolicyStatesAsync(ManagementGroupResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总管理组下资源的策略状态。

  • 请求路径/提供程序/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForManagementGroup
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary> SummarizePolicyStatesAsync (this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType policyStateSummaryType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member SummarizePolicyStatesAsync : Azure.ResourceManager.ManagementGroups.ManagementGroupResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary>
<Extension()>
Public Function SummarizePolicyStatesAsync (managementGroupResource As ManagementGroupResource, policyStateSummaryType As PolicyStateSummaryType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicySummary)

参数

managementGroupResource
ManagementGroupResource

方法 ManagementGroupResource 将对其执行的实例。

policyStateSummaryType
PolicyStateSummaryType

“PolicyStates”下用于汇总操作的资源类型下的虚拟资源。 在给定的时间范围内,“latest”表示 () 的最新策略状态,是唯一允许的值。

policyQuerySettings
PolicyQuerySettings

参数组。

cancellationToken
CancellationToken

要使用的取消标记。

返回

的异步集合 PolicySummary ,可能需要多个服务请求进行迭代。

适用于

SummarizePolicyStatesAsync(ResourceGroupResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总资源组下资源的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForResourceGroup
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary> SummarizePolicyStatesAsync (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType policyStateSummaryType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member SummarizePolicyStatesAsync : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary>
<Extension()>
Public Function SummarizePolicyStatesAsync (resourceGroupResource As ResourceGroupResource, policyStateSummaryType As PolicyStateSummaryType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicySummary)

参数

resourceGroupResource
ResourceGroupResource

方法 ResourceGroupResource 将对其执行的实例。

policyStateSummaryType
PolicyStateSummaryType

“PolicyStates”下用于汇总操作的资源类型下的虚拟资源。 在给定的时间范围内,“latest”表示 () 的最新策略状态,是唯一允许的值。

policyQuerySettings
PolicyQuerySettings

参数组。

cancellationToken
CancellationToken

要使用的取消标记。

返回

的异步集合 PolicySummary ,可能需要多个服务请求进行迭代。

适用于

SummarizePolicyStatesAsync(PolicyAssignmentResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总订阅级别或资源组级别策略分配的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForResourceGroupLevelPolicyAssignment
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary> SummarizePolicyStatesAsync (this Azure.ResourceManager.Resources.PolicyAssignmentResource policyAssignmentResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType policyStateSummaryType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member SummarizePolicyStatesAsync : Azure.ResourceManager.Resources.PolicyAssignmentResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary>
<Extension()>
Public Function SummarizePolicyStatesAsync (policyAssignmentResource As PolicyAssignmentResource, policyStateSummaryType As PolicyStateSummaryType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicySummary)

参数

policyAssignmentResource
PolicyAssignmentResource

方法 PolicyAssignmentResource 将对其执行的实例。

policyStateSummaryType
PolicyStateSummaryType

“PolicyStates”下用于汇总操作的资源类型下的虚拟资源。 在给定的时间范围内,“latest”表示 () 的最新策略状态,是唯一允许的值。

policyQuerySettings
PolicyQuerySettings

参数组。

cancellationToken
CancellationToken

要使用的取消标记。

返回

的异步集合 PolicySummary ,可能需要多个服务请求进行迭代。

适用于

SummarizePolicyStatesAsync(SubscriptionPolicyDefinitionResource, PolicyStateSummaryType, PolicyQuerySettings, CancellationToken)

汇总订阅级别策略定义的策略状态。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
  • 操作IdPolicyStates_SummarizeForPolicyDefinition
public static Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary> SummarizePolicyStatesAsync (this Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource subscriptionPolicyDefinitionResource, Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType policyStateSummaryType, Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings policyQuerySettings = default, System.Threading.CancellationToken cancellationToken = default);
static member SummarizePolicyStatesAsync : Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource * Azure.ResourceManager.PolicyInsights.Models.PolicyStateSummaryType * Azure.ResourceManager.PolicyInsights.Models.PolicyQuerySettings * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.PolicyInsights.Models.PolicySummary>
<Extension()>
Public Function SummarizePolicyStatesAsync (subscriptionPolicyDefinitionResource As SubscriptionPolicyDefinitionResource, policyStateSummaryType As PolicyStateSummaryType, Optional policyQuerySettings As PolicyQuerySettings = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of PolicySummary)

参数

subscriptionPolicyDefinitionResource
SubscriptionPolicyDefinitionResource

方法 SubscriptionPolicyDefinitionResource 将对其执行的实例。

policyStateSummaryType
PolicyStateSummaryType

“PolicyStates”下用于汇总操作的资源类型下的虚拟资源。 在给定的时间范围内,“latest”表示 () 的最新策略状态,是唯一允许的值。

policyQuerySettings
PolicyQuerySettings

参数组。

cancellationToken
CancellationToken

要使用的取消标记。

返回

的异步集合 PolicySummary ,可能需要多个服务请求进行迭代。

适用于