Skip to main content

user_sessions

Creates, updates, deletes, gets or lists a user_sessions resource.

Overview

Nameuser_sessions
TypeResource
Idazure.desktop_virtualization.user_sessions

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
nametextThe name of the resource
active_directory_user_nametextfield from the properties object
application_typetextfield from the properties object
create_timetextfield from the properties object
hostPoolNametextfield from the properties object
object_idtextfield from the properties object
resourceGroupNametextfield from the properties object
sessionHostNametextfield from the properties object
session_statetextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
userSessionIdtextfield from the properties object
user_principal_nametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECThostPoolName, resourceGroupName, sessionHostName, subscriptionId, userSessionIdGet a userSession.
listSELECThostPoolName, resourceGroupName, sessionHostName, subscriptionIdList userSessions.
list_by_host_poolSELECThostPoolName, resourceGroupName, subscriptionIdList userSessions.
deleteDELETEhostPoolName, resourceGroupName, sessionHostName, subscriptionId, userSessionIdRemove a userSession.
disconnectEXEChostPoolName, resourceGroupName, sessionHostName, subscriptionId, userSessionIdDisconnect a userSession.
send_messageEXEChostPoolName, resourceGroupName, sessionHostName, subscriptionId, userSessionIdSend a message to a user.

SELECT examples

List userSessions.

SELECT
id,
name,
active_directory_user_name,
application_type,
create_time,
hostPoolName,
object_id,
resourceGroupName,
sessionHostName,
session_state,
subscriptionId,
system_data,
type,
userSessionId,
user_principal_name
FROM azure.desktop_virtualization.vw_user_sessions
WHERE hostPoolName = '{{ hostPoolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified user_sessions resource.

/*+ delete */
DELETE FROM azure.desktop_virtualization.user_sessions
WHERE hostPoolName = '{{ hostPoolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND sessionHostName = '{{ sessionHostName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND userSessionId = '{{ userSessionId }}';