ManagementLocks interface

Interface representing a ManagementLocks.

Methods

createOrUpdateAtResourceGroupLevel(string, string, ManagementLockObject, ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams)

When you apply a lock at a parent scope, all child resources inherit the same lock. To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

createOrUpdateAtResourceLevel(string, string, string, string, string, string, ManagementLockObject, ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams)

When you apply a lock at a parent scope, all child resources inherit the same lock. To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

createOrUpdateAtSubscriptionLevel(string, ManagementLockObject, ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams)

When you apply a lock at a parent scope, all child resources inherit the same lock. To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

createOrUpdateByScope(string, string, ManagementLockObject, ManagementLocksCreateOrUpdateByScopeOptionalParams)

Create or update a management lock by scope.

deleteAtResourceGroupLevel(string, string, ManagementLocksDeleteAtResourceGroupLevelOptionalParams)

To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

deleteAtResourceLevel(string, string, string, string, string, string, ManagementLocksDeleteAtResourceLevelOptionalParams)

To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

deleteAtSubscriptionLevel(string, ManagementLocksDeleteAtSubscriptionLevelOptionalParams)

To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

deleteByScope(string, string, ManagementLocksDeleteByScopeOptionalParams)

Delete a management lock by scope.

getAtResourceGroupLevel(string, string, ManagementLocksGetAtResourceGroupLevelOptionalParams)

Gets a management lock at the resource group level.

getAtResourceLevel(string, string, string, string, string, string, ManagementLocksGetAtResourceLevelOptionalParams)

Get the management lock of a resource or any level below resource.

getAtSubscriptionLevel(string, ManagementLocksGetAtSubscriptionLevelOptionalParams)

Gets a management lock at the subscription level.

getByScope(string, string, ManagementLocksGetByScopeOptionalParams)

Get a management lock by scope.

listAtResourceGroupLevel(string, ManagementLocksListAtResourceGroupLevelOptionalParams)

Gets all the management locks for a resource group.

listAtResourceLevel(string, string, string, string, string, ManagementLocksListAtResourceLevelOptionalParams)

Gets all the management locks for a resource or any level below resource.

listAtSubscriptionLevel(ManagementLocksListAtSubscriptionLevelOptionalParams)

Gets all the management locks for a subscription.

listByScope(string, ManagementLocksListByScopeOptionalParams)

Gets all the management locks for a scope.

Method Details

createOrUpdateAtResourceGroupLevel(string, string, ManagementLockObject, ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams)

When you apply a lock at a parent scope, all child resources inherit the same lock. To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

function createOrUpdateAtResourceGroupLevel(resourceGroupName: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams): Promise<ManagementLockObject>

Parameters

resourceGroupName

string

The name of the resource group to lock.

lockName

string

The lock name. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.

parameters
ManagementLockObject

The management lock parameters.

Returns

createOrUpdateAtResourceLevel(string, string, string, string, string, string, ManagementLockObject, ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams)

When you apply a lock at a parent scope, all child resources inherit the same lock. To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

function createOrUpdateAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams): Promise<ManagementLockObject>

Parameters

resourceGroupName

string

The name of the resource group containing the resource to lock.

resourceProviderNamespace

string

The resource provider namespace of the resource to lock.

parentResourcePath

string

The parent resource identity.

resourceType

string

The resource type of the resource to lock.

resourceName

string

The name of the resource to lock.

lockName

string

The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.

parameters
ManagementLockObject

Parameters for creating or updating a management lock.

Returns

createOrUpdateAtSubscriptionLevel(string, ManagementLockObject, ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams)

When you apply a lock at a parent scope, all child resources inherit the same lock. To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

function createOrUpdateAtSubscriptionLevel(lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams): Promise<ManagementLockObject>

Parameters

lockName

string

The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.

parameters
ManagementLockObject

The management lock parameters.

Returns

createOrUpdateByScope(string, string, ManagementLockObject, ManagementLocksCreateOrUpdateByScopeOptionalParams)

Create or update a management lock by scope.

function createOrUpdateByScope(scope: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateByScopeOptionalParams): Promise<ManagementLockObject>

Parameters

scope

string

The scope for the lock. When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}' for resources.

lockName

string

The name of lock.

parameters
ManagementLockObject

Create or update management lock parameters.

options
ManagementLocksCreateOrUpdateByScopeOptionalParams

The options parameters.

Returns

deleteAtResourceGroupLevel(string, string, ManagementLocksDeleteAtResourceGroupLevelOptionalParams)

To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

function deleteAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: ManagementLocksDeleteAtResourceGroupLevelOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group containing the lock.

lockName

string

The name of lock to delete.

Returns

Promise<void>

deleteAtResourceLevel(string, string, string, string, string, string, ManagementLocksDeleteAtResourceLevelOptionalParams)

To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

function deleteAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: ManagementLocksDeleteAtResourceLevelOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group containing the resource with the lock to delete.

resourceProviderNamespace

string

The resource provider namespace of the resource with the lock to delete.

parentResourcePath

string

The parent resource identity.

resourceType

string

The resource type of the resource with the lock to delete.

resourceName

string

The name of the resource with the lock to delete.

lockName

string

The name of the lock to delete.

options
ManagementLocksDeleteAtResourceLevelOptionalParams

The options parameters.

Returns

Promise<void>

deleteAtSubscriptionLevel(string, ManagementLocksDeleteAtSubscriptionLevelOptionalParams)

To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.

function deleteAtSubscriptionLevel(lockName: string, options?: ManagementLocksDeleteAtSubscriptionLevelOptionalParams): Promise<void>

Parameters

lockName

string

The name of lock to delete.

Returns

Promise<void>

deleteByScope(string, string, ManagementLocksDeleteByScopeOptionalParams)

Delete a management lock by scope.

function deleteByScope(scope: string, lockName: string, options?: ManagementLocksDeleteByScopeOptionalParams): Promise<void>

Parameters

scope

string

The scope for the lock.

lockName

string

The name of lock.

options
ManagementLocksDeleteByScopeOptionalParams

The options parameters.

Returns

Promise<void>

getAtResourceGroupLevel(string, string, ManagementLocksGetAtResourceGroupLevelOptionalParams)

Gets a management lock at the resource group level.

function getAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: ManagementLocksGetAtResourceGroupLevelOptionalParams): Promise<ManagementLockObject>

Parameters

resourceGroupName

string

The name of the locked resource group.

lockName

string

The name of the lock to get.

Returns

getAtResourceLevel(string, string, string, string, string, string, ManagementLocksGetAtResourceLevelOptionalParams)

Get the management lock of a resource or any level below resource.

function getAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: ManagementLocksGetAtResourceLevelOptionalParams): Promise<ManagementLockObject>

Parameters

resourceGroupName

string

The name of the resource group.

resourceProviderNamespace

string

The namespace of the resource provider.

parentResourcePath

string

An extra path parameter needed in some services, like SQL Databases.

resourceType

string

The type of the resource.

resourceName

string

The name of the resource.

lockName

string

The name of lock.

options
ManagementLocksGetAtResourceLevelOptionalParams

The options parameters.

Returns

getAtSubscriptionLevel(string, ManagementLocksGetAtSubscriptionLevelOptionalParams)

Gets a management lock at the subscription level.

function getAtSubscriptionLevel(lockName: string, options?: ManagementLocksGetAtSubscriptionLevelOptionalParams): Promise<ManagementLockObject>

Parameters

lockName

string

The name of the lock to get.

options
ManagementLocksGetAtSubscriptionLevelOptionalParams

The options parameters.

Returns

getByScope(string, string, ManagementLocksGetByScopeOptionalParams)

Get a management lock by scope.

function getByScope(scope: string, lockName: string, options?: ManagementLocksGetByScopeOptionalParams): Promise<ManagementLockObject>

Parameters

scope

string

The scope for the lock.

lockName

string

The name of lock.

options
ManagementLocksGetByScopeOptionalParams

The options parameters.

Returns

listAtResourceGroupLevel(string, ManagementLocksListAtResourceGroupLevelOptionalParams)

Gets all the management locks for a resource group.

function listAtResourceGroupLevel(resourceGroupName: string, options?: ManagementLocksListAtResourceGroupLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>

Parameters

resourceGroupName

string

The name of the resource group containing the locks to get.

Returns

listAtResourceLevel(string, string, string, string, string, ManagementLocksListAtResourceLevelOptionalParams)

Gets all the management locks for a resource or any level below resource.

function listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: ManagementLocksListAtResourceLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>

Parameters

resourceGroupName

string

The name of the resource group containing the locked resource. The name is case insensitive.

resourceProviderNamespace

string

The namespace of the resource provider.

parentResourcePath

string

The parent resource identity.

resourceType

string

The resource type of the locked resource.

resourceName

string

The name of the locked resource.

options
ManagementLocksListAtResourceLevelOptionalParams

The options parameters.

Returns

listAtSubscriptionLevel(ManagementLocksListAtSubscriptionLevelOptionalParams)

Gets all the management locks for a subscription.

function listAtSubscriptionLevel(options?: ManagementLocksListAtSubscriptionLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>

Parameters

Returns

listByScope(string, ManagementLocksListByScopeOptionalParams)

Gets all the management locks for a scope.

function listByScope(scope: string, options?: ManagementLocksListByScopeOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>

Parameters

scope

string

The scope for the lock. When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}' for resources.

options
ManagementLocksListByScopeOptionalParams

The options parameters.

Returns