ManagementLocksOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ManagementLockClient's

<xref:management_locks> attribute.

Inheritance
builtins.object
ManagementLocksOperations

Constructor

ManagementLocksOperations(*args, **kwargs)

Methods

create_or_update_at_resource_group_level

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

create_or_update_at_resource_level

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

create_or_update_at_subscription_level

Create or update a management lock at the subscription level.

delete_at_resource_group_level

Deletes the management lock of a resource group.

delete_at_resource_level

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

delete_at_subscription_level

Deletes the management lock of a subscription.

get

Gets the management lock of a scope.

get_at_resource_group_level

Gets a management lock at the resource group level.

list_at_resource_group_level

Gets all the management locks of a resource group.

list_at_resource_level

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

list_at_subscription_level

Gets all the management locks of a subscription.

create_or_update_at_resource_group_level

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

async 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

Parameters

Name Description
resource_group_name
Required
str

The resource group name. Required.

lock_name
Required
str

The lock name. Required.

parameters
Required

The management lock parameters. Is either a ManagementLockObject type or a IO[bytes] type. Required.

Returns

Type Description

ManagementLockObject or the result of cls(response)

Exceptions

Type Description

create_or_update_at_resource_level

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

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

resource_provider_namespace
Required
str

Resource identity. Required.

parent_resource_path
Required
str

Resource identity. Required.

resource_type
Required
str

Resource identity. Required.

resource_name
Required
str

Resource identity. Required.

lock_name
Required
str

The name of lock. Required.

parameters
Required

Create or update management lock parameters. Is either a ManagementLockObject type or a IO[bytes] type. Required.

Returns

Type Description

ManagementLockObject or the result of cls(response)

Exceptions

Type Description

create_or_update_at_subscription_level

Create or update a management lock at the subscription level.

async create_or_update_at_subscription_level(lock_name: str, parameters: _models.ManagementLockObject, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ManagementLockObject

Parameters

Name Description
lock_name
Required
str

The name of lock. Required.

parameters
Required

The management lock parameters. Is either a ManagementLockObject type or a IO[bytes] type. Required.

Returns

Type Description

ManagementLockObject or the result of cls(response)

Exceptions

Type Description

delete_at_resource_group_level

Deletes the management lock of a resource group.

async delete_at_resource_group_level(resource_group_name: str, lock_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The resource group name. Required.

lock_name
Required
str

The name of lock. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

delete_at_resource_level

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

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

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

resource_provider_namespace
Required
str

Resource identity. Required.

parent_resource_path
Required
str

Resource identity. Required.

resource_type
Required
str

Resource identity. Required.

resource_name
Required
str

Resource identity. Required.

lock_name
Required
str

The name of lock. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

delete_at_subscription_level

Deletes the management lock of a subscription.

async delete_at_subscription_level(lock_name: str, **kwargs: Any) -> None

Parameters

Name Description
lock_name
Required
str

The name of lock. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets the management lock of a scope.

async get(lock_name: str, **kwargs: Any) -> ManagementLockObject

Parameters

Name Description
lock_name
Required
str

Name of the management lock. Required.

Returns

Type Description

ManagementLockObject or the result of cls(response)

Exceptions

Type Description

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) -> ManagementLockObject

Parameters

Name Description
resource_group_name
Required
str

The resource group name. Required.

lock_name
Required
str

The lock name. Required.

Returns

Type Description

ManagementLockObject or the result of cls(response)

Exceptions

Type Description

list_at_resource_group_level

Gets all the management locks of a resource group.

list_at_resource_group_level(resource_group_name: str, filter: str | None = None, **kwargs: Any) -> AsyncIterable[ManagementLockObject]

Parameters

Name Description
resource_group_name
Required
str

Resource group name. Required.

filter
Required
str

The filter to apply on the operation. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

list_at_resource_level

Gets all the management locks of 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: str | None = None, **kwargs: Any) -> AsyncIterable[ManagementLockObject]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

resource_provider_namespace
Required
str

Resource identity. Required.

parent_resource_path
Required
str

Resource identity. Required.

resource_type
Required
str

Resource identity. Required.

resource_name
Required
str

Resource identity. Required.

filter
Required
str

The filter to apply on the operation. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

list_at_subscription_level

Gets all the management locks of a subscription.

list_at_subscription_level(filter: str | None = None, **kwargs: Any) -> AsyncIterable[ManagementLockObject]

Parameters

Name Description
filter
Required
str

The filter to apply on the operation. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.resource.locks.v2015_01_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\resource\\locks\\v2015_01_01\\models\\__init__.py'>