/// <summary>
 /// Adds a user account to the specified compute node.
 /// </summary>
 /// <remarks>
 /// You can add a user account to a node only when it is in the idle or running
 /// state.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the pool that contains the compute node.
 /// </param>
 /// <param name='nodeId'>
 /// The ID of the machine on which you want to create a user account.
 /// </param>
 /// <param name='user'>
 /// The user account to be created.
 /// </param>
 /// <param name='computeNodeAddUserOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ComputeNodeAddUserHeaders> AddUserAsync(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeUser user, ComputeNodeAddUserOptions computeNodeAddUserOptions = default(ComputeNodeAddUserOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddUserWithHttpMessagesAsync(poolId, nodeId, user, computeNodeAddUserOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Adds a user account to the specified compute node.
 /// </summary>
 /// <remarks>
 /// You can add a user account to a node only when it is in the idle or running
 /// state.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the pool that contains the compute node.
 /// </param>
 /// <param name='nodeId'>
 /// The ID of the machine on which you want to create a user account.
 /// </param>
 /// <param name='user'>
 /// The user account to be created.
 /// </param>
 /// <param name='computeNodeAddUserOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static ComputeNodeAddUserHeaders AddUser(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeUser user, ComputeNodeAddUserOptions computeNodeAddUserOptions = default(ComputeNodeAddUserOptions))
 {
     return(operations.AddUserAsync(poolId, nodeId, user, computeNodeAddUserOptions).GetAwaiter().GetResult());
 }
예제 #3
0
 public virtual Response AddUser(string poolId, string nodeId, ComputeNodeUser user, ComputeNodeAddUserOptions computeNodeAddUserOptions, CancellationToken cancellationToken = default)
 {
     return(RestClient.AddUser(poolId, nodeId, user, computeNodeAddUserOptions, cancellationToken).GetRawResponse());
 }
 /// <summary>
 /// Adds a user account to the specified compute node.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The id of the pool that contains the compute node.
 /// </param>
 /// <param name='nodeId'>
 /// The id of the machine on which you want to create a user account.
 /// </param>
 /// <param name='user'>
 /// The user account to be created.
 /// </param>
 /// <param name='computeNodeAddUserOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static ComputeNodeAddUserHeaders AddUser(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeUser user, ComputeNodeAddUserOptions computeNodeAddUserOptions = default(ComputeNodeAddUserOptions))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IComputeNodeOperations)s).AddUserAsync(poolId, nodeId, user, computeNodeAddUserOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #5
0
 public virtual async Task <Response> AddUserAsync(string poolId, string nodeId, ComputeNodeUser user, ComputeNodeAddUserOptions computeNodeAddUserOptions, CancellationToken cancellationToken = default)
 {
     return((await RestClient.AddUserAsync(poolId, nodeId, user, computeNodeAddUserOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse());
 }