/// <summary> /// Deletes the specified compute node user. /// </summary> /// <param name="parameters">The parameters indicating which compute node user to delete.</param> public void DeleteComputeNodeUser(ComputeNodeUserOperationParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations; poolOperations.DeleteComputeNodeUser(parameters.PoolId, parameters.ComputeNodeId, parameters.ComputeNodeUserName, parameters.AdditionalBehaviors); }
public override void ExecuteCmdlet() { ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(this.BatchContext, this.PoolId, this.ComputeNodeId, this.Name, this.AdditionalBehaviors); ConfirmAction( Resources.RemoveComputeNodeUser, this.Name, () => BatchClient.DeleteComputeNodeUser(parameters)); }
/// <summary> /// Deletes the specified compute node user. /// </summary> /// <param name="parameters">The parameters indicating which compute node user to delete.</param> public void DeleteComputeNodeUser(ComputeNodeUserOperationParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations; poolOperations.DeleteComputeNodeUser(parameters.PoolId, parameters.ComputeNodeId, parameters.ComputeNodeUserName, parameters.AdditionalBehaviors); }
protected override void ProcessRecord() { ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(this.BatchContext, this.PoolId, this.ComputeNodeId, this.Name, this.AdditionalBehaviors); ConfirmAction( Force.IsPresent, string.Format(Resources.RemoveComputeNodeUserConfirm, this.Name), Resources.RemoveComputeNodeUser, this.Name, () => BatchClient.DeleteComputeNodeUser(parameters)); }
/// <summary> /// Deletes a compute node user for use in Scenario tests. /// </summary> public static void DeleteComputeNodeUser(BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName) { BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(context, poolId, computeNodeId, computeNodeUserName); client.DeleteComputeNodeUser(parameters); }
/// <summary> /// Deletes a compute node user for use in Scenario tests. /// </summary> public static void DeleteComputeNodeUser(BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName) { RequestInterceptor interceptor = CreateHttpRecordingInterceptor(); BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor }; BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(context, poolId, computeNodeId, computeNodeUserName, behaviors); client.DeleteComputeNodeUser(parameters); }