Condividi tramite


SessionHostCollection.CreateOrUpdateAsync Method

Definition

create or update a sessionHost.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}.
  • Operation Id. : SessionHosts_Create.
  • Default Api Version. : 2026-01-01-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DesktopVirtualization.SessionHostResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sessionHostName, Azure.ResourceManager.DesktopVirtualization.SessionHostData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.DesktopVirtualization.SessionHostData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DesktopVirtualization.SessionHostResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.DesktopVirtualization.SessionHostData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DesktopVirtualization.SessionHostResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, sessionHostName As String, data As SessionHostData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of SessionHostResource))

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.

sessionHostName
String

The name of the session host within the specified host pool.

data
SessionHostData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

sessionHostName or data is null.

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

Applies to