Вот пример кода для создания Azure Spot VM
/// <summary>
/// Create a Spot VM
/// </summary>
/// <param name="vmSizeName">Name of the size of the VM</param>
/// <param name="spotBiddingMaximumPrice">Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS (use -1 to match on-demand pricing)</param>
/// <param name="deallocateOnEviction">If set, when the Spot VM is evicted, it will be automatically deallocated (recommended!).</param>
/// <returns>VMProperties instance</returns>
public static VMProperties CreateSpotVM(string vmSizeName, double spotBiddingMaximumPrice = -1, bool deallocateOnEviction = true)
=> new VMProperties()
{
Hardware = new VMHardwareProfile(vmSizeName),
SpotVMBillingProfile = new VMBillingProfile(spotBiddingMaximumPrice),
SpotVMEvictionPolicy = (deallocateOnEviction ? "Deallocate" : null)
};