HciVmLoadBalancerCollection.CreateOrUpdateAsync Method

Definition

The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer creation.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}.
  • Operation Id. : LoadBalancers_CreateOrUpdate.
  • Default Api Version. : 2025-09-01-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Hci.Vm.HciVmLoadBalancerResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string loadBalancerName, Azure.ResourceManager.Hci.Vm.HciVmLoadBalancerData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Hci.Vm.HciVmLoadBalancerData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Hci.Vm.HciVmLoadBalancerResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Hci.Vm.HciVmLoadBalancerData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Hci.Vm.HciVmLoadBalancerResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, loadBalancerName As String, data As HciVmLoadBalancerData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of HciVmLoadBalancerResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

loadBalancerName
String

Name of the load balancer.

data
HciVmLoadBalancerData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

loadBalancerName or data is null.

loadBalancerName is an empty string, and was expected to be non-empty.

Applies to