Bagikan melalui


ManagementLocksOperationsExtensions.CreateOrUpdateByScopeAsync Method

Definition

Create or update a management lock by scope.

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Models.ManagementLockObject> CreateOrUpdateByScopeAsync (this Microsoft.Azure.Management.ResourceManager.IManagementLocksOperations operations, string scope, string lockName, Microsoft.Azure.Management.ResourceManager.Models.ManagementLockObject parameters, System.Threading.CancellationToken cancellationToken = default);
static member CreateOrUpdateByScopeAsync : Microsoft.Azure.Management.ResourceManager.IManagementLocksOperations * string * string * Microsoft.Azure.Management.ResourceManager.Models.ManagementLockObject * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Models.ManagementLockObject>
<Extension()>
Public Function CreateOrUpdateByScopeAsync (operations As IManagementLocksOperations, scope As String, lockName As String, parameters As ManagementLockObject, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ManagementLockObject)

Parameters

operations
IManagementLocksOperations

The operations group for this extension method.

scope
String

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.

lockName
String

The name of lock.

parameters
ManagementLockObject

Create or update management lock parameters.

cancellationToken
CancellationToken

The cancellation token.

Returns

Applies to