Share via


ComputeBatchModelFactory.BatchAffinityInfo(String) Method

Definition

A locality hint that can be used by the Batch service to select a Compute Node on which to start a Task.

public static Azure.Compute.Batch.BatchAffinityInfo BatchAffinityInfo(string affinityId = default);
static member BatchAffinityInfo : string -> Azure.Compute.Batch.BatchAffinityInfo
Public Shared Function BatchAffinityInfo (Optional affinityId As String = Nothing) As BatchAffinityInfo

Parameters

affinityId
String

An opaque string representing the location of a Compute Node or a Task that has run previously. You can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere.

Returns

A new BatchAffinityInfo instance for mocking.

Applies to