ManagementLocks interface
表示 ManagementLocks 的接口。
方法
方法详细信息
createOrUpdateAtResourceGroupLevel(string, string, ManagementLockObject, ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams)
在父范围应用锁时,所有子资源都继承相同的锁。 若要创建管理锁,必须有权访问 Microsoft.Authorization/* 或 Microsoft.Authorization/locks/*作。 在内置角色中,仅向所有者和用户访问管理员授予这些作。
function createOrUpdateAtResourceGroupLevel(resourceGroupName: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams): Promise<ManagementLockObject>
参数
- resourceGroupName
-
string
要锁定的资源组的名称。
- lockName
-
string
锁名称。 锁名称最多可以包含 260 个字符。 它不能包含 <、> %、&、:、、?、/或任何控制字符。
- parameters
- ManagementLockObject
管理锁参数。
返回
Promise<ManagementLockObject>
createOrUpdateAtResourceLevel(string, string, string, string, string, string, ManagementLockObject, ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams)
在父范围应用锁时,所有子资源都继承相同的锁。 若要创建管理锁,必须有权访问 Microsoft.Authorization/* 或 Microsoft.Authorization/locks/*作。 在内置角色中,仅向所有者和用户访问管理员授予这些作。
function createOrUpdateAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams): Promise<ManagementLockObject>
参数
- resourceGroupName
-
string
包含要锁定的资源的资源组的名称。
- resourceProviderNamespace
-
string
要锁定的资源的资源提供程序命名空间。
- parentResourcePath
-
string
父资源标识。
- resourceType
-
string
要锁定的资源的资源类型。
- resourceName
-
string
要锁定的资源的名称。
- lockName
-
string
锁的名称。 锁名称最多可以包含 260 个字符。 它不能包含 <、> %、&、:、、?、/或任何控制字符。
- parameters
- ManagementLockObject
用于创建或更新管理锁的参数。
返回
Promise<ManagementLockObject>
createOrUpdateAtSubscriptionLevel(string, ManagementLockObject, ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams)
在父范围应用锁时,所有子资源都继承相同的锁。 若要创建管理锁,必须有权访问 Microsoft.Authorization/* 或 Microsoft.Authorization/locks/*作。 在内置角色中,仅向所有者和用户访问管理员授予这些作。
function createOrUpdateAtSubscriptionLevel(lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams): Promise<ManagementLockObject>
参数
- lockName
-
string
锁的名称。 锁名称最多可以包含 260 个字符。 它不能包含 <、> %、&、:、、?、/或任何控制字符。
- parameters
- ManagementLockObject
管理锁参数。
返回
Promise<ManagementLockObject>
createOrUpdateByScope(string, string, ManagementLockObject, ManagementLocksCreateOrUpdateByScopeOptionalParams)
按范围创建或更新管理锁。
function createOrUpdateByScope(scope: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateByScopeOptionalParams): Promise<ManagementLockObject>
参数
- scope
-
string
锁的范围。 提供分配范围时,请对订阅使用“/subscriptions/{subscriptionId}”、资源组的“/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}”和“/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}”。
- lockName
-
string
锁的名称。
- parameters
- ManagementLockObject
创建或更新管理锁参数。
选项参数。
返回
Promise<ManagementLockObject>
deleteAtResourceGroupLevel(string, string, ManagementLocksDeleteAtResourceGroupLevelOptionalParams)
若要删除管理锁,必须有权访问 Microsoft.Authorization/* 或 Microsoft.Authorization/locks/*作。 在内置角色中,仅向所有者和用户访问管理员授予这些作。
function deleteAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: ManagementLocksDeleteAtResourceGroupLevelOptionalParams): Promise<void>
参数
- resourceGroupName
-
string
包含锁的资源组的名称。
- lockName
-
string
要删除的锁的名称。
选项参数。
返回
Promise<void>
deleteAtResourceLevel(string, string, string, string, string, string, ManagementLocksDeleteAtResourceLevelOptionalParams)
若要删除管理锁,必须有权访问 Microsoft.Authorization/* 或 Microsoft.Authorization/locks/*作。 在内置角色中,仅向所有者和用户访问管理员授予这些作。
function deleteAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: ManagementLocksDeleteAtResourceLevelOptionalParams): Promise<void>
参数
- resourceGroupName
-
string
包含要删除的锁的资源的资源组的名称。
- resourceProviderNamespace
-
string
要删除的锁的资源的资源提供程序命名空间。
- parentResourcePath
-
string
父资源标识。
- resourceType
-
string
要删除的锁的资源的资源类型。
- resourceName
-
string
要删除的锁的资源的名称。
- lockName
-
string
要删除的锁的名称。
选项参数。
返回
Promise<void>
deleteAtSubscriptionLevel(string, ManagementLocksDeleteAtSubscriptionLevelOptionalParams)
若要删除管理锁,必须有权访问 Microsoft.Authorization/* 或 Microsoft.Authorization/locks/*作。 在内置角色中,仅向所有者和用户访问管理员授予这些作。
function deleteAtSubscriptionLevel(lockName: string, options?: ManagementLocksDeleteAtSubscriptionLevelOptionalParams): Promise<void>
参数
- lockName
-
string
要删除的锁的名称。
选项参数。
返回
Promise<void>
deleteByScope(string, string, ManagementLocksDeleteByScopeOptionalParams)
按范围删除管理锁。
function deleteByScope(scope: string, lockName: string, options?: ManagementLocksDeleteByScopeOptionalParams): Promise<void>
参数
- scope
-
string
锁的范围。
- lockName
-
string
锁的名称。
选项参数。
返回
Promise<void>
getAtResourceGroupLevel(string, string, ManagementLocksGetAtResourceGroupLevelOptionalParams)
获取资源组级别的管理锁。
function getAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: ManagementLocksGetAtResourceGroupLevelOptionalParams): Promise<ManagementLockObject>
参数
- resourceGroupName
-
string
锁定的资源组的名称。
- lockName
-
string
要获取的锁的名称。
选项参数。
返回
Promise<ManagementLockObject>
getAtResourceLevel(string, string, string, string, string, string, ManagementLocksGetAtResourceLevelOptionalParams)
获取资源管理锁或低于资源的任何级别。
function getAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: ManagementLocksGetAtResourceLevelOptionalParams): Promise<ManagementLockObject>
参数
- resourceGroupName
-
string
资源组的名称。
- resourceProviderNamespace
-
string
资源提供程序的命名空间。
- parentResourcePath
-
string
某些服务(如 SQL 数据库)中所需的额外路径参数。
- resourceType
-
string
资源的类型。
- resourceName
-
string
资源的名称。
- lockName
-
string
锁的名称。
选项参数。
返回
Promise<ManagementLockObject>
getAtSubscriptionLevel(string, ManagementLocksGetAtSubscriptionLevelOptionalParams)
获取订阅级别的管理锁。
function getAtSubscriptionLevel(lockName: string, options?: ManagementLocksGetAtSubscriptionLevelOptionalParams): Promise<ManagementLockObject>
参数
- lockName
-
string
要获取的锁的名称。
选项参数。
返回
Promise<ManagementLockObject>
getByScope(string, string, ManagementLocksGetByScopeOptionalParams)
按范围获取管理锁。
function getByScope(scope: string, lockName: string, options?: ManagementLocksGetByScopeOptionalParams): Promise<ManagementLockObject>
参数
- scope
-
string
锁的范围。
- lockName
-
string
锁的名称。
选项参数。
返回
Promise<ManagementLockObject>
listAtResourceGroupLevel(string, ManagementLocksListAtResourceGroupLevelOptionalParams)
获取资源组的所有管理锁。
function listAtResourceGroupLevel(resourceGroupName: string, options?: ManagementLocksListAtResourceGroupLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>
参数
- resourceGroupName
-
string
包含要获取的锁的资源组的名称。
选项参数。
返回
listAtResourceLevel(string, string, string, string, string, ManagementLocksListAtResourceLevelOptionalParams)
获取资源的所有管理锁或低于资源的任何级别。
function listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: ManagementLocksListAtResourceLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>
参数
- resourceGroupName
-
string
包含锁定资源的资源组的名称。 名称不区分大小写。
- resourceProviderNamespace
-
string
资源提供程序的命名空间。
- parentResourcePath
-
string
父资源标识。
- resourceType
-
string
锁定资源的资源类型。
- resourceName
-
string
锁定资源的名称。
选项参数。
返回
listAtSubscriptionLevel(ManagementLocksListAtSubscriptionLevelOptionalParams)
获取订阅的所有管理锁。
function listAtSubscriptionLevel(options?: ManagementLocksListAtSubscriptionLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>
参数
选项参数。
返回
listByScope(string, ManagementLocksListByScopeOptionalParams)
获取范围的所有管理锁。
function listByScope(scope: string, options?: ManagementLocksListByScopeOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>
参数
- scope
-
string
锁的范围。 提供分配范围时,请对订阅使用“/subscriptions/{subscriptionId}”、资源组的“/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}”和“/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}”。
选项参数。