ComputeNodeOperationsExtensions.DisableSchedulingAsync(IComputeNodeOperations, String, String, Nullable<DisableComputeNodeSchedulingOption>, ComputeNodeDisableSchedulingOptions, CancellationToken) Method

Definition

Disables task scheduling on the specified compute node.

public static System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.ComputeNodeDisableSchedulingHeaders> DisableSchedulingAsync (this Microsoft.Azure.Batch.Protocol.IComputeNodeOperations operations, string poolId, string nodeId, Nullable<Microsoft.Azure.Batch.Protocol.Models.DisableComputeNodeSchedulingOption> nodeDisableSchedulingOption = null, Microsoft.Azure.Batch.Protocol.Models.ComputeNodeDisableSchedulingOptions computeNodeDisableSchedulingOptions = null, System.Threading.CancellationToken cancellationToken = null);
static member DisableSchedulingAsync : Microsoft.Azure.Batch.Protocol.IComputeNodeOperations * string * string * Nullable<Microsoft.Azure.Batch.Protocol.Models.DisableComputeNodeSchedulingOption> * Microsoft.Azure.Batch.Protocol.Models.ComputeNodeDisableSchedulingOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.ComputeNodeDisableSchedulingHeaders>

Parameters

operations
IComputeNodeOperations

The operations group for this extension method.

poolId
System.String

The ID of the pool that contains the compute node.

nodeId
System.String

The ID of the compute node on which you want to disable task scheduling.

nodeDisableSchedulingOption
System.Nullable<DisableComputeNodeSchedulingOption>

What to do with currently running tasks when disabling task scheduling on the compute node. The default value is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion'

computeNodeDisableSchedulingOptions
ComputeNodeDisableSchedulingOptions

Additional parameters for the operation

cancellationToken
System.Threading.CancellationToken

The cancellation token.

Returns

System.Threading.Tasks.Task<ComputeNodeDisableSchedulingHeaders>

Remarks

You can disable task scheduling on a node only if its current scheduling state is enabled.

Applies to