Share via


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

PolicyInsightsExtensions.CheckPolicyRestrictions 方法

定义

重载

CheckPolicyRestrictions(ManagementGroupResource, CheckManagementGroupPolicyRestrictionsContent, CancellationToken)

检查Azure Policy将对管理组中的资源施加哪些限制。

  • 请求路径/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions
  • 操作IdPolicyRestrictions_CheckAtManagementGroupScope
CheckPolicyRestrictions(ResourceGroupResource, CheckPolicyRestrictionsContent, CancellationToken)

检查Azure Policy将对资源组中的资源施加哪些限制。 当将创建资源的资源组已知道时,请使用此选项。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions
  • 操作IdPolicyRestrictions_CheckAtResourceGroupScope
CheckPolicyRestrictions(SubscriptionResource, CheckPolicyRestrictionsContent, CancellationToken)

检查Azure Policy将对订阅中的资源施加哪些限制。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions
  • 操作IdPolicyRestrictions_CheckAtSubscriptionScope

CheckPolicyRestrictions(ManagementGroupResource, CheckManagementGroupPolicyRestrictionsContent, CancellationToken)

检查Azure Policy将对管理组中的资源施加哪些限制。

  • 请求路径/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions
  • 操作IdPolicyRestrictions_CheckAtManagementGroupScope
public static Azure.Response<Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsResult> CheckPolicyRestrictions (this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.ResourceManager.PolicyInsights.Models.CheckManagementGroupPolicyRestrictionsContent content, System.Threading.CancellationToken cancellationToken = default);
static member CheckPolicyRestrictions : Azure.ResourceManager.ManagementGroups.ManagementGroupResource * Azure.ResourceManager.PolicyInsights.Models.CheckManagementGroupPolicyRestrictionsContent * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsResult>
<Extension()>
Public Function CheckPolicyRestrictions (managementGroupResource As ManagementGroupResource, content As CheckManagementGroupPolicyRestrictionsContent, Optional cancellationToken As CancellationToken = Nothing) As Response(Of CheckPolicyRestrictionsResult)

参数

managementGroupResource
ManagementGroupResource

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

content
CheckManagementGroupPolicyRestrictionsContent

检查策略限制参数。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

content 为 null。

适用于

CheckPolicyRestrictions(ResourceGroupResource, CheckPolicyRestrictionsContent, CancellationToken)

检查Azure Policy将对资源组中的资源施加哪些限制。 当将创建资源的资源组已知道时,请使用此选项。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions
  • 操作IdPolicyRestrictions_CheckAtResourceGroupScope
public static Azure.Response<Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsResult> CheckPolicyRestrictions (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsContent content, System.Threading.CancellationToken cancellationToken = default);
static member CheckPolicyRestrictions : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsContent * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsResult>
<Extension()>
Public Function CheckPolicyRestrictions (resourceGroupResource As ResourceGroupResource, content As CheckPolicyRestrictionsContent, Optional cancellationToken As CancellationToken = Nothing) As Response(Of CheckPolicyRestrictionsResult)

参数

resourceGroupResource
ResourceGroupResource

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

content
CheckPolicyRestrictionsContent

检查策略限制参数。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

content 为 null。

适用于

CheckPolicyRestrictions(SubscriptionResource, CheckPolicyRestrictionsContent, CancellationToken)

检查Azure Policy将对订阅中的资源施加哪些限制。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions
  • 操作IdPolicyRestrictions_CheckAtSubscriptionScope
public static Azure.Response<Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsResult> CheckPolicyRestrictions (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsContent content, System.Threading.CancellationToken cancellationToken = default);
static member CheckPolicyRestrictions : Azure.ResourceManager.Resources.SubscriptionResource * Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsContent * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.PolicyInsights.Models.CheckPolicyRestrictionsResult>
<Extension()>
Public Function CheckPolicyRestrictions (subscriptionResource As SubscriptionResource, content As CheckPolicyRestrictionsContent, Optional cancellationToken As CancellationToken = Nothing) As Response(Of CheckPolicyRestrictionsResult)

参数

subscriptionResource
SubscriptionResource

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

content
CheckPolicyRestrictionsContent

检查策略限制参数。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

content 为 null。

适用于