ManagementLockClient
Azure resources can be locked to prevent other users in your organization from deleting or modifying resources
COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
"swagger": "2.0",
"schemes": [
"https"
],
"host": "management.azure.com",
"info": {
"description": "Azure resources can be locked to prevent other users in your organization from deleting or modifying resources.",
"title": "ManagementLockClient",
"version": "2016-09-01",
"x-apisguru-categories": [
"cloud"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
},
"x-origin": [
{
"format": "swagger",
"url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/resources/resource-manager/Microsoft.Authorization/stable/2016-09-01/locks.json",
"version": "2.0"
}
],
"x-preferred": true,
"x-providerName": "azure.com",
"x-serviceName": "resources-locks",
"x-tags": [
"Azure",
"Microsoft"
]
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"securityDefinitions": {
"azure_auth": {
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"scopes": {
"user_impersonation": "impersonate your user account"
},
"type": "oauth2"
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"parameters": {
"ApiVersionParameter": {
"description": "The API version to use for the operation.",
"in": "query",
"name": "api-version",
"required": true,
"type": "string"
},
"SubscriptionIdParameter": {
"description": "The ID of the target subscription.",
"in": "path",
"name": "subscriptionId",
"required": true,
"type": "string"
}
},
"paths": {
"/providers/Microsoft.Authorization/operations": {
"get": {
"description": "Lists all of the available Microsoft.Authorization REST API operations.",
"operationId": "AuthorizationOperations_List",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/OperationListResult"
}
}
},
"tags": [
"Operations"
],
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks": {
"get": {
"description": "Gets all the management locks for a subscription.",
"operationId": "ManagementLocks_ListAtSubscriptionLevel",
"parameters": [
{
"description": "The filter to apply on the operation.",
"in": "query",
"name": "$filter",
"required": false,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns an array of resource locks.",
"schema": {
"$ref": "#/definitions/ManagementLockListResult"
}
}
},
"tags": [
"ManagementLocks"
],
"x-ms-odata": "#/definitions/ManagementLockObject",
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}": {
"delete": {
"description": "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.",
"operationId": "ManagementLocks_DeleteAtSubscriptionLevel",
"parameters": [
{
"description": "The name of lock to delete.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"204": {
"description": "NoContent"
}
},
"summary": "Deletes the management lock at the subscription level.",
"tags": [
"ManagementLocks"
]
},
"get": {
"description": "Gets a management lock at the subscription level.",
"operationId": "ManagementLocks_GetAtSubscriptionLevel",
"parameters": [
{
"description": "The name of the lock to get.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the lock.",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
}
},
"tags": [
"ManagementLocks"
]
},
"put": {
"description": "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.",
"operationId": "ManagementLocks_CreateOrUpdateAtSubscriptionLevel",
"parameters": [
{
"description": "The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \\, ?, /, or any control characters.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"description": "The management lock parameters.",
"in": "body",
"name": "parameters",
"required": true,
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the lock.",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
},
"201": {
"description": "Created - Returns information about the lock.",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
}
},
"summary": "Creates or updates a management lock at the subscription level.",
"tags": [
"ManagementLocks"
]
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks": {
"get": {
"description": "Gets all the management locks for a resource group.",
"operationId": "ManagementLocks_ListAtResourceGroupLevel",
"parameters": [
{
"description": "The name of the resource group containing the locks to get.",
"in": "path",
"maxLength": 90,
"minLength": 1,
"name": "resourceGroupName",
"pattern": "^[-\\w\\._\\(\\)]+$",
"required": true,
"type": "string"
},
{
"description": "The filter to apply on the operation.",
"in": "query",
"name": "$filter",
"required": false,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns an array of resource locks.",
"schema": {
"$ref": "#/definitions/ManagementLockListResult"
}
}
},
"tags": [
"ManagementLocks"
],
"x-ms-odata": "#/definitions/ManagementLockObject",
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}": {
"delete": {
"description": "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.",
"operationId": "ManagementLocks_DeleteAtResourceGroupLevel",
"parameters": [
{
"description": "The name of the resource group containing the lock.",
"in": "path",
"maxLength": 90,
"minLength": 1,
"name": "resourceGroupName",
"pattern": "^[-\\w\\._\\(\\)]+$",
"required": true,
"type": "string"
},
{
"description": "The name of lock to delete.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"204": {
"description": "NoContent"
}
},
"summary": "Deletes a management lock at the resource group level.",
"tags": [
"ManagementLocks"
]
},
"get": {
"description": "Gets a management lock at the resource group level.",
"operationId": "ManagementLocks_GetAtResourceGroupLevel",
"parameters": [
{
"description": "The name of the locked resource group.",
"in": "path",
"maxLength": 90,
"minLength": 1,
"name": "resourceGroupName",
"pattern": "^[-\\w\\._\\(\\)]+$",
"required": true,
"type": "string"
},
{
"description": "The name of the lock to get.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the lock.",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
}
},
"tags": [
"ManagementLocks"
]
},
"put": {
"description": "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.",
"operationId": "ManagementLocks_CreateOrUpdateAtResourceGroupLevel",
"parameters": [
{
"description": "The name of the resource group to lock.",
"in": "path",
"maxLength": 90,
"minLength": 1,
"name": "resourceGroupName",
"pattern": "^[-\\w\\._\\(\\)]+$",
"required": true,
"type": "string"
},
{
"description": "The lock name. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \\, ?, /, or any control characters.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"description": "The management lock parameters.",
"in": "body",
"name": "parameters",
"required": true,
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the lock.",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
},
"201": {
"description": "Created - Returns information about the lock.",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
}
},
"summary": "Creates or updates a management lock at the resource group level.",
"tags": [
"ManagementLocks"
]
}
},
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks": {
"get": {
"description": "Gets all the management locks for a resource or any level below resource.",
"operationId": "ManagementLocks_ListAtResourceLevel",
"parameters": [
{
"description": "The name of the resource group containing the locked resource. The name is case insensitive.",
"in": "path",
"maxLength": 90,
"minLength": 1,
"name": "resourceGroupName",
"pattern": "^[-\\w\\._\\(\\)]+$",
"required": true,
"type": "string"
},
{
"description": "The namespace of the resource provider.",
"in": "path",
"name": "resourceProviderNamespace",
"required": true,
"type": "string"
},
{
"description": "The parent resource identity.",
"in": "path",
"name": "parentResourcePath",
"required": true,
"type": "string",
"x-ms-skip-url-encoding": true
},
{
"description": "The resource type of the locked resource.",
"in": "path",
"name": "resourceType",
"required": true,
"type": "string",
"x-ms-skip-url-encoding": true
},
{
"description": "The name of the locked resource.",
"in": "path",
"name": "resourceName",
"required": true,
"type": "string"
},
{
"description": "The filter to apply on the operation.",
"in": "query",
"name": "$filter",
"required": false,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns an array of resource locks.",
"schema": {
"$ref": "#/definitions/ManagementLockListResult"
}
}
},
"tags": [
"ManagementLocks"
],
"x-ms-odata": "#/definitions/ManagementLockObject",
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}": {
"delete": {
"description": "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.",
"operationId": "ManagementLocks_DeleteAtResourceLevel",
"parameters": [
{
"description": "The name of the resource group containing the resource with the lock to delete. ",
"in": "path",
"maxLength": 90,
"minLength": 1,
"name": "resourceGroupName",
"pattern": "^[-\\w\\._\\(\\)]+$",
"required": true,
"type": "string"
},
{
"description": "The resource provider namespace of the resource with the lock to delete.",
"in": "path",
"name": "resourceProviderNamespace",
"required": true,
"type": "string"
},
{
"description": "The parent resource identity.",
"in": "path",
"name": "parentResourcePath",
"required": true,
"type": "string",
"x-ms-skip-url-encoding": true
},
{
"description": "The resource type of the resource with the lock to delete.",
"in": "path",
"name": "resourceType",
"required": true,
"type": "string",
"x-ms-skip-url-encoding": true
},
{
"description": "The name of the resource with the lock to delete.",
"in": "path",
"name": "resourceName",
"required": true,
"type": "string"
},
{
"description": "The name of the lock to delete.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"204": {
"description": "NoContent"
}
},
"summary": "Deletes the management lock of a resource or any level below the resource.",
"tags": [
"ManagementLocks"
]
},
"get": {
"description": "Get the management lock of a resource or any level below resource.",
"operationId": "ManagementLocks_GetAtResourceLevel",
"parameters": [
{
"description": "The name of the resource group. ",
"in": "path",
"maxLength": 90,
"minLength": 1,
"name": "resourceGroupName",
"pattern": "^[-\\w\\._\\(\\)]+$",
"required": true,
"type": "string"
},
{
"description": "The namespace of the resource provider.",
"in": "path",
"name": "resourceProviderNamespace",
"required": true,
"type": "string"
},
{
"description": "An extra path parameter needed in some services, like SQL Databases.",
"in": "path",
"name": "parentResourcePath",
"required": true,
"type": "string",
"x-ms-skip-url-encoding": true
},
{
"description": "The type of the resource.",
"in": "path",
"name": "resourceType",
"required": true,
"type": "string",
"x-ms-skip-url-encoding": true
},
{
"description": "The name of the resource.",
"in": "path",
"name": "resourceName",
"required": true,
"type": "string"
},
{
"description": "The name of lock.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
}
},
"tags": [
"ManagementLocks"
]
},
"put": {
"description": "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.",
"operationId": "ManagementLocks_CreateOrUpdateAtResourceLevel",
"parameters": [
{
"description": "The name of the resource group containing the resource to lock. ",
"in": "path",
"maxLength": 90,
"minLength": 1,
"name": "resourceGroupName",
"pattern": "^[-\\w\\._\\(\\)]+$",
"required": true,
"type": "string"
},
{
"description": "The resource provider namespace of the resource to lock.",
"in": "path",
"name": "resourceProviderNamespace",
"required": true,
"type": "string"
},
{
"description": "The parent resource identity.",
"in": "path",
"name": "parentResourcePath",
"required": true,
"type": "string",
"x-ms-skip-url-encoding": true
},
{
"description": "The resource type of the resource to lock.",
"in": "path",
"name": "resourceType",
"required": true,
"type": "string",
"x-ms-skip-url-encoding": true
},
{
"description": "The name of the resource to lock.",
"in": "path",
"name": "resourceName",
"required": true,
"type": "string"
},
{
"description": "The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \\, ?, /, or any control characters.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"description": "Parameters for creating or updating a management lock.",
"in": "body",
"name": "parameters",
"required": true,
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the lock.",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
},
"201": {
"description": "Created - Returns information about the lock.",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
}
},
"summary": "Creates or updates a management lock at the resource level or any level below the resource.",
"tags": [
"ManagementLocks"
]
}
},
"/{scope}/providers/Microsoft.Authorization/locks": {
"get": {
"description": "Gets all the management locks for a scope.",
"operationId": "ManagementLocks_ListByScope",
"parameters": [
{
"description": "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.",
"in": "path",
"name": "scope",
"required": true,
"type": "string"
},
{
"description": "The filter to apply on the operation.",
"in": "query",
"name": "$filter",
"required": false,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns an array of resource locks.",
"schema": {
"$ref": "#/definitions/ManagementLockListResult"
}
}
},
"tags": [
"ManagementLocks"
],
"x-ms-odata": "#/definitions/ManagementLockObject",
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/{scope}/providers/Microsoft.Authorization/locks/{lockName}": {
"delete": {
"description": "Delete a management lock by scope.",
"operationId": "ManagementLocks_DeleteByScope",
"parameters": [
{
"description": "The scope for the lock. ",
"in": "path",
"name": "scope",
"required": true,
"type": "string"
},
{
"description": "The name of lock.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"204": {
"description": "NoContent"
}
},
"tags": [
"ManagementLocks"
]
},
"get": {
"description": "Get a management lock by scope.",
"operationId": "ManagementLocks_GetByScope",
"parameters": [
{
"description": "The scope for the lock. ",
"in": "path",
"name": "scope",
"required": true,
"type": "string"
},
{
"description": "The name of lock.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
}
},
"tags": [
"ManagementLocks"
]
},
"put": {
"description": "Create or update a management lock by scope.",
"operationId": "ManagementLocks_CreateOrUpdateByScope",
"parameters": [
{
"description": "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.",
"in": "path",
"name": "scope",
"required": true,
"type": "string"
},
{
"description": "The name of lock.",
"in": "path",
"name": "lockName",
"required": true,
"type": "string"
},
{
"description": "Create or update management lock parameters.",
"in": "body",
"name": "parameters",
"required": true,
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
},
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/ManagementLockObject"
}
}
},
"tags": [
"ManagementLocks"
]
}
}
},
"definitions": {
"ManagementLockListResult": {
"description": "The list of locks.",
"properties": {
"nextLink": {
"description": "The URL to use for getting the next set of results.",
"type": "string"
},
"value": {
"description": "The list of locks.",
"items": {
"$ref": "#/definitions/ManagementLockObject"
},
"type": "array"
}
}
},
"ManagementLockObject": {
"description": "The lock information.",
"properties": {
"id": {
"description": "The resource ID of the lock.",
"readOnly": true,
"type": "string"
},
"name": {
"description": "The name of the lock.",
"readOnly": true,
"type": "string"
},
"properties": {
"$ref": "#/definitions/ManagementLockProperties",
"description": "The properties of the lock.",
"x-ms-client-flatten": true
},
"type": {
"description": "The resource type of the lock - Microsoft.Authorization/locks.",
"readOnly": true,
"type": "string"
}
},
"required": [
"properties"
],
"x-ms-azure-resource": true
},
"ManagementLockOwner": {
"description": "Lock owner properties.",
"properties": {
"applicationId": {
"description": "The application ID of the lock owner.",
"type": "string"
}
}
},
"ManagementLockProperties": {
"description": "The lock properties.",
"properties": {
"level": {
"description": "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.",
"enum": [
"NotSpecified",
"CanNotDelete",
"ReadOnly"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "LockLevel"
}
},
"notes": {
"description": "Notes about the lock. Maximum of 512 characters.",
"type": "string"
},
"owners": {
"description": "The owners of the lock.",
"items": {
"$ref": "#/definitions/ManagementLockOwner"
},
"type": "array"
}
},
"required": [
"level"
]
},
"Operation": {
"description": "Microsoft.Authorization operation",
"properties": {
"display": {
"description": "The object that represents the operation.",
"properties": {
"operation": {
"description": "Operation type: Read, write, delete, etc.",
"type": "string"
},
"provider": {
"description": "Service provider: Microsoft.Authorization",
"type": "string"
},
"resource": {
"description": "Resource on which the operation is performed: Profile, endpoint, etc.",
"type": "string"
}
}
},
"name": {
"description": "Operation name: {provider}/{resource}/{operation}",
"type": "string"
}
},
"type": "object"
},
"OperationListResult": {
"description": "Result of the request to list Microsoft.Authorization operations. It contains a list of operations and a URL link to get the next set of results.",
"properties": {
"nextLink": {
"description": "URL to get the next set of operation list results if there are any.",
"type": "string"
},
"value": {
"description": "List of Microsoft.Authorization operations.",
"items": {
"$ref": "#/definitions/Operation"
},
"type": "array"
}
}
}
}
}