published on Friday, Mar 20, 2026 by Pulumi
published on Friday, Mar 20, 2026 by Pulumi
Represents a SessionHost definition.
Uses Azure REST API version 2026-01-01-preview.
Example Usage
SessionHost_Create
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sessionHost = new AzureNative.DesktopVirtualization.SessionHost("sessionHost", new()
{
HostPoolName = "hostPool1",
ResourceGroupName = "resourceGroup1",
SessionHostName = "sessionHost1.microsoft.com",
});
});
package main
import (
desktopvirtualization "github.com/pulumi/pulumi-azure-native-sdk/desktopvirtualization/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := desktopvirtualization.NewSessionHost(ctx, "sessionHost", &desktopvirtualization.SessionHostArgs{
HostPoolName: pulumi.String("hostPool1"),
ResourceGroupName: pulumi.String("resourceGroup1"),
SessionHostName: pulumi.String("sessionHost1.microsoft.com"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.desktopvirtualization.SessionHost;
import com.pulumi.azurenative.desktopvirtualization.SessionHostArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var sessionHost = new SessionHost("sessionHost", SessionHostArgs.builder()
.hostPoolName("hostPool1")
.resourceGroupName("resourceGroup1")
.sessionHostName("sessionHost1.microsoft.com")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const sessionHost = new azure_native.desktopvirtualization.SessionHost("sessionHost", {
hostPoolName: "hostPool1",
resourceGroupName: "resourceGroup1",
sessionHostName: "sessionHost1.microsoft.com",
});
import pulumi
import pulumi_azure_native as azure_native
session_host = azure_native.desktopvirtualization.SessionHost("sessionHost",
host_pool_name="hostPool1",
resource_group_name="resourceGroup1",
session_host_name="sessionHost1.microsoft.com")
resources:
sessionHost:
type: azure-native:desktopvirtualization:SessionHost
properties:
hostPoolName: hostPool1
resourceGroupName: resourceGroup1
sessionHostName: sessionHost1.microsoft.com
Create SessionHost Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SessionHost(name: string, args: SessionHostArgs, opts?: CustomResourceOptions);@overload
def SessionHost(resource_name: str,
args: SessionHostArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SessionHost(resource_name: str,
opts: Optional[ResourceOptions] = None,
host_pool_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
allow_new_session: Optional[bool] = None,
assigned_user: Optional[str] = None,
friendly_name: Optional[str] = None,
session_host_name: Optional[str] = None)func NewSessionHost(ctx *Context, name string, args SessionHostArgs, opts ...ResourceOption) (*SessionHost, error)public SessionHost(string name, SessionHostArgs args, CustomResourceOptions? opts = null)
public SessionHost(String name, SessionHostArgs args)
public SessionHost(String name, SessionHostArgs args, CustomResourceOptions options)
type: azure-native:desktopvirtualization:SessionHost
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SessionHostArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SessionHostArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SessionHostArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SessionHostArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SessionHostArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var sessionHostResource = new AzureNative.DesktopVirtualization.SessionHost("sessionHostResource", new()
{
HostPoolName = "string",
ResourceGroupName = "string",
AllowNewSession = false,
AssignedUser = "string",
FriendlyName = "string",
SessionHostName = "string",
});
example, err := desktopvirtualization.NewSessionHost(ctx, "sessionHostResource", &desktopvirtualization.SessionHostArgs{
HostPoolName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
AllowNewSession: pulumi.Bool(false),
AssignedUser: pulumi.String("string"),
FriendlyName: pulumi.String("string"),
SessionHostName: pulumi.String("string"),
})
var sessionHostResource = new SessionHost("sessionHostResource", SessionHostArgs.builder()
.hostPoolName("string")
.resourceGroupName("string")
.allowNewSession(false)
.assignedUser("string")
.friendlyName("string")
.sessionHostName("string")
.build());
session_host_resource = azure_native.desktopvirtualization.SessionHost("sessionHostResource",
host_pool_name="string",
resource_group_name="string",
allow_new_session=False,
assigned_user="string",
friendly_name="string",
session_host_name="string")
const sessionHostResource = new azure_native.desktopvirtualization.SessionHost("sessionHostResource", {
hostPoolName: "string",
resourceGroupName: "string",
allowNewSession: false,
assignedUser: "string",
friendlyName: "string",
sessionHostName: "string",
});
type: azure-native:desktopvirtualization:SessionHost
properties:
allowNewSession: false
assignedUser: string
friendlyName: string
hostPoolName: string
resourceGroupName: string
sessionHostName: string
SessionHost Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SessionHost resource accepts the following input properties:
- Host
Pool stringName - The name of the host pool within the specified resource group
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Allow
New boolSession - Allow a new session.
- Assigned
User string - User assigned to SessionHost.
- Friendly
Name string - Friendly name of SessionHost
- Session
Host stringName - The name of the session host within the specified host pool
- Host
Pool stringName - The name of the host pool within the specified resource group
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Allow
New boolSession - Allow a new session.
- Assigned
User string - User assigned to SessionHost.
- Friendly
Name string - Friendly name of SessionHost
- Session
Host stringName - The name of the session host within the specified host pool
- host
Pool StringName - The name of the host pool within the specified resource group
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- allow
New BooleanSession - Allow a new session.
- assigned
User String - User assigned to SessionHost.
- friendly
Name String - Friendly name of SessionHost
- session
Host StringName - The name of the session host within the specified host pool
- host
Pool stringName - The name of the host pool within the specified resource group
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- allow
New booleanSession - Allow a new session.
- assigned
User string - User assigned to SessionHost.
- friendly
Name string - Friendly name of SessionHost
- session
Host stringName - The name of the session host within the specified host pool
- host_
pool_ strname - The name of the host pool within the specified resource group
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- allow_
new_ boolsession - Allow a new session.
- assigned_
user str - User assigned to SessionHost.
- friendly_
name str - Friendly name of SessionHost
- session_
host_ strname - The name of the session host within the specified host pool
- host
Pool StringName - The name of the host pool within the specified resource group
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- allow
New BooleanSession - Allow a new session.
- assigned
User String - User assigned to SessionHost.
- friendly
Name String - Friendly name of SessionHost
- session
Host StringName - The name of the session host within the specified host pool
Outputs
All input properties are implicitly available as output properties. Additionally, the SessionHost resource produces the following output properties:
- Active
Sessions int - Number of active sessions on SessionHost.
- Agent
Version string - Version of agent on SessionHost.
- Azure
Api stringVersion - The Azure API version of the resource.
- Disconnected
Sessions int - Number of disconnected sessions on SessionHost.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Heart stringBeat - Last heart beat from SessionHost.
- Last
Session stringHost Update Time - The last time update was completed.
- Last
Update stringTime - The timestamp of the last update.
- Name string
- The name of the resource
- Object
Id string - ObjectId of SessionHost. (internal use)
- Os
Version string - The version of the OS on the session host.
- Pending
Sessions int - Number of pending sessions on SessionHost.
- Resource
Id string - Resource Id of SessionHost's underlying virtual machine.
- Session
Host stringConfiguration - SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
- Session
Host List<Pulumi.Health Check Results Azure Native. Desktop Virtualization. Outputs. Session Host Health Check Report Response> - List of SessionHostHealthCheckReports
- Sessions int
- Number of sessions on SessionHost.
- Status string
- Status for a SessionHost.
- Status
Timestamp string - The timestamp of the status.
- Sx
SStack stringVersion - The version of the side by side stack on the session host.
- System
Data Pulumi.Azure Native. Desktop Virtualization. Outputs. System Data Response - 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"
- Update
Error stringMessage - The error message.
- Update
State string - Update state of a SessionHost.
- Virtual
Machine stringId - Virtual Machine Id of SessionHost's underlying virtual machine.
- Active
Sessions int - Number of active sessions on SessionHost.
- Agent
Version string - Version of agent on SessionHost.
- Azure
Api stringVersion - The Azure API version of the resource.
- Disconnected
Sessions int - Number of disconnected sessions on SessionHost.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Heart stringBeat - Last heart beat from SessionHost.
- Last
Session stringHost Update Time - The last time update was completed.
- Last
Update stringTime - The timestamp of the last update.
- Name string
- The name of the resource
- Object
Id string - ObjectId of SessionHost. (internal use)
- Os
Version string - The version of the OS on the session host.
- Pending
Sessions int - Number of pending sessions on SessionHost.
- Resource
Id string - Resource Id of SessionHost's underlying virtual machine.
- Session
Host stringConfiguration - SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
- Session
Host []SessionHealth Check Results Host Health Check Report Response - List of SessionHostHealthCheckReports
- Sessions int
- Number of sessions on SessionHost.
- Status string
- Status for a SessionHost.
- Status
Timestamp string - The timestamp of the status.
- Sx
SStack stringVersion - The version of the side by side stack on the session host.
- System
Data SystemData Response - 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"
- Update
Error stringMessage - The error message.
- Update
State string - Update state of a SessionHost.
- Virtual
Machine stringId - Virtual Machine Id of SessionHost's underlying virtual machine.
- active
Sessions Integer - Number of active sessions on SessionHost.
- agent
Version String - Version of agent on SessionHost.
- azure
Api StringVersion - The Azure API version of the resource.
- disconnected
Sessions Integer - Number of disconnected sessions on SessionHost.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Heart StringBeat - Last heart beat from SessionHost.
- last
Session StringHost Update Time - The last time update was completed.
- last
Update StringTime - The timestamp of the last update.
- name String
- The name of the resource
- object
Id String - ObjectId of SessionHost. (internal use)
- os
Version String - The version of the OS on the session host.
- pending
Sessions Integer - Number of pending sessions on SessionHost.
- resource
Id String - Resource Id of SessionHost's underlying virtual machine.
- session
Host StringConfiguration - SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
- session
Host List<SessionHealth Check Results Host Health Check Report Response> - List of SessionHostHealthCheckReports
- sessions Integer
- Number of sessions on SessionHost.
- status String
- Status for a SessionHost.
- status
Timestamp String - The timestamp of the status.
- sx
SStack StringVersion - The version of the side by side stack on the session host.
- system
Data SystemData Response - 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"
- update
Error StringMessage - The error message.
- update
State String - Update state of a SessionHost.
- virtual
Machine StringId - Virtual Machine Id of SessionHost's underlying virtual machine.
- active
Sessions number - Number of active sessions on SessionHost.
- agent
Version string - Version of agent on SessionHost.
- azure
Api stringVersion - The Azure API version of the resource.
- disconnected
Sessions number - Number of disconnected sessions on SessionHost.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Heart stringBeat - Last heart beat from SessionHost.
- last
Session stringHost Update Time - The last time update was completed.
- last
Update stringTime - The timestamp of the last update.
- name string
- The name of the resource
- object
Id string - ObjectId of SessionHost. (internal use)
- os
Version string - The version of the OS on the session host.
- pending
Sessions number - Number of pending sessions on SessionHost.
- resource
Id string - Resource Id of SessionHost's underlying virtual machine.
- session
Host stringConfiguration - SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
- session
Host SessionHealth Check Results Host Health Check Report Response[] - List of SessionHostHealthCheckReports
- sessions number
- Number of sessions on SessionHost.
- status string
- Status for a SessionHost.
- status
Timestamp string - The timestamp of the status.
- sx
SStack stringVersion - The version of the side by side stack on the session host.
- system
Data SystemData Response - 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"
- update
Error stringMessage - The error message.
- update
State string - Update state of a SessionHost.
- virtual
Machine stringId - Virtual Machine Id of SessionHost's underlying virtual machine.
- active_
sessions int - Number of active sessions on SessionHost.
- agent_
version str - Version of agent on SessionHost.
- azure_
api_ strversion - The Azure API version of the resource.
- disconnected_
sessions int - Number of disconnected sessions on SessionHost.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
heart_ strbeat - Last heart beat from SessionHost.
- last_
session_ strhost_ update_ time - The last time update was completed.
- last_
update_ strtime - 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_ strconfiguration - SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
- session_
host_ Sequence[Sessionhealth_ check_ results Host Health Check Report Response] - 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_ strstack_ version - The version of the side by side stack on the session host.
- system_
data SystemData Response - 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_ strmessage - The error message.
- update_
state str - Update state of a SessionHost.
- virtual_
machine_ strid - Virtual Machine Id of SessionHost's underlying virtual machine.
- active
Sessions Number - Number of active sessions on SessionHost.
- agent
Version String - Version of agent on SessionHost.
- azure
Api StringVersion - The Azure API version of the resource.
- disconnected
Sessions Number - Number of disconnected sessions on SessionHost.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Heart StringBeat - Last heart beat from SessionHost.
- last
Session StringHost Update Time - The last time update was completed.
- last
Update StringTime - The timestamp of the last update.
- name String
- The name of the resource
- object
Id String - ObjectId of SessionHost. (internal use)
- os
Version String - The version of the OS on the session host.
- pending
Sessions Number - Number of pending sessions on SessionHost.
- resource
Id String - Resource Id of SessionHost's underlying virtual machine.
- session
Host StringConfiguration - SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z
- session
Host List<Property Map>Health Check Results - List of SessionHostHealthCheckReports
- sessions Number
- Number of sessions on SessionHost.
- status String
- Status for a SessionHost.
- status
Timestamp String - The timestamp of the status.
- sx
SStack StringVersion - The version of the side by side stack on the session host.
- system
Data 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"
- update
Error StringMessage - The error message.
- update
State String - Update state of a SessionHost.
- virtual
Machine StringId - Virtual Machine Id of SessionHost's underlying virtual machine.
Supporting Types
SessionHostHealthCheckFailureDetailsResponse, SessionHostHealthCheckFailureDetailsResponseArgs
Contains details on the failure.- Error
Code int - Error code corresponding for the failure.
- Last
Health stringCheck Date Time - 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 stringCheck Date Time - The timestamp of the last update.
- Message string
- Failure message: hints on what is wrong and how to recover.
- error
Code Integer - Error code corresponding for the failure.
- last
Health StringCheck Date Time - The timestamp of the last update.
- message String
- Failure message: hints on what is wrong and how to recover.
- error
Code number - Error code corresponding for the failure.
- last
Health stringCheck Date Time - 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_ strcheck_ date_ time - The timestamp of the last update.
- message str
- Failure message: hints on what is wrong and how to recover.
- error
Code Number - Error code corresponding for the failure.
- last
Health StringCheck Date Time - The timestamp of the last update.
- message String
- Failure message: hints on what is wrong and how to recover.
SessionHostHealthCheckReportResponse, SessionHostHealthCheckReportResponseArgs
The report for session host information.- Additional
Failure Pulumi.Details Azure Native. Desktop Virtualization. Inputs. Session Host Health Check Failure Details Response - Additional detailed information on the failure.
- Health
Check stringName - Represents the name of the health check operation performed.
- Health
Check stringResult - Represents the Health state of the health check we performed.
- Additional
Failure SessionDetails Host Health Check Failure Details Response - Additional detailed information on the failure.
- Health
Check stringName - Represents the name of the health check operation performed.
- Health
Check stringResult - Represents the Health state of the health check we performed.
- additional
Failure SessionDetails Host Health Check Failure Details Response - Additional detailed information on the failure.
- health
Check StringName - Represents the name of the health check operation performed.
- health
Check StringResult - Represents the Health state of the health check we performed.
- additional
Failure SessionDetails Host Health Check Failure Details Response - Additional detailed information on the failure.
- health
Check stringName - Represents the name of the health check operation performed.
- health
Check stringResult - Represents the Health state of the health check we performed.
- additional_
failure_ Sessiondetails Host Health Check Failure Details Response - Additional detailed information on the failure.
- health_
check_ strname - Represents the name of the health check operation performed.
- health_
check_ strresult - Represents the Health state of the health check we performed.
- additional
Failure Property MapDetails - Additional detailed information on the failure.
- health
Check StringName - Represents the name of the health check operation performed.
- health
Check StringResult - Represents the Health state of the health check we performed.
SystemDataResponse, SystemDataResponseArgs
Metadata pertaining to creation and last modification of the resource.- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - 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_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:desktopvirtualization:SessionHost hostPool1/sessionHost1.microsoft.com /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
published on Friday, Mar 20, 2026 by Pulumi
