Beispiel #1
0
 /// <summary>
 /// Get the management lock of a resource or any level below resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='resourceProviderNamespace'>
 /// The namespace of the resource provider.
 /// </param>
 /// <param name='parentResourcePath'>
 /// An extra path parameter needed in some services, like SQL Databases.
 /// </param>
 /// <param name='resourceType'>
 /// The type of the resource.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the resource.
 /// </param>
 /// <param name='lockName'>
 /// The name of lock.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ManagementLockObject> GetAtResourceLevelAsync(this IManagementLocksOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string lockName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAtResourceLevelWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, lockName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }