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

PolicyInsightsExtensions.CheckPolicyRestrictionsAsync 方法

定义

重载

CheckPolicyRestrictionsAsync(ManagementGroupResource, CheckManagementGroupPolicyRestrictionsContent, CancellationToken)

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

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

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

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

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

  • Request Path/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions
  • 操作IdPolicyRestrictions_CheckAtSubscriptionScope

CheckPolicyRestrictionsAsync(ManagementGroupResource, CheckManagementGroupPolicyRestrictionsContent, CancellationToken)

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

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

参数

managementGroupResource
ManagementGroupResource

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

content
CheckManagementGroupPolicyRestrictionsContent

检查策略限制参数。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

content 为 null。

适用于

CheckPolicyRestrictionsAsync(ResourceGroupResource, CheckPolicyRestrictionsContent, CancellationToken)

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

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

参数

resourceGroupResource
ResourceGroupResource

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

content
CheckPolicyRestrictionsContent

检查策略限制参数。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

content 为 null。

适用于

CheckPolicyRestrictionsAsync(SubscriptionResource, CheckPolicyRestrictionsContent, CancellationToken)

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

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

参数

subscriptionResource
SubscriptionResource

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

content
CheckPolicyRestrictionsContent

检查策略限制参数。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

content 为 null。

适用于