Share via


ComputeNodeOperationsExtensions.AddUserAsync Method

Definition

Adds a user Account to the specified Compute Node.

public static System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.ComputeNodeAddUserHeaders> AddUserAsync (this Microsoft.Azure.Batch.Protocol.IComputeNodeOperations operations, string poolId, string nodeId, Microsoft.Azure.Batch.Protocol.Models.ComputeNodeUser user, Microsoft.Azure.Batch.Protocol.Models.ComputeNodeAddUserOptions computeNodeAddUserOptions = default, System.Threading.CancellationToken cancellationToken = default);
static member AddUserAsync : Microsoft.Azure.Batch.Protocol.IComputeNodeOperations * string * string * Microsoft.Azure.Batch.Protocol.Models.ComputeNodeUser * Microsoft.Azure.Batch.Protocol.Models.ComputeNodeAddUserOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.ComputeNodeAddUserHeaders>
<Extension()>
Public Function AddUserAsync (operations As IComputeNodeOperations, poolId As String, nodeId As String, user As ComputeNodeUser, Optional computeNodeAddUserOptions As ComputeNodeAddUserOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ComputeNodeAddUserHeaders)

Parameters

operations
IComputeNodeOperations

The operations group for this extension method.

poolId
String

The ID of the Pool that contains the Compute Node.

nodeId
String

The ID of the machine on which you want to create a user Account.

user
ComputeNodeUser

The user Account to be created.

computeNodeAddUserOptions
ComputeNodeAddUserOptions

Additional parameters for the operation

cancellationToken
CancellationToken

The cancellation token.

Returns

Remarks

You can add a user Account to a Compute Node only when it is in the idle or running state.

Applies to