/// <summary> /// Creates a new compute node user. /// </summary> /// <param name="options">The options to use when creating the compute node user.</param> public void CreateComputeNodeUser(NewComputeNodeUserParameters options) { if (options == null) { throw new ArgumentNullException("options"); } ComputeNodeUser user = null; string computeNodeId = null; if (options.ComputeNode != null) { user = options.ComputeNode.omObject.CreateComputeNodeUser(); computeNodeId = options.ComputeNode.Id; } else { PoolOperations poolOperations = options.Context.BatchOMClient.PoolOperations; user = poolOperations.CreateComputeNodeUser(options.PoolId, options.ComputeNodeId); computeNodeId = options.ComputeNodeId; } user.Name = options.ComputeNodeUserName; user.Password = options.Password; user.ExpiryTime = options.ExpiryTime; user.IsAdmin = options.IsAdmin; WriteVerbose(string.Format(Resources.CreatingComputeNodeUser, user.Name, computeNodeId)); user.Commit(ComputeNodeUserCommitSemantics.AddUser, options.AdditionalBehaviors); }