azure.mgmt.resource.locks.v2015_01_01.operations package

class azure.mgmt.resource.locks.v2015_01_01.operations.ManagementLocksOperations(client, config, serializer, deserializer)[source]

ManagementLocksOperations 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.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

create_or_update_at_resource_group_level(resource_group_name: str, lock_name: str, parameters: ‘models.ManagementLockObject’, **kwargs: Any) → ’models.ManagementLockObject’[source]

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

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

  • lock_name (str) – The lock name.

  • parameters (ManagementLockObject) – The management lock parameters.

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

~azure.core.exceptions.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’, **kwargs: Any) → ’models.ManagementLockObject’[source]

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.

  • resource_provider_namespace (str) – Resource identity.

  • parent_resource_path (str) – Resource identity.

  • resource_type (str) – Resource identity.

  • resource_name (str) – Resource identity.

  • lock_name (str) – The name of lock.

  • parameters (ManagementLockObject) – Create or update management lock parameters.

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

~azure.core.exceptions.HttpResponseError

create_or_update_at_subscription_level(lock_name: str, parameters: ‘models.ManagementLockObject’, **kwargs: Any) → ’models.ManagementLockObject’[source]

Create or update a management lock at the subscription level.

Parameters
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

~azure.core.exceptions.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.

  • lock_name (str) – The name of lock.

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

~azure.core.exceptions.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.

  • resource_provider_namespace (str) – Resource identity.

  • parent_resource_path (str) – Resource identity.

  • resource_type (str) – Resource identity.

  • resource_name (str) – Resource identity.

  • lock_name (str) – The name of lock.

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

~azure.core.exceptions.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.

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

~azure.core.exceptions.HttpResponseError

get(lock_name: str, **kwargs: Any) → ’models.ManagementLockObject’[source]

Gets the management lock of a scope.

Parameters

lock_name (str) – Name of the management lock.

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

~azure.core.exceptions.HttpResponseError

get_at_resource_group_level(resource_group_name: str, lock_name: str, **kwargs: Any) → ’models.ManagementLockObject’[source]

Gets a management lock at the resource group level.

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

  • lock_name (str) – The lock name.

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

~azure.core.exceptions.HttpResponseError

list_at_resource_group_level(resource_group_name: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[‘models.ManagementLockListResult’][source]

Gets all the management locks of a resource group.

Parameters
  • resource_group_name (str) – Resource group name.

  • filter (str) – The filter to apply on the operation.

Keyword Arguments

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

ItemPaged[ManagementLockListResult]

Raises

~azure.core.exceptions.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[‘models.ManagementLockListResult’][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.

  • resource_provider_namespace (str) – Resource identity.

  • parent_resource_path (str) – Resource identity.

  • resource_type (str) – Resource identity.

  • resource_name (str) – Resource identity.

  • filter (str) – The filter to apply on the operation.

Keyword Arguments

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

ItemPaged[ManagementLockListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_at_subscription_level(filter: Optional[str] = None, **kwargs: Any) → Iterable[‘models.ManagementLockListResult’][source]

Gets all the management locks of a subscription.

Parameters

filter (str) – The filter to apply on the operation.

Keyword Arguments

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

ItemPaged[ManagementLockListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.resource.locks.v2015_01_01.models' from 'c:\\repo\\azure-sdk-for-python\\sdk\\resources\\azure-mgmt-resource\\.tox\\sphinx\\lib\\site-packages\\azure\\mgmt\\resource\\locks\\v2015_01_01\\models\\__init__.py'>