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

ManagementLocksOperationsExtensions.CreateOrUpdateAtSubscriptionLevel 方法

定义

在订阅级别创建或更新管理锁。

public static Microsoft.Azure.Management.ResourceManager.Models.ManagementLockObject CreateOrUpdateAtSubscriptionLevel (this Microsoft.Azure.Management.ResourceManager.IManagementLocksOperations operations, string lockName, Microsoft.Azure.Management.ResourceManager.Models.ManagementLockObject parameters);
static member CreateOrUpdateAtSubscriptionLevel : Microsoft.Azure.Management.ResourceManager.IManagementLocksOperations * string * Microsoft.Azure.Management.ResourceManager.Models.ManagementLockObject -> Microsoft.Azure.Management.ResourceManager.Models.ManagementLockObject
<Extension()>
Public Function CreateOrUpdateAtSubscriptionLevel (operations As IManagementLocksOperations, lockName As String, parameters As ManagementLockObject) As ManagementLockObject

参数

operations
IManagementLocksOperations

此扩展方法的操作组。

lockName
String

锁的名称。 锁名称最多可包含 260 个字符。 它不能包含 <、 > %、 &:、?、/或任何控制字符。

parameters
ManagementLockObject

管理锁参数。

返回

注解

在父作用域应用锁时,所有子资源将继承同一个锁。 若要创建管理锁,必须有权访问 Microsoft.Authorization/* 或 Microsoft.Authorization/locks/* 操作。 在内置角色中,只有“所有者”和“用户访问管理员”有权执行这些操作。

适用于