ManagementLocks interface
Interface representing a ManagementLocks.
Methods
create |
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. |
create |
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. |
create |
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. |
create |
Create or update a management lock by scope. |
delete |
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. |
delete |
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. |
delete |
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. |
delete |
Delete a management lock by scope. |
get |
Gets a management lock at the resource group level. |
get |
Get the management lock of a resource or any level below resource. |
get |
Gets a management lock at the subscription level. |
get |
Get a management lock by scope. |
list |
Gets all the management locks for a resource group. |
list |
Gets all the management locks for a resource or any level below resource. |
list |
Gets all the management locks for a subscription. |
list |
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.
The options parameters.
Returns
Promise<ManagementLockObject>
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.
The options parameters.
Returns
Promise<ManagementLockObject>
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.
The options parameters.
Returns
Promise<ManagementLockObject>
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.
The options parameters.
Returns
Promise<ManagementLockObject>
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.
The options parameters.
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.
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.
The options parameters.
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.
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.
The options parameters.
Returns
Promise<ManagementLockObject>
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.
The options parameters.
Returns
Promise<ManagementLockObject>
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.
The options parameters.
Returns
Promise<ManagementLockObject>
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.
The options parameters.
Returns
Promise<ManagementLockObject>
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.
The options parameters.
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.
The options parameters.
Returns
listAtSubscriptionLevel(ManagementLocksListAtSubscriptionLevelOptionalParams)
Gets all the management locks for a subscription.
function listAtSubscriptionLevel(options?: ManagementLocksListAtSubscriptionLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject, ManagementLockObject[], PageSettings>
Parameters
The options 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.
The options parameters.