《Windows Azure Platform 系列文章目录》
我们把一个资源从资源组A移动到资源组B的时候,如果这时候有其他人对资源组A或者资源组B的时候,会遇到创建失败的错误,并且会提示该资源组正在被移动,所以无法部署
其实我们可以自定义角色(Custom Role),拒绝某些用户移动Azure资源。
在创建custom role的时候,需要至少有以下权限:
- 在源资源组上,需要Microsoft.Resources/subscriptions/resourceGroups/moveResources/action
- 在目标资源组上,需要Microsoft.Resources/subscriptions/resourceGroups/write
我们可以在custom role的时候,设置如下信息:
- 自定义Role Name为CannotMoveResource
- Action为*,表示可以执行任何操作,类似于Owner
- Not Action为Microsoft.Resources/subscriptions/resourceGroups/moveResources/action,不允许移动资源
{
"properties": {
"roleName": "CannotMoveResource",
"description": "",
"assignableScopes": [
"/subscriptions/3851f1a6-e76d-4c8b-b204-0809652cbe98/resourceGroups/20221124-rg"
],
"permissions": [
{
"actions": ["*"],
"notActions": ["Microsoft.Resources/subscriptions/resourceGroups/moveResources/action"],
"dataActions": [],
"notDataActions": []
}
]
}
}
分类:
Azure ARM
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
2017-12-27 Windows Azure Platform Introduction (14) 申请海外的Windows Azure账户
2016-12-27 Azure Application Gateway (4) 设置URL路由 - PowerShell
2016-12-27 Azure Application Gateway (3) 设置URL路由
2013-12-27 [SDK2.2]Windows Azure Virtual Network (2) 创建简单的Virtual Network
2012-12-27 [New Portal]Windows Azure Cloud Service (33) 使用Visual Studio 2012 部署Cloud Service