session_hosts
Creates, updates, deletes, gets or lists a session_hosts resource.
Overview
| Name | session_hosts |
| Type | Resource |
| Id | azure.desktop_virtualization.session_hosts |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
agentVersion | string | Version of agent on SessionHost. |
allowNewSession | boolean | Allow a new session. |
assignedUser | string | User assigned to SessionHost. |
friendlyName | string | Friendly name of SessionHost. |
lastHeartBeat | string (date-time) | Last heart beat from SessionHost. |
lastUpdateTime | string (date-time) | The timestamp of the last update. |
objectId | string | ObjectId of SessionHost. (internal use). |
osVersion | string | The version of the OS on the session host. |
resourceId | string | Resource Id of SessionHost's underlying virtual machine. |
sessionHostHealthCheckResults | array | List of SessionHostHealthCheckReports. |
sessions | integer | Number of sessions on SessionHost. |
status | string | Status for a SessionHost. Known values are: "Available", "Unavailable", "Shutdown", "Disconnected", "Upgrading", "UpgradeFailed", "NoHeartbeat", "NotJoinedToDomain", "DomainTrustRelationshipLost", "SxSStackListenerNotReady", "FSLogixNotHealthy", and "NeedsAssistance". |
statusTimestamp | string (date-time) | The timestamp of the status. |
sxSStackVersion | string | The version of the side by side stack on the session host. |
systemData | object | 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. Known values are: "Initial", "Pending", "Started", "Succeeded", and "Failed". |
virtualMachineId | string | Virtual Machine Id of SessionHost's underlying virtual machine. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
agentVersion | string | Version of agent on SessionHost. |
allowNewSession | boolean | Allow a new session. |
assignedUser | string | User assigned to SessionHost. |
friendlyName | string | Friendly name of SessionHost. |
lastHeartBeat | string (date-time) | Last heart beat from SessionHost. |
lastUpdateTime | string (date-time) | The timestamp of the last update. |
objectId | string | ObjectId of SessionHost. (internal use). |
osVersion | string | The version of the OS on the session host. |
resourceId | string | Resource Id of SessionHost's underlying virtual machine. |
sessionHostHealthCheckResults | array | List of SessionHostHealthCheckReports. |
sessions | integer | Number of sessions on SessionHost. |
status | string | Status for a SessionHost. Known values are: "Available", "Unavailable", "Shutdown", "Disconnected", "Upgrading", "UpgradeFailed", "NoHeartbeat", "NotJoinedToDomain", "DomainTrustRelationshipLost", "SxSStackListenerNotReady", "FSLogixNotHealthy", and "NeedsAssistance". |
statusTimestamp | string (date-time) | The timestamp of the status. |
sxSStackVersion | string | The version of the side by side stack on the session host. |
systemData | object | 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. Known values are: "Initial", "Pending", "Started", "Succeeded", and "Failed". |
virtualMachineId | string | Virtual Machine Id of SessionHost's underlying virtual machine. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, host_pool_name, session_host_name, subscription_id | Get a session host. | |
list | select | resource_group_name, host_pool_name, subscription_id | pageSize, isDescending, initialSkip | List sessionHosts. |
update | update | resource_group_name, host_pool_name, session_host_name, subscription_id | force | Update a session host. |
delete | delete | resource_group_name, host_pool_name, session_host_name, subscription_id | force | Remove a SessionHost. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
host_pool_name | string | The name of the host pool within the specified resource group. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
session_host_name | string | The name of the session host within the specified host pool. Required. |
subscription_id | string | |
force | boolean | Force flag to force sessionHost deletion even when userSession exists. Default value is None. |
initialSkip | integer | Initial number of items to skip. Default value is None. |
isDescending | boolean | Indicates whether the collection is descending. Default value is None. |
pageSize | integer | Number of items per page. Default value is None. |
SELECT examples
- get
- list
Get a session host.
SELECT
id,
name,
agentVersion,
allowNewSession,
assignedUser,
friendlyName,
lastHeartBeat,
lastUpdateTime,
objectId,
osVersion,
resourceId,
sessionHostHealthCheckResults,
sessions,
status,
statusTimestamp,
sxSStackVersion,
systemData,
type,
updateErrorMessage,
updateState,
virtualMachineId
FROM azure.desktop_virtualization.session_hosts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND host_pool_name = '{{ host_pool_name }}' -- required
AND session_host_name = '{{ session_host_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List sessionHosts.
SELECT
id,
name,
agentVersion,
allowNewSession,
assignedUser,
friendlyName,
lastHeartBeat,
lastUpdateTime,
objectId,
osVersion,
resourceId,
sessionHostHealthCheckResults,
sessions,
status,
statusTimestamp,
sxSStackVersion,
systemData,
type,
updateErrorMessage,
updateState,
virtualMachineId
FROM azure.desktop_virtualization.session_hosts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND host_pool_name = '{{ host_pool_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND pageSize = '{{ pageSize }}'
AND isDescending = '{{ isDescending }}'
AND initialSkip = '{{ initialSkip }}'
;
UPDATE examples
- update
Update a session host.
UPDATE azure.desktop_virtualization.session_hosts
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND host_pool_name = '{{ host_pool_name }}' --required
AND session_host_name = '{{ session_host_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND force = {{ force}}
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Remove a SessionHost.
DELETE FROM azure.desktop_virtualization.session_hosts
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND host_pool_name = '{{ host_pool_name }}' --required
AND session_host_name = '{{ session_host_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND force = '{{ force }}'
;