azure.mgmt.resource.locks.v2015_01_01.operations module

class azure.mgmt.resource.locks.v2015_01_01.operations.ManagementLocksOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ManagementLockClient’s management_locks attribute.

create_or_update_at_resource_group_level(resource_group_name: str, lock_name: str, parameters: _models.ManagementLockObject, *, content_type: str = "'application/json'", **kwargs: Any)_models.ManagementLockObject[source]
create_or_update_at_resource_group_level(resource_group_name: str, lock_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.ManagementLockObject

Create or update a management lock at the resource group level.

Parameters
  • resource_group_name (str) – The resource group name. Required.

  • lock_name (str) – The lock name. Required.

  • parameters (ManagementLockObject or IO) – The management lock parameters. Is either a ManagementLockObject type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • cls (callable) – A custom type or function that will be passed the direct response

Returns

ManagementLockObject or the result of cls(response)

Return type

ManagementLockObject

Raises

HttpResponseError

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: _models.ManagementLockObject, *, content_type: str = "'application/json'", **kwargs: Any)_models.ManagementLockObject[source]
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: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.ManagementLockObject

Create or update a management lock at the resource level or any level below resource.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • resource_provider_namespace (str) – Resource identity. Required.

  • parent_resource_path (str) – Resource identity. Required.

  • resource_type (str) – Resource identity. Required.

  • resource_name (str) – Resource identity. Required.

  • lock_name (str) – The name of lock. Required.

  • parameters (ManagementLockObject or IO) – Create or update management lock parameters. Is either a ManagementLockObject type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • cls (callable) – A custom type or function that will be passed the direct response

Returns

ManagementLockObject or the result of cls(response)

Return type

ManagementLockObject

Raises

HttpResponseError

create_or_update_at_subscription_level(lock_name: str, parameters: _models.ManagementLockObject, *, content_type: str = "'application/json'", **kwargs: Any)_models.ManagementLockObject[source]
create_or_update_at_subscription_level(lock_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.ManagementLockObject

Create or update a management lock at the subscription level.

Parameters
  • lock_name (str) – The name of lock. Required.

  • parameters (ManagementLockObject or IO) – The management lock parameters. Is either a ManagementLockObject type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • cls (callable) – A custom type or function that will be passed the direct response

Returns

ManagementLockObject or the result of cls(response)

Return type

ManagementLockObject

Raises

HttpResponseError

delete_at_resource_group_level(resource_group_name: str, lock_name: str, **kwargs: Any)None[source]

Deletes the management lock of a resource group.

Parameters
  • resource_group_name (str) – The resource group name. Required.

  • lock_name (str) – The name of lock. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None or the result of cls(response)

Return type

None

Raises

HttpResponseError

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[source]

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

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • resource_provider_namespace (str) – Resource identity. Required.

  • parent_resource_path (str) – Resource identity. Required.

  • resource_type (str) – Resource identity. Required.

  • resource_name (str) – Resource identity. Required.

  • lock_name (str) – The name of lock. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None or the result of cls(response)

Return type

None

Raises

HttpResponseError

delete_at_subscription_level(lock_name: str, **kwargs: Any)None[source]

Deletes the management lock of a subscription.

Parameters

lock_name (str) – The name of lock. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None or the result of cls(response)

Return type

None

Raises

HttpResponseError

get(lock_name: str, **kwargs: Any)azure.mgmt.resource.locks.v2015_01_01.models._models_py3.ManagementLockObject[source]

Gets the management lock of a scope.

Parameters

lock_name (str) – Name of the management lock. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ManagementLockObject or the result of cls(response)

Return type

ManagementLockObject

Raises

HttpResponseError

get_at_resource_group_level(resource_group_name: str, lock_name: str, **kwargs: Any)azure.mgmt.resource.locks.v2015_01_01.models._models_py3.ManagementLockObject[source]

Gets a management lock at the resource group level.

Parameters
  • resource_group_name (str) – The resource group name. Required.

  • lock_name (str) – The lock name. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ManagementLockObject or the result of cls(response)

Return type

ManagementLockObject

Raises

HttpResponseError

list_at_resource_group_level(resource_group_name: str, filter: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.resource.locks.v2015_01_01.models._models_py3.ManagementLockObject][source]

Gets all the management locks of a resource group.

Parameters
  • resource_group_name (str) – Resource group name. Required.

  • filter (str) – The filter to apply on the operation. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagementLockObject or the result of cls(response)

Return type

ItemPaged[ManagementLockObject]

Raises

HttpResponseError

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)Iterable[azure.mgmt.resource.locks.v2015_01_01.models._models_py3.ManagementLockObject][source]

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

Parameters
  • resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.

  • resource_provider_namespace (str) – Resource identity. Required.

  • parent_resource_path (str) – Resource identity. Required.

  • resource_type (str) – Resource identity. Required.

  • resource_name (str) – Resource identity. Required.

  • filter (str) – The filter to apply on the operation. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagementLockObject or the result of cls(response)

Return type

ItemPaged[ManagementLockObject]

Raises

HttpResponseError

list_at_subscription_level(filter: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.resource.locks.v2015_01_01.models._models_py3.ManagementLockObject][source]

Gets all the management locks of a subscription.

Parameters

filter (str) – The filter to apply on the operation. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ManagementLockObject or the result of cls(response)

Return type

ItemPaged[ManagementLockObject]

Raises

HttpResponseError

models = <module 'azure.mgmt.resource.locks.v2015_01_01.models' from '/mnt/vss/_work/1/s/sdk/resources/azure-mgmt-resource/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/resource/locks/v2015_01_01/models/__init__.py'>