ManagementLocksOperations Class
ManagementLocksOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectManagementLocksOperations
Constructor
ManagementLocksOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| create_or_update_at_resource_group_level |
Creates or updates a management lock at the resource group level. 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_or_update_at_resource_level |
Creates or updates a management lock at the resource level or any level below the resource. 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_or_update_at_subscription_level |
Creates or updates a management lock at the subscription level. 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_or_update_by_scope |
Create or update a management lock by scope. |
| delete_at_resource_group_level |
Deletes a management lock at the resource group level. 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_at_resource_level |
Deletes the management lock of a resource or any level below the resource. 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_at_subscription_level |
Deletes the management lock at the subscription level. 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_by_scope |
Delete a management lock by scope. |
| get_at_resource_group_level |
Gets a management lock at the resource group level. |
| get_at_resource_level |
Get the management lock of a resource or any level below resource. |
| get_at_subscription_level |
Gets a management lock at the subscription level. |
| get_by_scope |
Get a management lock by scope. |
| list_at_resource_group_level |
Gets all the management locks for a resource group. |
| list_at_resource_level |
Gets all the management locks for a resource or any level below resource. |
| list_at_subscription_level |
Gets all the management locks for a subscription. |
| list_by_scope |
Gets all the management locks for a scope. |
create_or_update_at_resource_group_level
Creates or updates a management lock at the resource group level.
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.
async create_or_update_at_resource_group_level(resource_group_name: str, lock_name: str, parameters: azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject, **kwargs: Any) -> azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject
Parameters
- lock_name
- str
The lock name. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ManagementLockObject, or the result of cls(response)
Return type
Exceptions
create_or_update_at_resource_level
Creates or updates a management lock at the resource level or any level below the resource.
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.
async create_or_update_at_resource_level(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, lock_name: str, parameters: azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject, **kwargs: Any) -> azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject
Parameters
- lock_name
- str
The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ManagementLockObject, or the result of cls(response)
Return type
Exceptions
create_or_update_at_subscription_level
Creates or updates a management lock at the subscription level.
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.
async create_or_update_at_subscription_level(lock_name: str, parameters: azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject, **kwargs: Any) -> azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject
Parameters
- lock_name
- str
The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ManagementLockObject, or the result of cls(response)
Return type
Exceptions
create_or_update_by_scope
Create or update a management lock by scope.
async create_or_update_by_scope(scope: str, lock_name: str, parameters: azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject, **kwargs: Any) -> azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject
Parameters
- scope
- str
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.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ManagementLockObject, or the result of cls(response)
Return type
Exceptions
delete_at_resource_group_level
Deletes a management lock at the resource group level.
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.
async delete_at_resource_group_level(resource_group_name: str, lock_name: str, **kwargs: Any) -> None
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
None, or the result of cls(response)
Return type
Exceptions
delete_at_resource_level
Deletes the management lock of a resource or any level below the resource.
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.
async delete_at_resource_level(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, lock_name: str, **kwargs: Any) -> None
Parameters
- resource_group_name
- str
The name of the resource group containing the resource with the lock to delete.
- resource_provider_namespace
- str
The resource provider namespace of the resource with the lock to delete.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
None, or the result of cls(response)
Return type
Exceptions
delete_at_subscription_level
Deletes the management lock at the subscription level.
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.
async delete_at_subscription_level(lock_name: str, **kwargs: Any) -> None
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
None, or the result of cls(response)
Return type
Exceptions
delete_by_scope
Delete a management lock by scope.
async delete_by_scope(scope: str, lock_name: str, **kwargs: Any) -> None
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
None, or the result of cls(response)
Return type
Exceptions
get_at_resource_group_level
Gets a management lock at the resource group level.
async get_at_resource_group_level(resource_group_name: str, lock_name: str, **kwargs: Any) -> azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ManagementLockObject, or the result of cls(response)
Return type
Exceptions
get_at_resource_level
Get the management lock of a resource or any level below resource.
async get_at_resource_level(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, lock_name: str, **kwargs: Any) -> azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject
Parameters
- parent_resource_path
- str
An extra path parameter needed in some services, like SQL Databases.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ManagementLockObject, or the result of cls(response)
Return type
Exceptions
get_at_subscription_level
Gets a management lock at the subscription level.
async get_at_subscription_level(lock_name: str, **kwargs: Any) -> azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ManagementLockObject, or the result of cls(response)
Return type
Exceptions
get_by_scope
Get a management lock by scope.
async get_by_scope(scope: str, lock_name: str, **kwargs: Any) -> azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockObject
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ManagementLockObject, or the result of cls(response)
Return type
Exceptions
list_at_resource_group_level
Gets all the management locks for a resource group.
list_at_resource_group_level(resource_group_name: str, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockListResult]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either ManagementLockListResult or the result of cls(response)
Return type
Exceptions
list_at_resource_level
Gets all the management locks for a resource or any level below resource.
list_at_resource_level(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockListResult]
Parameters
- resource_group_name
- str
The name of the resource group containing the locked resource. The name is case insensitive.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either ManagementLockListResult or the result of cls(response)
Return type
Exceptions
list_at_subscription_level
Gets all the management locks for a subscription.
list_at_subscription_level(filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockListResult]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either ManagementLockListResult or the result of cls(response)
Return type
Exceptions
list_by_scope
Gets all the management locks for a scope.
list_by_scope(scope: str, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.locks.v2016_09_01.models._models_py3.ManagementLockListResult]
Parameters
- scope
- str
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.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either ManagementLockListResult or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.resource.locks.v2016_09_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\resource\\locks\\v2016_09_01\\models\\__init__.py'>
Feedback
Submit and view feedback for