azure.mgmt.resource.locks.v2016_09_01.operations module¶
-
class
azure.mgmt.resource.locks.v2016_09_01.operations.
AuthorizationOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
AuthorizationOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: api_version – The API version to use for the operation. Constant value: “2016-09-01”.
-
list
(custom_headers=None, raw=False, **operation_config)[source]¶ Lists all of the available Microsoft.Authorization REST API operations.
Parameters: - custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of Operation
Return type: Raises: CloudError
-
models
= <module 'azure.mgmt.resource.locks.v2016_09_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/resource/locks/v2016_09_01/models/__init__.py'>¶
-
class
azure.mgmt.resource.locks.v2016_09_01.operations.
ManagementLocksOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ManagementLocksOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: api_version – The API version to use for the operation. Constant value: “2016-09-01”.
-
create_or_update_at_resource_group_level
(resource_group_name, lock_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ 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.
Parameters: - resource_group_name (str) – The name of the resource group to lock.
- lock_name (str) – 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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementLockObject or ClientRawResponse if raw=true
Return type: ManagementLockObject or ClientRawResponse
Raises: CloudError
-
create_or_update_at_resource_level
(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ 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.
Parameters: - resource_group_name (str) – The name of the resource group containing the resource to lock.
- resource_provider_namespace (str) – The resource provider namespace of the resource to lock.
- parent_resource_path (str) – The parent resource identity.
- resource_type (str) – The resource type of the resource to lock.
- resource_name (str) – The name of the resource to lock.
- lock_name (str) – 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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementLockObject or ClientRawResponse if raw=true
Return type: ManagementLockObject or ClientRawResponse
Raises: CloudError
-
create_or_update_at_subscription_level
(lock_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ 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.
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.
- parameters (ManagementLockObject) – The management lock parameters.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementLockObject or ClientRawResponse if raw=true
Return type: ManagementLockObject or ClientRawResponse
Raises: CloudError
-
create_or_update_by_scope
(scope, lock_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Create or update a management lock by scope.
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.
- lock_name (str) – The name of lock.
- parameters (ManagementLockObject) – Create or update management lock parameters.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementLockObject or ClientRawResponse if raw=true
Return type: ManagementLockObject or ClientRawResponse
Raises: CloudError
-
delete_at_resource_group_level
(resource_group_name, lock_name, custom_headers=None, raw=False, **operation_config)[source]¶ 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.
Parameters: - resource_group_name (str) – The name of the resource group containing the lock.
- lock_name (str) – The name of lock to delete.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
-
delete_at_resource_level
(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, custom_headers=None, raw=False, **operation_config)[source]¶ 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.
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.
- parent_resource_path (str) – The parent resource identity.
- resource_type (str) – The resource type of the resource with the lock to delete.
- resource_name (str) – The name of the resource with the lock to delete.
- lock_name (str) – The name of the lock to delete.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
-
delete_at_subscription_level
(lock_name, custom_headers=None, raw=False, **operation_config)[source]¶ 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.
Parameters: - lock_name (str) – The name of lock to delete.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
-
delete_by_scope
(scope, lock_name, custom_headers=None, raw=False, **operation_config)[source]¶ Delete a management lock by scope.
Parameters: - scope (str) – The scope for the lock.
- lock_name (str) – The name of lock.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
-
get_at_resource_group_level
(resource_group_name, lock_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets a management lock at the resource group level.
Parameters: - resource_group_name (str) – The name of the locked resource group.
- lock_name (str) – The name of the lock to get.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementLockObject or ClientRawResponse if raw=true
Return type: ManagementLockObject or ClientRawResponse
Raises: CloudError
-
get_at_resource_level
(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, lock_name, custom_headers=None, raw=False, **operation_config)[source]¶ Get the management lock of a resource or any level below resource.
Parameters: - resource_group_name (str) – The name of the resource group.
- resource_provider_namespace (str) – The namespace of the resource provider.
- parent_resource_path (str) – An extra path parameter needed in some services, like SQL Databases.
- resource_type (str) – The type of the resource.
- resource_name (str) – The name of the resource.
- lock_name (str) – The name of lock.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementLockObject or ClientRawResponse if raw=true
Return type: ManagementLockObject or ClientRawResponse
Raises: CloudError
-
get_at_subscription_level
(lock_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets a management lock at the subscription level.
Parameters: - lock_name (str) – The name of the lock to get.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementLockObject or ClientRawResponse if raw=true
Return type: ManagementLockObject or ClientRawResponse
Raises: CloudError
-
get_by_scope
(scope, lock_name, custom_headers=None, raw=False, **operation_config)[source]¶ Get a management lock by scope.
Parameters: - scope (str) – The scope for the lock.
- lock_name (str) – The name of lock.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementLockObject or ClientRawResponse if raw=true
Return type: ManagementLockObject or ClientRawResponse
Raises: CloudError
-
list_at_resource_group_level
(resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all the management locks for a resource group.
Parameters: - resource_group_name (str) – The name of the resource group containing the locks to get.
- filter (str) – The filter to apply on the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of ManagementLockObject
Return type: Raises: CloudError
-
list_at_resource_level
(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all the management locks for a resource or any level below resource.
Parameters: - resource_group_name (str) – The name of the resource group containing the locked resource. The name is case insensitive.
- resource_provider_namespace (str) – The namespace of the resource provider.
- parent_resource_path (str) – The parent resource identity.
- resource_type (str) – The resource type of the locked resource.
- resource_name (str) – The name of the locked resource.
- filter (str) – The filter to apply on the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of ManagementLockObject
Return type: Raises: CloudError
-
list_at_subscription_level
(filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all the management locks for a subscription.
Parameters: - filter (str) – The filter to apply on the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of ManagementLockObject
Return type: Raises: CloudError
-
list_by_scope
(scope, filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all the management locks for a scope.
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.
- filter (str) – The filter to apply on the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of ManagementLockObject
Return type: Raises: CloudError
-
models
= <module 'azure.mgmt.resource.locks.v2016_09_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/resource/locks/v2016_09_01/models/__init__.py'>¶