ManagementLocksOperations.CreateOrUpdateAtSubscriptionLevel(String, ManagementLockObject, CancellationToken) Method

Definition

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.

public virtual Azure.Response<Azure.ResourceManager.Resources.Models.ManagementLockObject> CreateOrUpdateAtSubscriptionLevel (string lockName, Azure.ResourceManager.Resources.Models.ManagementLockObject parameters, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAtSubscriptionLevel : string * Azure.ResourceManager.Resources.Models.ManagementLockObject * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Models.ManagementLockObject>
override this.CreateOrUpdateAtSubscriptionLevel : string * Azure.ResourceManager.Resources.Models.ManagementLockObject * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Models.ManagementLockObject>
Public Overridable Function CreateOrUpdateAtSubscriptionLevel (lockName As String, parameters As ManagementLockObject, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ManagementLockObject)

Parameters

lockName
System.String

The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.

parameters
ManagementLockObject

The management lock parameters.

cancellationToken
System.Threading.CancellationToken

The cancellation token to use.

Returns

Response<ManagementLockObject>

Applies to