active_sessions
Creates, updates, deletes, gets or lists an active_sessions
resource.
Overview
Name | active_sessions |
Type | Resource |
Id | azure.network.active_sessions |
Fields
The following fields are returned by SELECT
queries:
- get
Success. The operation returns a list of active sessions on the Bastion.
Name | Datatype | Description |
---|---|---|
protocol | string | The protocol used to connect to the target. |
resourceType | string | The type of the resource. |
sessionDurationInMins | number | Duration in mins the session has been active. |
sessionId | string | A unique id for the session. |
startTime | object | The time when the session started. |
targetHostName | string | The host name of the target. |
targetIpAddress | string | The IP Address of the target. |
targetResourceGroup | string | The resource group of the target. |
targetResourceId | string | The resource id of the target. |
targetSubscriptionId | string | The subscription id for the target virtual machine. |
userName | string | The user name who is active on this session. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , bastionHostName , subscriptionId | Returns the list of currently active sessions on the Bastion. |
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 |
---|---|---|
bastionHostName | string | The name of the Bastion Host. |
resourceGroupName | string | The name of the resource group. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
SELECT
examples
- get
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 resourceGroupName = '{{ resourceGroupName }}' -- required
AND bastionHostName = '{{ bastionHostName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;