你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
RoleAssignment.DefinitionStages.WithScope 接口
public static interface RoleAssignment.DefinitionStages.WithScope
允许指定分配范围的角色分配定义的阶段。
方法摘要
修饰符和类型 | 方法和描述 |
---|---|
abstract
With |
withResourceGroupScope(ResourceGroup resourceGroup)
将角色分配的范围指定为资源组。 |
abstract
With |
withResourceScope(Resource resource)
将角色分配的范围指定为特定资源。 |
abstract
With |
withScope(String scope)
指定角色分配的范围。 |
abstract
With |
withSubscriptionScope(String subscriptionId)
将角色分配的范围指定为整个订阅。 |
方法详细信息
withResourceGroupScope
public abstract RoleAssignment.DefinitionStages.WithCreate withResourceGroupScope(ResourceGroup resourceGroup)
将角色分配的范围指定为资源组。
Parameters:
Returns:
withResourceScope
public abstract RoleAssignment.DefinitionStages.WithCreate withResourceScope(Resource resource)
将角色分配的范围指定为特定资源。
Parameters:
Returns:
withScope
public abstract RoleAssignment.DefinitionStages.WithCreate withScope(String scope)
指定角色分配的范围。 范围通常是订阅、资源组、资源等的 ID。
Parameters:
Returns:
withSubscriptionScope
public abstract RoleAssignment.DefinitionStages.WithCreate withSubscriptionScope(String subscriptionId)
将角色分配的范围指定为整个订阅。
Parameters:
Returns:
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈