{ "swagger": "2.0", "info": { "title": "ManagementLockClient", "version": "2015-01-01" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}": { "put": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_CreateOrUpdateAtResourceGroupLevel", "description": "Create or update a management lock at the resource group level.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The resource group name.", "pattern": "^[-\\w\\._\\(\\)]+$", "minLength": 1, "maxLength": 90 }, { "name": "lockName", "in": "path", "required": true, "type": "string", "description": "The lock name." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ManagementLockObject" }, "description": "The management lock parameters." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementLockObject" } }, "201": { "description": "Created", "schema": { "$ref": "#/definitions/ManagementLockObject" } } } }, "delete": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_DeleteAtResourceGroupLevel", "description": "Deletes the management lock of a resource group.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The resource group name.", "pattern": "^[-\\w\\._\\(\\)]+$", "minLength": 1, "maxLength": 90 }, { "name": "lockName", "in": "path", "required": true, "type": "string", "description": "The name of lock." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "NoContent" }, "200": { "description": "OK" } } }, "get": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_GetAtResourceGroupLevel", "description": "Gets a management lock at the resource group level.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The resource group name.", "pattern": "^[-\\w\\._\\(\\)]+$", "minLength": 1, "maxLength": 90 }, { "name": "lockName", "in": "path", "required": true, "type": "string", "description": "The lock name." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementLockObject" } } } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}": { "put": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_CreateOrUpdateAtResourceLevel", "description": "Create or update a management lock at the resource level or any level below resource.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group. ", "pattern": "^[-\\w\\._\\(\\)]+$", "minLength": 1, "maxLength": 90 }, { "name": "resourceProviderNamespace", "in": "path", "required": true, "type": "string", "description": "Resource identity." }, { "name": "parentResourcePath", "in": "path", "required": true, "type": "string", "description": "Resource identity.", "x-ms-skip-url-encoding": true }, { "name": "resourceType", "in": "path", "required": true, "type": "string", "description": "Resource identity.", "x-ms-skip-url-encoding": true }, { "name": "resourceName", "in": "path", "required": true, "type": "string", "description": "Resource identity." }, { "name": "lockName", "in": "path", "required": true, "type": "string", "description": "The name of lock." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ManagementLockObject" }, "description": "Create or update management lock parameters." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementLockObject" } }, "201": { "description": "Created", "schema": { "$ref": "#/definitions/ManagementLockObject" } } } }, "delete": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_DeleteAtResourceLevel", "description": "Deletes the management lock of a resource or any level below resource.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group. ", "pattern": "^[-\\w\\._\\(\\)]+$", "minLength": 1, "maxLength": 90 }, { "name": "resourceProviderNamespace", "in": "path", "required": true, "type": "string", "description": "Resource identity." }, { "name": "parentResourcePath", "in": "path", "required": true, "type": "string", "description": "Resource identity.", "x-ms-skip-url-encoding": true }, { "name": "resourceType", "in": "path", "required": true, "type": "string", "description": "Resource identity.", "x-ms-skip-url-encoding": true }, { "name": "resourceName", "in": "path", "required": true, "type": "string", "description": "Resource identity." }, { "name": "lockName", "in": "path", "required": true, "type": "string", "description": "The name of lock." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "NoContent" }, "200": { "description": "OK" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}": { "put": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_CreateOrUpdateAtSubscriptionLevel", "description": "Create or update a management lock at the subscription level.", "parameters": [ { "name": "lockName", "in": "path", "required": true, "type": "string", "description": "The name of lock." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ManagementLockObject" }, "description": "The management lock parameters." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/ManagementLockObject" } }, "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementLockObject" } } } }, "delete": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_DeleteAtSubscriptionLevel", "description": "Deletes the management lock of a subscription.", "parameters": [ { "name": "lockName", "in": "path", "required": true, "type": "string", "description": "The name of lock." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "NoContent" }, "200": { "description": "OK" } } }, "get": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_Get", "description": "Gets the management lock of a scope.", "parameters": [ { "name": "lockName", "in": "path", "required": true, "type": "string", "description": "Name of the management lock." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementLockObject" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks": { "get": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_ListAtResourceGroupLevel", "description": "Gets all the management locks of a resource group.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "Resource group name.", "pattern": "^[-\\w\\._\\(\\)]+$", "minLength": 1, "maxLength": 90 }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementLockListResult" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ManagementLockObject" } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks": { "get": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_ListAtResourceLevel", "description": "Gets all the management locks of a resource or any level below resource.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group. The name is case insensitive.", "pattern": "^[-\\w\\._\\(\\)]+$", "minLength": 1, "maxLength": 90 }, { "name": "resourceProviderNamespace", "in": "path", "required": true, "type": "string", "description": "Resource identity." }, { "name": "parentResourcePath", "in": "path", "required": true, "type": "string", "description": "Resource identity.", "x-ms-skip-url-encoding": true }, { "name": "resourceType", "in": "path", "required": true, "type": "string", "description": "Resource identity.", "x-ms-skip-url-encoding": true }, { "name": "resourceName", "in": "path", "required": true, "type": "string", "description": "Resource identity." }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementLockListResult" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ManagementLockObject" } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks": { "get": { "tags": [ "ManagementLocks" ], "operationId": "ManagementLocks_ListAtSubscriptionLevel", "description": "Gets all the management locks of a subscription.", "parameters": [ { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementLockListResult" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ManagementLockObject" } } }, "definitions": { "ManagementLockProperties": { "properties": { "level": { "type": "string", "description": "The lock level of the management lock.", "enum": [ "NotSpecified", "CanNotDelete", "ReadOnly" ], "x-ms-enum": { "name": "LockLevel", "modelAsString": true } }, "notes": { "type": "string", "description": "The notes of the management lock." } }, "description": "The management lock properties." }, "ManagementLockObject": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/ManagementLockProperties", "description": "The properties of the lock." }, "id": { "readOnly": true, "type": "string", "description": "The Id of the lock." }, "type": { "readOnly": true, "type": "string", "description": "The type of the lock." }, "name": { "type": "string", "description": "The name of the lock." } }, "description": "Management lock information.", "x-ms-azure-resource": true }, "ManagementLockListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/ManagementLockObject" }, "description": "The list of locks." }, "nextLink": { "type": "string", "description": "The URL to get the next set of results." } }, "description": "List of management locks." } }, "parameters": { "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", "required": true, "type": "string", "description": "The ID of the target subscription." }, "ApiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "The API version to use for the operation." } } }