1. Packages
  2. Azure Native
  3. API Docs
  4. desktopvirtualization
  5. getSessionHost
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Viewing docs for Azure Native v3.16.0
published on Friday, Mar 20, 2026 by Pulumi
azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Viewing docs for Azure Native v3.16.0
published on Friday, Mar 20, 2026 by Pulumi

    Get a session host.

    Uses Azure REST API version 2026-01-01-preview.

    Using getSessionHost

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSessionHost(args: GetSessionHostArgs, opts?: InvokeOptions): Promise<GetSessionHostResult>
    function getSessionHostOutput(args: GetSessionHostOutputArgs, opts?: InvokeOptions): Output<GetSessionHostResult>
    def get_session_host(host_pool_name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         session_host_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSessionHostResult
    def get_session_host_output(host_pool_name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: Optional[pulumi.Input[str]] = None,
                         session_host_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSessionHostResult]
    func LookupSessionHost(ctx *Context, args *LookupSessionHostArgs, opts ...InvokeOption) (*LookupSessionHostResult, error)
    func LookupSessionHostOutput(ctx *Context, args *LookupSessionHostOutputArgs, opts ...InvokeOption) LookupSessionHostResultOutput

    > Note: This function is named LookupSessionHost in the Go SDK.

    public static class GetSessionHost 
    {
        public static Task<GetSessionHostResult> InvokeAsync(GetSessionHostArgs args, InvokeOptions? opts = null)
        public static Output<GetSessionHostResult> Invoke(GetSessionHostInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSessionHostResult> getSessionHost(GetSessionHostArgs args, InvokeOptions options)
    public static Output<GetSessionHostResult> getSessionHost(GetSessionHostArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure-native:desktopvirtualization:getSessionHost
      arguments:
        # arguments dictionary

    The following arguments are supported:

    HostPoolName string
    The name of the host pool within the specified resource group
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    SessionHostName string
    The name of the session host within the specified host pool
    HostPoolName string
    The name of the host pool within the specified resource group
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    SessionHostName string
    The name of the session host within the specified host pool
    hostPoolName String
    The name of the host pool within the specified resource group
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    sessionHostName String
    The name of the session host within the specified host pool
    hostPoolName string
    The name of the host pool within the specified resource group
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    sessionHostName string
    The name of the session host within the specified host pool
    host_pool_name str
    The name of the host pool within the specified resource group
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    session_host_name str
    The name of the session host within the specified host pool
    hostPoolName String
    The name of the host pool within the specified resource group
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    sessionHostName String
    The name of the session host within the specified host pool

    getSessionHost Result

    The following output properties are available:

    ActiveSessions int
    Number of active sessions on SessionHost.
    AgentVersion string
    Version of agent on SessionHost.
    AzureApiVersion string
    The Azure API version of the resource.
    DisconnectedSessions int
    Number of disconnected sessions on SessionHost.
    Id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    LastHeartBeat string
    Last heart beat from SessionHost.
    LastSessionHostUpdateTime string
    The last time update was completed.
    LastUpdateTime string
    The timestamp of the last update.
    Name string
    The name of the resource
    ObjectId string
    ObjectId of SessionHost. (internal use)
    OsVersion string
    The version of the OS on the session host.
    PendingSessions int
    Number of pending sessions on SessionHost.
    ResourceId string
    Resource Id of SessionHost's underlying virtual machine.
    SessionHostConfiguration string
    SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
    SessionHostHealthCheckResults List<Pulumi.AzureNative.DesktopVirtualization.Outputs.SessionHostHealthCheckReportResponse>
    List of SessionHostHealthCheckReports
    Sessions int
    Number of sessions on SessionHost.
    Status string
    Status for a SessionHost.
    StatusTimestamp string
    The timestamp of the status.
    SxSStackVersion string
    The version of the side by side stack on the session host.
    SystemData Pulumi.AzureNative.DesktopVirtualization.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    UpdateErrorMessage string
    The error message.
    UpdateState string
    Update state of a SessionHost.
    VirtualMachineId string
    Virtual Machine Id of SessionHost's underlying virtual machine.
    AllowNewSession bool
    Allow a new session.
    AssignedUser string
    User assigned to SessionHost.
    FriendlyName string
    Friendly name of SessionHost
    ActiveSessions int
    Number of active sessions on SessionHost.
    AgentVersion string
    Version of agent on SessionHost.
    AzureApiVersion string
    The Azure API version of the resource.
    DisconnectedSessions int
    Number of disconnected sessions on SessionHost.
    Id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    LastHeartBeat string
    Last heart beat from SessionHost.
    LastSessionHostUpdateTime string
    The last time update was completed.
    LastUpdateTime string
    The timestamp of the last update.
    Name string
    The name of the resource
    ObjectId string
    ObjectId of SessionHost. (internal use)
    OsVersion string
    The version of the OS on the session host.
    PendingSessions int
    Number of pending sessions on SessionHost.
    ResourceId string
    Resource Id of SessionHost's underlying virtual machine.
    SessionHostConfiguration string
    SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
    SessionHostHealthCheckResults []SessionHostHealthCheckReportResponse
    List of SessionHostHealthCheckReports
    Sessions int
    Number of sessions on SessionHost.
    Status string
    Status for a SessionHost.
    StatusTimestamp string
    The timestamp of the status.
    SxSStackVersion string
    The version of the side by side stack on the session host.
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    UpdateErrorMessage string
    The error message.
    UpdateState string
    Update state of a SessionHost.
    VirtualMachineId string
    Virtual Machine Id of SessionHost's underlying virtual machine.
    AllowNewSession bool
    Allow a new session.
    AssignedUser string
    User assigned to SessionHost.
    FriendlyName string
    Friendly name of SessionHost
    activeSessions Integer
    Number of active sessions on SessionHost.
    agentVersion String
    Version of agent on SessionHost.
    azureApiVersion String
    The Azure API version of the resource.
    disconnectedSessions Integer
    Number of disconnected sessions on SessionHost.
    id String
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    lastHeartBeat String
    Last heart beat from SessionHost.
    lastSessionHostUpdateTime String
    The last time update was completed.
    lastUpdateTime String
    The timestamp of the last update.
    name String
    The name of the resource
    objectId String
    ObjectId of SessionHost. (internal use)
    osVersion String
    The version of the OS on the session host.
    pendingSessions Integer
    Number of pending sessions on SessionHost.
    resourceId String
    Resource Id of SessionHost's underlying virtual machine.
    sessionHostConfiguration String
    SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
    sessionHostHealthCheckResults List<SessionHostHealthCheckReportResponse>
    List of SessionHostHealthCheckReports
    sessions Integer
    Number of sessions on SessionHost.
    status String
    Status for a SessionHost.
    statusTimestamp String
    The timestamp of the status.
    sxSStackVersion String
    The version of the side by side stack on the session host.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    updateErrorMessage String
    The error message.
    updateState String
    Update state of a SessionHost.
    virtualMachineId String
    Virtual Machine Id of SessionHost's underlying virtual machine.
    allowNewSession Boolean
    Allow a new session.
    assignedUser String
    User assigned to SessionHost.
    friendlyName String
    Friendly name of SessionHost
    activeSessions number
    Number of active sessions on SessionHost.
    agentVersion string
    Version of agent on SessionHost.
    azureApiVersion string
    The Azure API version of the resource.
    disconnectedSessions number
    Number of disconnected sessions on SessionHost.
    id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    lastHeartBeat string
    Last heart beat from SessionHost.
    lastSessionHostUpdateTime string
    The last time update was completed.
    lastUpdateTime string
    The timestamp of the last update.
    name string
    The name of the resource
    objectId string
    ObjectId of SessionHost. (internal use)
    osVersion string
    The version of the OS on the session host.
    pendingSessions number
    Number of pending sessions on SessionHost.
    resourceId string
    Resource Id of SessionHost's underlying virtual machine.
    sessionHostConfiguration string
    SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
    sessionHostHealthCheckResults SessionHostHealthCheckReportResponse[]
    List of SessionHostHealthCheckReports
    sessions number
    Number of sessions on SessionHost.
    status string
    Status for a SessionHost.
    statusTimestamp string
    The timestamp of the status.
    sxSStackVersion string
    The version of the side by side stack on the session host.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    updateErrorMessage string
    The error message.
    updateState string
    Update state of a SessionHost.
    virtualMachineId string
    Virtual Machine Id of SessionHost's underlying virtual machine.
    allowNewSession boolean
    Allow a new session.
    assignedUser string
    User assigned to SessionHost.
    friendlyName string
    Friendly name of SessionHost
    active_sessions int
    Number of active sessions on SessionHost.
    agent_version str
    Version of agent on SessionHost.
    azure_api_version str
    The Azure API version of the resource.
    disconnected_sessions int
    Number of disconnected sessions on SessionHost.
    id str
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    last_heart_beat str
    Last heart beat from SessionHost.
    last_session_host_update_time str
    The last time update was completed.
    last_update_time str
    The timestamp of the last update.
    name str
    The name of the resource
    object_id str
    ObjectId of SessionHost. (internal use)
    os_version str
    The version of the OS on the session host.
    pending_sessions int
    Number of pending sessions on SessionHost.
    resource_id str
    Resource Id of SessionHost's underlying virtual machine.
    session_host_configuration str
    SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
    session_host_health_check_results Sequence[SessionHostHealthCheckReportResponse]
    List of SessionHostHealthCheckReports
    sessions int
    Number of sessions on SessionHost.
    status str
    Status for a SessionHost.
    status_timestamp str
    The timestamp of the status.
    sx_s_stack_version str
    The version of the side by side stack on the session host.
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    update_error_message str
    The error message.
    update_state str
    Update state of a SessionHost.
    virtual_machine_id str
    Virtual Machine Id of SessionHost's underlying virtual machine.
    allow_new_session bool
    Allow a new session.
    assigned_user str
    User assigned to SessionHost.
    friendly_name str
    Friendly name of SessionHost
    activeSessions Number
    Number of active sessions on SessionHost.
    agentVersion String
    Version of agent on SessionHost.
    azureApiVersion String
    The Azure API version of the resource.
    disconnectedSessions Number
    Number of disconnected sessions on SessionHost.
    id String
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    lastHeartBeat String
    Last heart beat from SessionHost.
    lastSessionHostUpdateTime String
    The last time update was completed.
    lastUpdateTime String
    The timestamp of the last update.
    name String
    The name of the resource
    objectId String
    ObjectId of SessionHost. (internal use)
    osVersion String
    The version of the OS on the session host.
    pendingSessions Number
    Number of pending sessions on SessionHost.
    resourceId String
    Resource Id of SessionHost's underlying virtual machine.
    sessionHostConfiguration String
    SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
    sessionHostHealthCheckResults List<Property Map>
    List of SessionHostHealthCheckReports
    sessions Number
    Number of sessions on SessionHost.
    status String
    Status for a SessionHost.
    statusTimestamp String
    The timestamp of the status.
    sxSStackVersion String
    The version of the side by side stack on the session host.
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    updateErrorMessage String
    The error message.
    updateState String
    Update state of a SessionHost.
    virtualMachineId String
    Virtual Machine Id of SessionHost's underlying virtual machine.
    allowNewSession Boolean
    Allow a new session.
    assignedUser String
    User assigned to SessionHost.
    friendlyName String
    Friendly name of SessionHost

    Supporting Types

    SessionHostHealthCheckFailureDetailsResponse

    ErrorCode int
    Error code corresponding for the failure.
    LastHealthCheckDateTime string
    The timestamp of the last update.
    Message string
    Failure message: hints on what is wrong and how to recover.
    ErrorCode int
    Error code corresponding for the failure.
    LastHealthCheckDateTime string
    The timestamp of the last update.
    Message string
    Failure message: hints on what is wrong and how to recover.
    errorCode Integer
    Error code corresponding for the failure.
    lastHealthCheckDateTime String
    The timestamp of the last update.
    message String
    Failure message: hints on what is wrong and how to recover.
    errorCode number
    Error code corresponding for the failure.
    lastHealthCheckDateTime string
    The timestamp of the last update.
    message string
    Failure message: hints on what is wrong and how to recover.
    error_code int
    Error code corresponding for the failure.
    last_health_check_date_time str
    The timestamp of the last update.
    message str
    Failure message: hints on what is wrong and how to recover.
    errorCode Number
    Error code corresponding for the failure.
    lastHealthCheckDateTime String
    The timestamp of the last update.
    message String
    Failure message: hints on what is wrong and how to recover.

    SessionHostHealthCheckReportResponse

    AdditionalFailureDetails Pulumi.AzureNative.DesktopVirtualization.Inputs.SessionHostHealthCheckFailureDetailsResponse
    Additional detailed information on the failure.
    HealthCheckName string
    Represents the name of the health check operation performed.
    HealthCheckResult string
    Represents the Health state of the health check we performed.
    AdditionalFailureDetails SessionHostHealthCheckFailureDetailsResponse
    Additional detailed information on the failure.
    HealthCheckName string
    Represents the name of the health check operation performed.
    HealthCheckResult string
    Represents the Health state of the health check we performed.
    additionalFailureDetails SessionHostHealthCheckFailureDetailsResponse
    Additional detailed information on the failure.
    healthCheckName String
    Represents the name of the health check operation performed.
    healthCheckResult String
    Represents the Health state of the health check we performed.
    additionalFailureDetails SessionHostHealthCheckFailureDetailsResponse
    Additional detailed information on the failure.
    healthCheckName string
    Represents the name of the health check operation performed.
    healthCheckResult string
    Represents the Health state of the health check we performed.
    additional_failure_details SessionHostHealthCheckFailureDetailsResponse
    Additional detailed information on the failure.
    health_check_name str
    Represents the name of the health check operation performed.
    health_check_result str
    Represents the Health state of the health check we performed.
    additionalFailureDetails Property Map
    Additional detailed information on the failure.
    healthCheckName String
    Represents the name of the health check operation performed.
    healthCheckResult String
    Represents the Health state of the health check we performed.

    SystemDataResponse

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Viewing docs for Azure Native v3.16.0
    published on Friday, Mar 20, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.