///GENMHASH:A461D6864EB7CB1DB406AFD2F9FFEF86:475DF4B0DBDD12D825C5DB54678ADA4A
 protected override IManagementLock WrapModel(ManagementLockObjectInner inner)
 {
     return((inner != null) ? new ManagementLockImpl(inner.Id, inner, Manager()) : null);
 }
示例#2
0
 /// <summary>
 /// Creates or updates a management lock at the resource group level.
 /// </summary>
 /// <remarks>
 /// 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.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to lock.
 /// </param>
 /// <param name='lockName'>
 /// The lock name. The lock name can be a maximum of 260 characters. It cannot
 /// contain &lt;, &gt; %, &amp;, :, \, ?, /, or any control characters.
 /// </param>
 /// <param name='parameters'>
 /// The management lock parameters.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ManagementLockObjectInner> CreateOrUpdateAtResourceGroupLevelAsync(this IManagementLocksOperations operations, string resourceGroupName, string lockName, ManagementLockObjectInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateAtResourceGroupLevelWithHttpMessagesAsync(resourceGroupName, lockName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }