Freigeben über


SessionHostCollection.GetIfExistsAsync(String, CancellationToken) Methode

Definition

Versucht, Details für diese Ressource vom Dienst abzurufen.

  • Anforderungspfad/abonnements/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}
  • Vorgangs-IdSessionHosts_Get
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.DesktopVirtualization.SessionHostResource>> GetIfExistsAsync (string sessionHostName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.DesktopVirtualization.SessionHostResource>>
override this.GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.DesktopVirtualization.SessionHostResource>>
Public Overridable Function GetIfExistsAsync (sessionHostName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of NullableResponse(Of SessionHostResource))

Parameter

sessionHostName
String

Der Name des Sitzungshosts innerhalb des angegebenen Hostpools.

cancellationToken
CancellationToken

Das zu verwendende Abbruchtoken.

Gibt zurück

Ausnahmen

sessionHostName ist eine leere Zeichenfolge und wurde erwartet, dass sie nicht leer ist.

sessionHostName ist NULL.

Gilt für: