---
title: "PUT /{scope}/providers/Microsoft.Authorization/locks/{lockName}"
method: PUT
path: "/{scope}/providers/Microsoft.Authorization/locks/{lockName}"
tags: ["ManagementLocks"]
---

# PUT /{scope}/providers/Microsoft.Authorization/locks/{lockName}

`PUT /{scope}/providers/Microsoft.Authorization/locks/{lockName}`

Create or update a management lock by scope.

## Path parameters

- `scope` string, required
- `lockName` string, required

## Query parameters

- `api-version` string, required

## Request body

- ManagementLockObject — The lock information.
  - `properties` ManagementLockProperties, required — The lock properties.
    - `level` 'NotSpecified' | 'CanNotDelete' | 'ReadOnly', required — The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
    - `notes` string — Notes about the lock. Maximum of 512 characters.
    - `owners` ManagementLockOwner[] — The owners of the lock.
      - `applicationId` string — The application ID of the lock owner.
  - `id` string — The resource ID of the lock.
  - `type` string — The resource type of the lock - Microsoft.Authorization/locks.
  - `name` string — The name of the lock.

## Response `200`

OK

- ManagementLockObject — The lock information.
  - `properties` ManagementLockProperties, required — The lock properties.
    - `level` 'NotSpecified' | 'CanNotDelete' | 'ReadOnly', required — The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
    - `notes` string — Notes about the lock. Maximum of 512 characters.
    - `owners` ManagementLockOwner[] — The owners of the lock.
      - `applicationId` string — The application ID of the lock owner.
  - `id` string — The resource ID of the lock.
  - `type` string — The resource type of the lock - Microsoft.Authorization/locks.
  - `name` string — The name of the lock.

## Other responses

- `201` — Created

---

[API](https://skmtc.net/azure/apis/managementlockclient.md) · [All operations](https://skmtc.net/azure/apis/managementlockclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/managementlockclient/versions/f7fac92f6c97/schema)
