swagger: '2.0' info: title: Microsoft Azure ManagementLockClient version: '2020-05-01' description: >- Azure resources can be locked to prevent other users in your organization from deleting or modifying resources. 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: /providers/Microsoft.Authorization/operations: get: tags: - Operations operationId: microsoftAzureAuthorizationoperationsList description: Lists all of the available Microsoft.Authorization REST API operations. parameters: - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter responses: '200': description: OK. The request has succeeded. schema: $ref: '#/definitions/OperationListResult' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-pageable: nextLinkName: nextLink x-ms-examples: List provider operations: $ref: ./examples/ListProviderOperations.json summary: Microsoft Azure Get Providers Microsoft Authorization Operations /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}: put: tags: - ManagementLocks operationId: microsoftAzureManagementlocksCreateorupdateatresourcegrouplevel summary: 'Microsoft Azure Creates Or Updates A Management Lock At The Resource Group Level' 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. parameters: - name: resourceGroupName in: path required: true type: string description: The name of the resource group to lock. pattern: ^[-\w\._\(\)]+$ minLength: 1 maxLength: 90 - name: lockName in: path 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. - name: parameters in: body required: true schema: $ref: '#/definitions/ManagementLockObject' description: The management lock parameters. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/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' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Create management lock at resource group level: $ref: ./examples/ManagementLocks_CreateOrUpdateAtResourceGroupLevel.json delete: tags: - ManagementLocks operationId: microsoftAzureManagementlocksDeleteatresourcegrouplevel summary: 'Microsoft Azure Deletes A Management Lock At The Resource Group Level' 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. parameters: - name: resourceGroupName in: path required: true type: string description: The name of the resource group containing the lock. pattern: ^[-\w\._\(\)]+$ minLength: 1 maxLength: 90 - name: lockName in: path required: true type: string description: The name of lock to delete. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK '204': description: NoContent default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Delete management lock at resource group level: $ref: ./examples/ManagementLocks_DeleteAtResourceGroupLevel.json get: tags: - ManagementLocks operationId: microsoftAzureManagementlocksGetatresourcegrouplevel description: Gets a management lock at the resource group level. parameters: - name: resourceGroupName in: path required: true type: string description: The name of the locked resource group. pattern: ^[-\w\._\(\)]+$ minLength: 1 maxLength: 90 - name: lockName in: path required: true type: string description: The name of the lock to get. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK - Returns information about the lock. schema: $ref: '#/definitions/ManagementLockObject' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Get management lock at resource group level: $ref: ./examples/ManagementLocks_GetAtResourceGroupLevel.json summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Authorization Locks Lockname /{scope}/providers/Microsoft.Authorization/locks/{lockName}: put: tags: - ManagementLocks operationId: microsoftAzureManagementlocksCreateorupdatebyscope description: Create or update a management lock by scope. parameters: - name: scope in: path required: true type: string 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. - 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: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter responses: '200': description: OK schema: $ref: '#/definitions/ManagementLockObject' '201': description: Created schema: $ref: '#/definitions/ManagementLockObject' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Create management lock at scope: $ref: ./examples/ManagementLocks_CreateOrUpdateAtScope.json summary: Microsoft Azure Put Scope Providers Microsoft Authorization Locks Lockname delete: tags: - ManagementLocks operationId: microsoftAzureManagementlocksDeletebyscope description: Delete a management lock by scope. parameters: - name: scope in: path required: true type: string description: 'The scope for the lock. ' - name: lockName in: path required: true type: string description: The name of lock. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter responses: '200': description: OK '204': description: NoContent default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Delete management lock at scope: $ref: ./examples/ManagementLocks_DeleteAtScope.json summary: Microsoft Azure Delete Scope Providers Microsoft Authorization Locks Lockname get: tags: - ManagementLocks operationId: microsoftAzureManagementlocksGetbyscope description: Get a management lock by scope. parameters: - name: scope in: path required: true type: string description: 'The scope for the lock. ' - name: lockName in: path required: true type: string description: The name of lock. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter responses: '200': description: OK schema: $ref: '#/definitions/ManagementLockObject' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Get management lock at scope: $ref: ./examples/ManagementLocks_GetAtScope.json summary: Microsoft Azure Get Scope Providers Microsoft Authorization Locks Lockname ? /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName} : put: tags: - ManagementLocks operationId: microsoftAzureManagementlocksCreateorupdateatresourcelevel summary: >- Microsoft Azure Creates Or Updates A Management Lock At The Resource Level Or Any Level Below The Resource 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. parameters: - name: resourceGroupName in: path required: true type: string description: 'The name of the resource group containing the resource to lock. ' pattern: ^[-\w\._\(\)]+$ minLength: 1 maxLength: 90 - name: resourceProviderNamespace in: path required: true type: string description: The resource provider namespace of the resource to lock. - name: parentResourcePath in: path required: true type: string description: The parent resource identity. x-ms-skip-url-encoding: true - name: resourceType in: path required: true type: string description: The resource type of the resource to lock. x-ms-skip-url-encoding: true - name: resourceName in: path required: true type: string description: The name of the resource to lock. - name: lockName in: path 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. - name: parameters in: body required: true schema: $ref: '#/definitions/ManagementLockObject' description: Parameters for creating or updating a management lock. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/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' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Create management lock at resource level: $ref: ./examples/ManagementLocks_CreateOrUpdateAtResourceLevel.json delete: tags: - ManagementLocks operationId: microsoftAzureManagementlocksDeleteatresourcelevel summary: >- Microsoft Azure Deletes The Management Lock Of A Resource Or Any Level Below The Resource 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. parameters: - name: resourceGroupName in: path required: true type: string description: >- The name of the resource group containing the resource with the lock to delete. pattern: ^[-\w\._\(\)]+$ minLength: 1 maxLength: 90 - name: resourceProviderNamespace in: path required: true type: string description: >- The resource provider namespace of the resource with the lock to delete. - name: parentResourcePath in: path required: true type: string description: The parent resource identity. x-ms-skip-url-encoding: true - name: resourceType in: path required: true type: string description: The resource type of the resource with the lock to delete. x-ms-skip-url-encoding: true - name: resourceName in: path required: true type: string description: The name of the resource with the lock to delete. - name: lockName in: path required: true type: string description: The name of the lock to delete. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK '204': description: NoContent default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Delete management lock at resource level: $ref: ./examples/ManagementLocks_DeleteAtResourceLevel.json get: tags: - ManagementLocks operationId: microsoftAzureManagementlocksGetatresourcelevel description: Get 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: The namespace of the resource provider. - name: parentResourcePath in: path required: true type: string description: An extra path parameter needed in some services, like SQL Databases. x-ms-skip-url-encoding: true - name: resourceType in: path required: true type: string description: The type of the resource. x-ms-skip-url-encoding: true - name: resourceName in: path required: true type: string description: The name of the resource. - name: lockName in: path required: true type: string description: The name of lock. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK schema: $ref: '#/definitions/ManagementLockObject' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Get management lock at resource level: $ref: ./examples/ManagementLocks_GetAtResourceLevel.json summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Resourceprovidernamespace Parentresourcepath Resourcetype Resourcename Providers Microsoft Authorization Locks Lockname /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}: put: tags: - ManagementLocks operationId: microsoftAzureManagementlocksCreateorupdateatsubscriptionlevel summary: 'Microsoft Azure Creates Or Updates A Management Lock At The Subscription Level' 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. parameters: - name: lockName in: path 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. - name: parameters in: body required: true schema: $ref: '#/definitions/ManagementLockObject' description: The management lock parameters. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/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' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Create management lock at subscription level: $ref: ./examples/ManagementLocks_CreateOrUpdateAtSubscriptionLevel.json delete: tags: - ManagementLocks operationId: microsoftAzureManagementlocksDeleteatsubscriptionlevel summary: 'Microsoft Azure Deletes The Management Lock At The Subscription Level' 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. parameters: - name: lockName in: path required: true type: string description: The name of lock to delete. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK '204': description: NoContent default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Delete management lock at subscription level: $ref: ./examples/ManagementLocks_DeleteAtSubscriptionLevel.json get: tags: - ManagementLocks operationId: microsoftAzureManagementlocksGetatsubscriptionlevel description: Gets a management lock at the subscription level. parameters: - name: lockName in: path required: true type: string description: The name of the lock to get. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK - Returns information about the lock. schema: $ref: '#/definitions/ManagementLockObject' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-examples: Get management lock at subscription level: $ref: ./examples/ManagementLocks_GetAtSubscriptionLevel.json summary: >- Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Authorization Locks Lockname /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks: get: tags: - ManagementLocks operationId: microsoftAzureManagementlocksListatresourcegrouplevel description: Gets all the management locks for a resource group. parameters: - name: resourceGroupName in: path required: true type: string description: The name of the resource group containing the locks to get. pattern: ^[-\w\._\(\)]+$ minLength: 1 maxLength: 90 - name: $filter in: query required: false type: string description: The filter to apply on the operation. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK - Returns an array of resource locks. schema: $ref: '#/definitions/ManagementLockListResult' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-pageable: nextLinkName: nextLink x-ms-odata: '#/definitions/ManagementLockObject' x-ms-examples: List management groups at resource group level: $ref: ./examples/ManagementLocks_ListAtResourceGroupLevel.json summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Authorization Locks ? /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks : get: tags: - ManagementLocks operationId: microsoftAzureManagementlocksListatresourcelevel description: >- Gets all the management locks for a resource or any level below resource. parameters: - name: resourceGroupName in: path required: true type: string description: >- The name of the resource group containing the locked resource. The name is case insensitive. pattern: ^[-\w\._\(\)]+$ minLength: 1 maxLength: 90 - name: resourceProviderNamespace in: path required: true type: string description: The namespace of the resource provider. - name: parentResourcePath in: path required: true type: string description: The parent resource identity. x-ms-skip-url-encoding: true - name: resourceType in: path required: true type: string description: The resource type of the locked resource. x-ms-skip-url-encoding: true - name: resourceName in: path required: true type: string description: The name of the locked resource. - name: $filter in: query required: false type: string description: The filter to apply on the operation. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK - Returns an array of resource locks. schema: $ref: '#/definitions/ManagementLockListResult' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-pageable: nextLinkName: nextLink x-ms-odata: '#/definitions/ManagementLockObject' x-ms-examples: List management locks at resource level: $ref: ./examples/ManagementLocks_ListAtResourceLevel.json summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Resourceprovidernamespace Parentresourcepath Resourcetype Resourcename Providers Microsoft Authorization Locks /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks: get: tags: - ManagementLocks operationId: microsoftAzureManagementlocksListatsubscriptionlevel description: Gets all the management locks for a subscription. parameters: - name: $filter in: query required: false type: string description: The filter to apply on the operation. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - $ref: '#/parameters/SubscriptionIdParameter' responses: '200': description: OK - Returns an array of resource locks. schema: $ref: '#/definitions/ManagementLockListResult' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-pageable: nextLinkName: nextLink x-ms-odata: '#/definitions/ManagementLockObject' x-ms-examples: List management locks at subscription level: $ref: ./examples/ManagementLocks_ListAtSubscriptionLevel.json summary: Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Authorization Locks /{scope}/providers/Microsoft.Authorization/locks: get: tags: - ManagementLocks operationId: microsoftAzureManagementlocksListbyscope description: Gets all the management locks for a scope. parameters: - name: scope in: path required: true type: string 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. - name: $filter in: query required: false type: string description: The filter to apply on the operation. - $ref: >- ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter responses: '200': description: OK - Returns an array of resource locks. schema: $ref: '#/definitions/ManagementLockListResult' default: description: Error response describing why the operation failed. schema: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse x-ms-pageable: nextLinkName: nextLink x-ms-odata: '#/definitions/ManagementLockObject' x-ms-examples: List management locks at scope: $ref: ./examples/ManagementLocks_ListAtScope.json summary: Microsoft Azure Get Scope Providers Microsoft Authorization Locks definitions: ManagementLockOwner: properties: applicationId: type: string description: The application ID of the lock owner. description: Lock owner properties. ManagementLockProperties: properties: level: type: string 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 x-ms-enum: name: LockLevel modelAsString: true notes: type: string description: Notes about the lock. Maximum of 512 characters. owners: type: array items: $ref: '#/definitions/ManagementLockOwner' x-ms-identifiers: - applicationId description: The owners of the lock. required: - level description: The 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 resource ID of the lock. type: readOnly: true type: string description: The resource type of the lock - Microsoft.Authorization/locks. name: readOnly: true type: string description: The name of the lock. systemData: $ref: >- ../../../../../common-types/resource-management/v2/types.json#/definitions/systemData readOnly: true required: - properties description: The 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 use for getting the next set of results. description: The list of locks. Operation: description: Microsoft.Authorization operation type: object properties: name: description: 'Operation name: {provider}/{resource}/{operation}' type: string display: description: The object that represents the operation. properties: provider: description: 'Service provider: Microsoft.Authorization' type: string resource: description: >- Resource on which the operation is performed: Profile, endpoint, etc. type: string operation: description: 'Operation type: Read, write, delete, etc.' type: string 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: value: type: array items: $ref: '#/definitions/Operation' x-ms-identifiers: [] description: List of Microsoft.Authorization operations. nextLink: type: string description: URL to get the next set of operation list results if there are any. parameters: SubscriptionIdParameter: name: subscriptionId in: path required: true type: string description: The ID of the target subscription. tags: - name: ManagementLocks - name: Operations