你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
RoleAssignmentHelper.WithAccessTo 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
WithAccessTo(String, BuiltInRole) |
指定使用此标识在 Azure 服务上运行的应用程序需要访问角色,其访问范围仅限于 ARM 资源。 |
WithAccessTo(String, String) |
指定使用此标识在 Azure 服务上运行的应用程序需要给定角色定义中所述的访问权限,其访问范围仅限于 ARM 资源。 |
WithAccessTo(String, BuiltInRole)
指定使用此标识在 Azure 服务上运行的应用程序需要访问角色,其访问范围仅限于 ARM 资源。
public Microsoft.Azure.Management.Graph.RBAC.Fluent.RoleAssignmentHelper WithAccessTo (string resourceId, Microsoft.Azure.Management.Graph.RBAC.Fluent.BuiltInRole role);
member this.WithAccessTo : string * Microsoft.Azure.Management.Graph.RBAC.Fluent.BuiltInRole -> Microsoft.Azure.Management.Graph.RBAC.Fluent.RoleAssignmentHelper
Public Function WithAccessTo (resourceId As String, role As BuiltInRole) As RoleAssignmentHelper
参数
- resourceId
- String
以 ARM 资源 ID 格式表示的访问范围。
- role
- BuiltInRole
要分配给虚拟机的访问角色。
返回
适用于
WithAccessTo(String, String)
指定使用此标识在 Azure 服务上运行的应用程序需要给定角色定义中所述的访问权限,其访问范围仅限于 ARM 资源。
public Microsoft.Azure.Management.Graph.RBAC.Fluent.RoleAssignmentHelper WithAccessTo (string resourceId, string roleDefinitionId);
member this.WithAccessTo : string * string -> Microsoft.Azure.Management.Graph.RBAC.Fluent.RoleAssignmentHelper
Public Function WithAccessTo (resourceId As String, roleDefinitionId As String) As RoleAssignmentHelper
参数
- resourceId
- String
以 ARM 资源 ID 格式表示的访问范围
- roleDefinitionId
- String
要分配给标识的访问角色定义
返回
RoleAssignmentHelper