Skip to main content

active_sessions

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

Overview

Nameactive_sessions
TypeResource
Idazure.network.active_sessions

Fields

NameDatatypeDescription
protocolstringThe protocol used to connect to the target.
resourceTypestringThe type of the resource.
sessionDurationInMinsnumberDuration in mins the session has been active.
sessionIdstringA unique id for the session.
startTimeobjectThe time when the session started.
targetHostNamestringThe host name of the target.
targetIpAddressstringThe IP Address of the target.
targetResourceGroupstringThe resource group of the target.
targetResourceIdstringThe resource id of the target.
targetSubscriptionIdstringThe subscription id for the target virtual machine.
userNamestringThe user name who is active on this session.

Methods

NameAccessible byRequired ParamsDescription
getSELECTbastionHostName, resourceGroupName, subscriptionIdReturns the list of currently active sessions on the Bastion.

SELECT examples

Returns the list of currently active sessions on the Bastion.

SELECT
protocol,
resourceType,
sessionDurationInMins,
sessionId,
startTime,
targetHostName,
targetIpAddress,
targetResourceGroup,
targetResourceId,
targetSubscriptionId,
userName
FROM azure.network.active_sessions
WHERE bastionHostName = '{{ bastionHostName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';